Skip to content

Instantly share code, notes, and snippets.

@brobles82
Created January 29, 2020 19:47
Show Gist options
  • Save brobles82/59bc19a65180643d9fa131830624c084 to your computer and use it in GitHub Desktop.
Save brobles82/59bc19a65180643d9fa131830624c084 to your computer and use it in GitHub Desktop.
public static void click(WebElement webElement) {
WebDriverWait wait = new WebDriverWait(driver(), 30);
ExpectedCondition<Boolean> elementIsClickable = arg0 -> {
try {
webElement.click();
return true;
} catch (Exception e) {
return false;
}
};
wait.until(elementIsClickable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment