It's expected that an element might not be present...
... when waiting for the element to be present.
Closes
@@ -894,6 +894,8 @@ private static WebElement findElement(By by, WebDriver driver) {
try {
return driver.findElements(by).stream().findFirst().orElseThrow(
() -> new NoSuchElementException("Cannot locate an element using " + by));
+ } catch (NoSuchElementException e) {
+ throw e;
} catch (WebDriverException e) {
log.log(Level.WARNING,
String.format("WebDriverException thrown by findElement(%s)", by), e);
