diff --git a/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java b/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java index 75c6171b8a519..5f2cb495eb338 100644 --- a/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java +++ b/java/client/src/org/openqa/selenium/support/ui/ExpectedConditions.java @@ -1346,7 +1346,7 @@ public String toString() { private static boolean isInvisible(final WebElement element) { try { return !element.isDisplayed(); - } catch (StaleElementReferenceException ignored) { + } catch (StaleElementReferenceException | NoSuchElementException ignored) { // We can assume a stale element isn't displayed. return true; }