'isInvisible()' returns true on 'NoSuchElementException'
The 'isInvisible()' method, when encountered with
'NoSuchElementException' causes 'TimeoutException',
whereas, it should return true.
Because if the element id not in DOM, it should be treated as invisible
Fixes
@@ -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;
}
