Skip to content

Instantly share code, notes, and snippets.

@LenarBad
Created August 7, 2015 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LenarBad/0fb7be8051cb6188d0f7 to your computer and use it in GitHub Desktop.
Save LenarBad/0fb7be8051cb6188d0f7 to your computer and use it in GitHub Desktop.
Test
public void forExistence(final By by) {
(new WebDriverWait(driver, AppProps.TIME_OUT))
.until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return d.findElements(by).size() > 0;
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment