Skip to content

Commit 9ac8cfe

Browse files
committed
Updated WebDriver exception handling (#121)
WebDriverCurlException was moved to Internal namespace and deprecated in php-webdriver/webdriver 1.14
1 parent c1440b0 commit 9ac8cfe

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
"name": "Zaahid Bateson"
1717
}
1818
],
19-
"minimum-stability": "dev",
20-
19+
"minimum-stability": "stable",
2120
"require": {
2221
"php": "^8.0",
2322
"ext-json": "*",
2423
"ext-mbstring": "*",
25-
"codeception/codeception": "^5.0.0-RC2",
24+
"codeception/codeception": "^5.0.0",
2625
"codeception/lib-web": "^1.0.1",
2726
"codeception/stub": "^4.0",
28-
"php-webdriver/webdriver": "^1.8.0",
27+
"php-webdriver/webdriver": "^1.14.0",
2928
"phpunit/phpunit": "^9.5"
3029
},
3130
"suggest": {

src/Codeception/Module/WebDriver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
use Exception;
3636
use Facebook\WebDriver\Cookie;
3737
use Facebook\WebDriver\Cookie as WebDriverCookie;
38+
use Facebook\WebDriver\Exception\Internal\UnexpectedResponseException;
3839
use Facebook\WebDriver\Exception\InvalidElementStateException;
3940
use Facebook\WebDriver\Exception\InvalidSelectorException;
4041
use Facebook\WebDriver\Exception\NoSuchElementException;
4142
use Facebook\WebDriver\Exception\UnknownErrorException;
42-
use Facebook\WebDriver\Exception\WebDriverCurlException;
4343
use Facebook\WebDriver\Interactions\WebDriverActions;
4444
use Facebook\WebDriver\Remote\LocalFileDetector;
4545
use Facebook\WebDriver\Remote\RemoteWebDriver;
@@ -1686,7 +1686,7 @@ public function _initializeSession(): void
16861686

16871687
$this->setBaseElement();
16881688
$this->initialWindowSize();
1689-
} catch (WebDriverCurlException $exception) {
1689+
} catch (UnexpectedResponseException $exception) {
16901690
codecept_debug('Curl error: ' . $exception->getMessage());
16911691
throw new ConnectionException(
16921692
"Can't connect to WebDriver at {$this->wdHost}."

0 commit comments

Comments
 (0)