We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ca4083 commit 2fe6b36Copy full SHA for 2fe6b36
1 file changed
src/Selenium2Driver.php
@@ -14,6 +14,7 @@
14
use Behat\Mink\KeyModifier;
15
use Behat\Mink\Selector\Xpath\Escaper;
16
use WebDriver\Element;
17
+use WebDriver\Exception\InvalidArgument;
18
use WebDriver\Exception\NoSuchElement;
19
use WebDriver\Exception\StaleElementReference;
20
use WebDriver\Exception\UnknownCommand;
@@ -370,6 +371,10 @@ private function applyTimeouts(): void
370
371
$this->getWebDriverSession()->timeouts($type, $param);
372
}
373
} catch (UnknownError $e) {
374
+ // Selenium 2.x.
375
+ throw new DriverException('Error setting timeout: ' . $e->getMessage(), 0, $e);
376
+ } catch (InvalidArgument $e) {
377
+ // Selenium 3.x.
378
throw new DriverException('Error setting timeout: ' . $e->getMessage(), 0, $e);
379
380
0 commit comments