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 authored Feb 16, 2024
1 parent 5cda403 commit 68bd128
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"codeception/codeception": "^5.0.8",
"codeception/lib-web": "^1.0.1",
"codeception/stub": "^4.0",
"php-webdriver/webdriver": "^1.8.0",
"php-webdriver/webdriver": "^1.14.0",
"phpunit/phpunit": "^10.0 || ^11.0"
},
"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 @@ -1688,7 +1688,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 68bd128

Please sign in to comment.