Skip to content

Instantly share code, notes, and snippets.

@seleniumgists
Created July 11, 2019 08:12
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 seleniumgists/5fc9c15f40650970657e6ff022916a98 to your computer and use it in GitHub Desktop.
Save seleniumgists/5fc9c15f40650970657e6ff022916a98 to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
public static ExpectedCondition<Boolean> elementNotPresent(By selector) {
return new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver driver) {
return driver.findElements(selector).size() == 0;
}
@Override
public String toString() {
return selector.toString() + " to disappear";
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment