Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. protected boolean isElementPresent(By selector) {
  2. selenium.manage().timeouts().implicitlyWait(1, TimeUnit.SECONDS);
  3. logger.debug("Is element present"+selector);
  4. boolean returnVal = true;
  5. try{
  6. selenium.findElement(selector);
  7. } catch (NoSuchElementException e){
  8. returnVal = false;
  9. } finally {
  10. selenium.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
  11. }
  12. return returnVal;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement