Привет. Подскажите как реализовать ?
Есть метод:
public boolean isElementPresent(String elemXpath) {
try {
$(By.xpath(elemXpath)).shouldBe(exist).shouldBe(visible);
return true;
} catch (Exception e) {
return false;
}
}
Но селенид кидает ошибку Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"
А мне нужно ны выходе получить true false