You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing web apps that download files requires interaction with desktop to deal with file-save pop-ups.
This can be done though awt, with Robot, etc., but only if the pop-up button coordinates are known.
The position of the pop-up is only consistent when the browser location is the same.
A new command is needed (using desktop coordinates), positionBrowserXY():
| position browser X | x-coordinate | Y | y-coordinate |
code example:
public void positionBrowser(String xStr, String yStr)
{
WebDriver aDriver = getSeleniumHelper().driver();
String currentWindowHandle = aDriver.getWindowHandle();
TargetLocator aLocator = aDriver.switchTo();
aLocator.window(currentWindowHandle);
Point p = getPoint(xStr, yStr);
Window aWindow = aDriver.manage().window();
aWindow.setPosition(p);
}
private Point getPoint(String xStr, String yStr)
{
int x = Integer.valueOf(xStr);
int y = Integer.valueOf(yStr);
return new Point(x, y);
}
The text was updated successfully, but these errors were encountered:
Maximizing the Firefox browser has odd effects on RHEL 7.4 with Xvfb headless display.
setPosition() is supported in Selenium, and does the trick for my automated Unix testing.
I don't mind adding a method to postion the window, although I would put most of the logic in a new method in SeleniumHelper. Can you make a PR for it?
Testing web apps that download files requires interaction with desktop to deal with file-save pop-ups.
This can be done though awt, with Robot, etc., but only if the pop-up button coordinates are known.
The position of the pop-up is only consistent when the browser location is the same.
A new command is needed (using desktop coordinates), positionBrowserXY():
| position browser X | x-coordinate | Y | y-coordinate |
code example:
The text was updated successfully, but these errors were encountered: