Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. public static boolean isElementVisible(WebElement element, int timeOutInSeconds) {
  2. try {
  3. WebDriverWait wait = new WebDriverWait(driver, timeOutInSeconds);
  4. wait.until(ExpectedConditions.visibilityOf(element));
  5. return true;
  6. } catch (NoSuchElementException e) {
  7. return false;
  8. } catch (Exception e1) {
  9. return false;
  10. }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement