Skip to content

Commit 0863b22

Browse files
committed
Fixing error codes to match W3C standard, see w3c/webdriver@d678562
1 parent 807b4f5 commit 0863b22

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

java/client/src/org/openqa/selenium/remote/ErrorCodes.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,14 @@ public boolean isMappableError(Throwable rootCause) {
231231
.add(new KnownError(METHOD_NOT_ALLOWED, "unknown method", 405, UnsupportedCommandException.class, false, true))
232232
.add(new KnownError(METHOD_NOT_ALLOWED, "unsupported operation", 500, UnsupportedCommandException.class, false, true))
233233
.add(new KnownError(MOVE_TARGET_OUT_OF_BOUNDS, "move target out of bounds", 500, MoveTargetOutOfBoundsException.class, true, true))
234-
.add(new KnownError(NO_ALERT_PRESENT, "no such alert", 400, NoAlertPresentException.class, true, true))
234+
.add(new KnownError(NO_ALERT_PRESENT, "no such alert", 404, NoAlertPresentException.class, true, true))
235235
.add(new KnownError(NO_SUCH_COOKIE, "no such cookie", 404, NoSuchCookieException.class, true, true))
236236
.add(new KnownError(NO_SUCH_ELEMENT, "no such element", 404, NoSuchElementException.class, true, true))
237-
.add(new KnownError(NO_SUCH_FRAME, "no such frame", 400, NoSuchFrameException.class, true, true))
237+
.add(new KnownError(NO_SUCH_FRAME, "no such frame", 404, NoSuchFrameException.class, true, true))
238238
.add(new KnownError(NO_SUCH_SESSION, "invalid session id", 404, NoSuchSessionException.class, true, true))
239-
.add(new KnownError(NO_SUCH_WINDOW, "no such window", 400, NoSuchWindowException.class, true, true))
239+
.add(new KnownError(NO_SUCH_WINDOW, "no such window", 404, NoSuchWindowException.class, true, true))
240240
.add(new KnownError(SESSION_NOT_CREATED, "session not created", 500, SessionNotCreatedException.class ,true, true))
241-
.add(new KnownError(STALE_ELEMENT_REFERENCE, "stale element reference", 400, StaleElementReferenceException.class, true, true))
241+
.add(new KnownError(STALE_ELEMENT_REFERENCE, "stale element reference", 404, StaleElementReferenceException.class, true, true))
242242
.add(new KnownError(TIMEOUT, "timeout", 408, TimeoutException.class, true, true))
243243
.add(new KnownError(XPATH_LOOKUP_ERROR, "invalid selector", 400, InvalidSelectorException.class, false, false))
244244
.add(new KnownError(UNABLE_TO_CAPTURE_SCREEN, "unable to capture screen", 500, ScreenshotException.class, true, true))

0 commit comments

Comments
 (0)