Skip to content

Commit

Permalink
fix: catch ScriptTimeout exception into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis authored and robocoder committed Dec 8, 2023
1 parent 6ca447e commit a61a845
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/WebDriver/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
* @method void postAlert_text($jsonText) Sends keystrokes to a JavaScript prompt() dialog.
* @method void accept_alert() Accepts the currently displayed alert dialog.
* @method void dismiss_alert() Dismisses the currently displayed alert dialog.
* @method void moveto($jsonCoordinates) Move the mouse by an offset of the specified element (or current mouse cursor).
* @method void click($jsonButton) Click any mouse button (at the coordinates set by the last moveto command).
* @method void buttondown() Click and hold the left mouse button (at the coordinates set by the last moveto command).
* @method void buttonup() Releases the mouse button previously held (where the mouse is currently at).
Expand Down Expand Up @@ -305,7 +304,7 @@ public function moveto($parameters)
{
try {
$result = $this->curl('POST', '/moveto', $parameters);
} catch (WebDriverException\ScriptTimeout) {
} catch (WebDriverException\ScriptTimeout $e) {
throw WebDriverException::factory(WebDriverException::UNKNOWN_ERROR);
}

Expand Down

0 comments on commit a61a845

Please sign in to comment.