Skip to content

Commit

Permalink
Accept negative default window position.
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
joshbruning authored Aug 16, 2017
1 parent d453c86 commit 9c21bb6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions java/client/test/org/openqa/selenium/WindowTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ public void testGetsThePositionOfTheCurrentWindow() {
assumeFalse(TestUtilities.getEffectivePlatform(driver).is(ANDROID));
Point position = driver.manage().window().getPosition();

assertThat(position.x, is(greaterThanOrEqualTo(0)));
assertThat(position.y, is(greaterThanOrEqualTo(0)));
// 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).
assertThat(position.x, is(greaterThanOrEqualTo(-10)));
assertThat(position.y, is(greaterThanOrEqualTo(-10)));
}

@Test
Expand Down

0 comments on commit 9c21bb6

Please sign in to comment.