вопрос, как можно перехватить исключение у SelenideElement?
например есть код
try {
return $(tableCell).exists() ? $(tableCell).getText() : "";
} catch (WebDriverException e){
logger.info(format("No text was found in specified location: row: %d cell: %d.\n" +
"Returning empty string!", row, cell));
return "";
}
при этом оно может упасть с
Element not found {tbody > tr:nth-of-type(1) > td:nth-of-type(4)}
Expected: exist
Caused by: NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"tbody > tr:nth-of-type(1) > td:nth-of-type(4)"}