Skip to content

Commit 9c21bb6

Browse files
authored
Accept negative default window position.
Accept negative default window position. If the Chrome under test is launched by default as maximized, the window coordinates may have small negative values (note that elements in the viewport are, of course, still clickable).
1 parent d453c86 commit 9c21bb6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

java/client/test/org/openqa/selenium/WindowTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,11 @@ public void testGetsThePositionOfTheCurrentWindow() {
9898
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
9999
Point position = driver.manage().window().getPosition();
100100

101-
assertThat(position.x, is(greaterThanOrEqualTo(0)));
102-
assertThat(position.y, is(greaterThanOrEqualTo(0)));
101+
// If the Chrome under test is launched by default as maximized, the window
102+
// coordinates may have small negative values (note that elements in the
103+
// viewport are, of course, still clickable).
104+
assertThat(position.x, is(greaterThanOrEqualTo(-10)));
105+
assertThat(position.y, is(greaterThanOrEqualTo(-10)));
103106
}
104107

105108
@Test

0 commit comments

Comments
 (0)