Fixing error codes to match W3C standard, see
@@ -231,14 +231,14 @@ public boolean isMappableError(Throwable rootCause) {
.add(new KnownError(METHOD_NOT_ALLOWED, "unknown method", 405, UnsupportedCommandException.class, false, true))
.add(new KnownError(METHOD_NOT_ALLOWED, "unsupported operation", 500, UnsupportedCommandException.class, false, true))
.add(new KnownError(MOVE_TARGET_OUT_OF_BOUNDS, "move target out of bounds", 500, MoveTargetOutOfBoundsException.class, true, true))
- .add(new KnownError(NO_ALERT_PRESENT, "no such alert", 400, NoAlertPresentException.class, true, true))
+ .add(new KnownError(NO_ALERT_PRESENT, "no such alert", 404, NoAlertPresentException.class, true, true))
.add(new KnownError(NO_SUCH_COOKIE, "no such cookie", 404, NoSuchCookieException.class, true, true))
.add(new KnownError(NO_SUCH_ELEMENT, "no such element", 404, NoSuchElementException.class, true, true))
- .add(new KnownError(NO_SUCH_FRAME, "no such frame", 400, NoSuchFrameException.class, true, true))
+ .add(new KnownError(NO_SUCH_FRAME, "no such frame", 404, NoSuchFrameException.class, true, true))
.add(new KnownError(NO_SUCH_SESSION, "invalid session id", 404, NoSuchSessionException.class, true, true))
- .add(new KnownError(NO_SUCH_WINDOW, "no such window", 400, NoSuchWindowException.class, true, true))
+ .add(new KnownError(NO_SUCH_WINDOW, "no such window", 404, NoSuchWindowException.class, true, true))
.add(new KnownError(SESSION_NOT_CREATED, "session not created", 500, SessionNotCreatedException.class ,true, true))
- .add(new KnownError(STALE_ELEMENT_REFERENCE, "stale element reference", 400, StaleElementReferenceException.class, true, true))
+ .add(new KnownError(STALE_ELEMENT_REFERENCE, "stale element reference", 404, StaleElementReferenceException.class, true, true))
.add(new KnownError(TIMEOUT, "timeout", 408, TimeoutException.class, true, true))
.add(new KnownError(XPATH_LOOKUP_ERROR, "invalid selector", 400, InvalidSelectorException.class, false, false))
.add(new KnownError(UNABLE_TO_CAPTURE_SCREEN, "unable to capture screen", 500, ScreenshotException.class, true, true))
