driver.window.manage.setPosition() outside of bounds leads to wrong position reporting

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
2 years ago
a year ago

People

(Reporter: pascal, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:48.0) Gecko/20100101 Firefox/48.0
Build ID: 20160823121617

Steps to reproduce:

Using selenium 3b3 Java binding over Geckodriver on macOS

WebDriver driver = new FirefoxDriver();
driver.get("about:blank");
System.out.println("Position before set(5,5): " + driver.manage().window().getPosition());

driver.manage().window().setPosition(new Point(5,5)); // not possible, since the menu bar is 22px height, so the browser window is not moved

// now it returns the wrong value:
System.out.println("Position after set(5,5): " + driver.manage().window().getPosition());

driver.get("about:blank");
System.out.println("Position after page reload: " + driver.manage().window().getPosition());



Actual results:

Position before set(5,5): (4, 23)
Position after set(5,5): (5, 5)
Position after page reload: (4, 23)


Expected results:

With old Firefox driver, window was moved in a best effort way:

Position before set(5,5): (4, 23)
Position after set(5,5): (5, 23)
Position after page reload: (5, 23)
Unfortunately we can't guarantee the position of the browser when we try set it due to window managers in the OS.
Status: UNCONFIRMED → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.