You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -59,6 +46,15 @@ abstract class Exception extends \Exception
59
46
constINVALID_SELECTOR = 32;
60
47
constSESSION_NOT_CREATED = 33;
61
48
constMOVE_TARGET_OUT_OF_BOUNDS = 34;
49
+
constINVALID_XPATH_SELECTOR = 51;
50
+
constINVALID_XPATH_SELECTOR_RETURN_TYPER = 52;
51
+
constELEMENT_NOT_INTERACTABLE = 60;
52
+
constINVALID_ARGUMENT = 61;
53
+
constNO_SUCH_COOKIE = 62;
54
+
constUNABLE_TO_CAPTURE_SCREEN = 63;
55
+
constELEMENT_CLICK_INTERCEPTED = 64;
56
+
constNO_SUCH_SHADOW_ROOT = 65;
57
+
constMETHOD_NOT_ALLOWED = 405;
62
58
63
59
// obsolete
64
60
constINDEX_OUT_OF_BOUNDS = 1;
@@ -68,8 +64,10 @@ abstract class Exception extends \Exception
68
64
constNO_STRING_WRAPPER = 5;
69
65
constOBSOLETE_ELEMENT = 10;
70
66
constELEMENT_NOT_DISPLAYED = 11;
67
+
constELEMENT_NOT_VISIBLE = 11;
71
68
constUNHANDLED = 13;
72
69
constEXPECTED = 14;
70
+
constELEMENT_IS_NOT_SELECTABLE = 15;
73
71
constELEMENT_NOT_SELECTABLE = 15;
74
72
constNO_SUCH_DOCUMENT = 16;
75
73
constUNEXPECTED_JAVASCRIPT = 17;
@@ -123,6 +121,50 @@ abstract class Exception extends \Exception
123
121
self::UNEXPECTED_PARAMETERS => array('UnexpectedParameters', 'This command does not expect this number of parameters.'),
124
122
self::INVALID_REQUEST => array('InvalidRequest', 'This command does not support this HTTP request method.'),
125
123
self::UNKNOWN_LOCATOR_STRATEGY => array('UnknownLocatorStrategy', 'This locator strategy is not supported.'),
124
+
self::INVALID_XPATH_SELECTOR => array('InvalidSelector', 'Argument was an invalid selector.'),
125
+
self::INVALID_XPATH_SELECTOR_RETURN_TYPER => array('InvalidSelector', 'Argument was an invalid selector.'),
126
+
self::ELEMENT_NOT_INTERACTABLE => array('ElementNotInteractable', 'A command could not be completed because the element is not pointer- or keyboard interactable.'),
127
+
self::INVALID_ARGUMENT => array('InvalidArgument', 'The arguments passed to a command are either invalid or malformed.'),
128
+
self::NO_SUCH_COOKIE => array('NoSuchCookie', 'No cookie matching the given path name was found amongst the associated cookies of the current browsing context\'s active document.'),
129
+
self::UNABLE_TO_CAPTURE_SCREEN => array('UnableToCaptureScreen', 'A screen capture was made impossible.'),
130
+
self::ELEMENT_CLICK_INTERCEPTED => array('ElementClickIntercepted', 'The Element Click command could not be completed because the element receiving the events is obscuring the element that was requested clicked.'),
131
+
self::NO_SUCH_SHADOW_ROOT => array('NoSuchShadowRoot', 'The element does not have a shadow root.'),
132
+
self::METHOD_NOT_ALLOWED => array('UnsupportedOperation', 'Indicates that a command that should have executed properly cannot be supported for some reason.'),
133
+
134
+
// @ss https://w3c.github.io/webdriver/#errors
135
+
'element not interactable' => array('ElementNotInteractable', 'A command could not be completed because the element is not pointer- or keyboard interactable.'),
136
+
'element not selectable' => array('ElementIsNotSelectable', 'An attempt was made to select an element that cannot be selected.'),
137
+
'insecure certificate' => array('InsecureCertificate', 'Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired or invalid TLS certificate.'),
138
+
'invalid argument' => array('InvalidArgument', 'The arguments passed to a command are either invalid or malformed.'),
139
+
'invalid cookie domain' => array('InvalidCookieDomain', 'An illegal attempt was made to set a cookie under a different domain than the current page.'),
140
+
'invalid coordinates' => array('InvalidCoordinates', 'The coordinates provided to an interactions operation are invalid.'),
141
+
'invalid element state' => array('InvalidElementState', 'A command could not be completed because the element is in an invalid state, e.g. attempting to clear an element that isn\'t both editable and resettable.'),
142
+
'invalid selector' => array('InvalidSelector', 'Argument was an invalid selector.'),
143
+
'invalid session id' => array('InvalidSessionID', 'Occurs if the given session id is not in the list of active sessions, meaning the session either does not exist or that it\'s not active.'),
144
+
'javascript error' => array('JavaScriptError', 'An error occurred while executing JavaScript supplied by the user.'),
145
+
'move target out of bounds' => array('MoveTargetOutOfBounds', 'The target for mouse interaction is not in the browser\'s viewport and cannot be brought into that viewport.'),
146
+
'no such alert' => array('NoSuchAlert', 'An attempt was made to operate on a modal dialog when one was not open.'),
147
+
'no such cookie' => array('NoSuchCookie', 'No cookie matching the given path name was found amongst the associated cookies of the current browsing context\'s active document.'),
148
+
'no such element' => array('NoSuchElement', 'An element could not be located on the page using the given search parameters.'),
149
+
'no such frame' => array('NoSuchFrame', 'A command to switch to a frame could not be satisfied because the frame could not be found.'),
150
+
'no such window' => array('NoSuchWindow', 'A command to switch to a window could not be satisfied because the window could not be found.'),
151
+
'script timeout' => array('ScriptTimeout', 'A script did not complete before its timeout expired.'),
152
+
'session not created' => array('SessionNotCreated', 'A new session could not be created.'),
153
+
'stale element reference' => array('StaleElementReference', 'A command failed because the referenced element is no longer attached to the DOM.'),
154
+
'timeout' => array('Timeout', 'An operation did not complete before its timeout expired.'),
155
+
'unable to capture screen' => array('UnableToCaptureScreen', 'A screen capture was made impossible.'),
156
+
'unable to set cookie' => array('UnableToSetCookie', 'A command to set a cookie\'s value could not be satisfied.'),
157
+
'unexpected alert open' => array('UnexpectedAlertOpen', 'A modal dialog was open, blocking this operation.'),
158
+
'unknown command' => array('UnknownCommand', 'A command could not be executed because the remote end is not aware of it.'),
159
+
'unknown error' => array('UnknownError', 'An unknown error occurred in the remote end while processing the command.'),
160
+
'unknown method' => array('UnknownMethod', 'The requested command matched a known URL but did not match an method for that URL.'),
161
+
'unsupported operation' => array('UnsupportedOperation', 'Indicates that a command that should have executed properly cannot be supported for some reason.'),
162
+
163
+
// obsolete
164
+
'detached shadow root' => array('DetachedShadowRoot', 'A command failed because the referenced shadow root is no longer attached to the DOM.'),
165
+
'element click intercepted' => array('ElementClickIntercepted', 'The Element Click command could not be completed because the element receiving the events is obscuring the element that was requested clicked.'),
166
+
'no such shadow root' => array('NoSuchShadowRoot', 'The element does not have a shadow root.'),
167
+
'script timeout error' => array('ScriptTimeout', 'A script did not complete before its timeout expired.'),
126
168
);
127
169
128
170
/**
@@ -143,7 +185,7 @@ public static function factory($code, $message = null, $previousException = null
0 commit comments