From 247c792bf30e857ec440b9d3a9f1030cd8d3777c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Wed, 27 Sep 2023 15:33:16 +0200 Subject: [PATCH] Added missing exception to ElementAssert::isVisible --- src/lib/Browser/Element/Element.php | 3 +++ 1 file changed, 3 insertions(+) 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; } }