Im trying the code below but it seems it does not work... Can someone show me the best way to do this?
public void verifyThatCommentDeleted(final String text
public boolean isDisplayed(WebElement element) { try { return element.isDisplayed(); } catch (NoSuchElementException e) { return false; } }
If you wan t to check that element is displayed on the page your check should be:
if(isDisplayed(yourElement){ ... } else{ ... }