Skip to content

Commit

Permalink
fixup! Added missing exception to ElementAssert::isVisible
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed Sep 28, 2023
1 parent f0056ab commit ea1c88c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib/Browser/Element/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@

use Behat\Mink\Element\NodeElement;
use Behat\Mink\Session;
use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\Exception\StaleElementReferenceException;
use Ibexa\Behat\Browser\Assert\ElementAssert;
use Ibexa\Behat\Browser\Assert\ElementAssertInterface;
use Ibexa\Behat\Browser\Element\Factory\ElementFactoryInterface;
use Ibexa\Behat\Browser\Locator\LocatorInterface;
use Webdriver\Exception\NoSuchElement;
use WebDriver\Exception\StaleElementReference;

final class Element extends BaseElement implements ElementInterface
{
Expand All @@ -34,9 +33,7 @@ public function isVisible(): bool
{
try {
return $this->decoratedElement->isVisible();
} catch (StaleElementReference $e) {
return false;
} catch (NoSuchElement $element) {
} catch (NoSuchElementException $element) {
return false;
} catch (StaleElementReferenceException $e) {
return false;
Expand Down

0 comments on commit ea1c88c

Please sign in to comment.