Skip to content

Commit

Permalink
Improving stability of the test
Browse files Browse the repository at this point in the history
  • Loading branch information
barancev committed Apr 28, 2017
1 parent 91f9f2a commit 7a75d41
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions java/client/test/org/openqa/selenium/ClickScrollingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated;
import static org.openqa.selenium.support.ui.ExpectedConditions.titleIs;
import static org.openqa.selenium.testing.Driver.ALL;
import static org.openqa.selenium.testing.Driver.CHROME;
Expand Down Expand Up @@ -239,6 +240,7 @@ public void testShouldNotScrollWhenGettingElementSize() {
}

private long getScrollTop() {
wait.until(presenceOfElementLocated(By.tagName("body")));
return (Long)((JavascriptExecutor)driver).executeScript("return document.body.scrollTop;");
}

Expand Down

0 comments on commit 7a75d41

Please sign in to comment.