Skip to content

Commit

Permalink
Updated WebDriver exception handling (#121)
Browse files Browse the repository at this point in the history
WebDriverCurlException was moved to Internal namespace and deprecated in php-webdriver/webdriver 1.14
  • Loading branch information
Naktibalda committed Feb 16, 2024
1 parent c1440b0 commit 9ac8cfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
"name": "Zaahid Bateson"
}
],
"minimum-stability": "dev",

"minimum-stability": "stable",
"require": {
"php": "^8.0",
"ext-json": "*",
"ext-mbstring": "*",
"codeception/codeception": "^5.0.0-RC2",
"codeception/codeception": "^5.0.0",
"codeception/lib-web": "^1.0.1",
"codeception/stub": "^4.0",
"php-webdriver/webdriver": "^1.8.0",
"php-webdriver/webdriver": "^1.14.0",
"phpunit/phpunit": "^9.5"
},
"suggest": {
Expand Down
4 changes: 2 additions & 2 deletions src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@
use Exception;
use Facebook\WebDriver\Cookie;
use Facebook\WebDriver\Cookie as WebDriverCookie;
use Facebook\WebDriver\Exception\Internal\UnexpectedResponseException;
use Facebook\WebDriver\Exception\InvalidElementStateException;
use Facebook\WebDriver\Exception\InvalidSelectorException;
use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\Exception\UnknownErrorException;
use Facebook\WebDriver\Exception\WebDriverCurlException;
use Facebook\WebDriver\Interactions\WebDriverActions;
use Facebook\WebDriver\Remote\LocalFileDetector;
use Facebook\WebDriver\Remote\RemoteWebDriver;
Expand Down Expand Up @@ -1686,7 +1686,7 @@ public function _initializeSession(): void

$this->setBaseElement();
$this->initialWindowSize();
} catch (WebDriverCurlException $exception) {
} catch (UnexpectedResponseException $exception) {
codecept_debug('Curl error: ' . $exception->getMessage());
throw new ConnectionException(
"Can't connect to WebDriver at {$this->wdHost}."
Expand Down

0 comments on commit 9ac8cfe

Please sign in to comment.