From a61a8459f86c79dd1f19934ea3929804f2e41f8c Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Fri, 8 Dec 2023 12:45:15 +0545 Subject: [PATCH] fix: catch ScriptTimeout exception into a variable --- lib/WebDriver/Session.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/WebDriver/Session.php b/lib/WebDriver/Session.php index 92c9b16..37ecff8 100644 --- a/lib/WebDriver/Session.php +++ b/lib/WebDriver/Session.php @@ -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). @@ -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); }