diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-09-28 01:21:19 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-09-28 01:21:19 +0300 |
commit | 048c0c1f6ecdbe2c1ac603e5b42c48e379334e7b (patch) | |
tree | a06d5ff898abc5c3ad211ed40d3755aacd845106 /test | |
parent | 9f3b4f04e98f686bfd58c31a2b6405bd1cf57708 (diff) |
Group multiple expeption catches into a single catch
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to 'test')
-rw-r--r-- | test/selenium/TestBase.php | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/test/selenium/TestBase.php b/test/selenium/TestBase.php index d526b12862..d3b3799fba 100644 --- a/test/selenium/TestBase.php +++ b/test/selenium/TestBase.php @@ -797,13 +797,7 @@ abstract class TestBase extends TestCase { try { $this->webDriver->findElement(WebDriverBy::$func($arg)); - } catch (NoSuchElementException $e) { - // Element not present - return false; - } catch (InvalidArgumentException $e) { - // Element not present - return false; - } catch (InvalidSelectorException $e) { + } catch (NoSuchElementException | InvalidArgumentException | InvalidSelectorException $e) { // Element not present return false; } |