I'm automating web application testing, and I have a generic "click on some tag by RxPath" method, that looks like this:
- Code: Select all
public static void ClickTag(string aRxPath)
{
Ranorex.WebElement lTag = aRxPath;
lTag.EnsureVisible();
Mouse.Click(lTag);
}
The problem is that whatever's underneath EnsureVisible() seems to regard a web element as visible if any pixel is showing on the screen. This means that the click sometimes doesn't happen, if previous bits of code have left the screen such that the next thing to click has just a few pixels visible. Note that the Mouse.Click() method defaults to Location.Center, but changing the location wouldn't help anyway, since you could, by other screen moves, have any edge of the object [not] visible.
Is there an EnsureEntireObjectVisible() method, or a workaround for this please?