We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a56db27 + 2fe6b36 commit 897e7d7Copy full SHA for 897e7d7
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;
@@ -372,6 +373,10 @@ private function applyTimeouts(): void
372
373
$this->getWebDriverSession()->timeouts($type, $param);
374
}
375
} catch (UnknownError $e) {
376
+ // Selenium 2.x.
377
+ throw new DriverException('Error setting timeout: ' . $e->getMessage(), 0, $e);
378
+ } catch (InvalidArgument $e) {
379
+ // Selenium 3.x.
380
throw new DriverException('Error setting timeout: ' . $e->getMessage(), 0, $e);
381
382
0 commit comments