Advertisement
Atanasov_88

Untitled

Dec 27th, 2016
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.22 KB | None | 0 0
  1.  try {
  2.         driver.findElement(By.linkText(text));
  3.         fail("Link with text <" + text + "> is present");
  4.     } catch (NoSuchElementException ex) {
  5.         /* do nothing, link is not present, assert is passed */
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement