diff --git a/src/lib/Browser/Element/Element.php b/src/lib/Browser/Element/Element.php index 30218d5c..738450ee 100644 --- a/src/lib/Browser/Element/Element.php +++ b/src/lib/Browser/Element/Element.php @@ -10,6 +10,7 @@ use Behat\Mink\Element\NodeElement; use Behat\Mink\Session; +use Facebook\WebDriver\Exception\StaleElementReferenceException; use Ibexa\Behat\Browser\Assert\ElementAssert; use Ibexa\Behat\Browser\Assert\ElementAssertInterface; use Ibexa\Behat\Browser\Element\Factory\ElementFactoryInterface; @@ -37,6 +38,8 @@ public function isVisible(): bool return false; } catch (NoSuchElement $element) { return false; + } catch (StaleElementReferenceException $e) { + return false; } }