Class ErrorCodes

java.lang.Object
org.openqa.selenium.remote.ErrorCodes

@Deprecated public class ErrorCodes extends Object
Deprecated.
The JSON Wire Protocol is no longer used; use ErrorCodec for mapping between W3C states and exceptions. Removal is tracked by #17638 and is gated on providing a replacement extensibility seam for downstream consumers.
Defines common error codes for the wire protocol.
  • Field Details

    • SUCCESS_STRING

      public static final String SUCCESS_STRING
      Deprecated.
      See Also:
    • SUCCESS

      public static final int SUCCESS
      Deprecated.
      See Also:
    • NO_SUCH_SESSION

      public static final int NO_SUCH_SESSION
      Deprecated.
      See Also:
    • NO_SUCH_ELEMENT

      public static final int NO_SUCH_ELEMENT
      Deprecated.
      See Also:
    • NO_SUCH_FRAME

      public static final int NO_SUCH_FRAME
      Deprecated.
      See Also:
    • UNKNOWN_COMMAND

      public static final int UNKNOWN_COMMAND
      Deprecated.
      See Also:
    • STALE_ELEMENT_REFERENCE

      public static final int STALE_ELEMENT_REFERENCE
      Deprecated.
      See Also:
    • INVALID_ELEMENT_STATE

      public static final int INVALID_ELEMENT_STATE
      Deprecated.
      See Also:
    • UNHANDLED_ERROR

      public static final int UNHANDLED_ERROR
      Deprecated.
      See Also:
    • JAVASCRIPT_ERROR

      public static final int JAVASCRIPT_ERROR
      Deprecated.
      See Also:
    • XPATH_LOOKUP_ERROR

      public static final int XPATH_LOOKUP_ERROR
      Deprecated.
      See Also:
    • TIMEOUT

      public static final int TIMEOUT
      Deprecated.
      See Also:
    • NO_SUCH_WINDOW

      public static final int NO_SUCH_WINDOW
      Deprecated.
      See Also:
    • UNEXPECTED_ALERT_PRESENT

      public static final int UNEXPECTED_ALERT_PRESENT
      Deprecated.
      See Also:
    • NO_ALERT_PRESENT

      public static final int NO_ALERT_PRESENT
      Deprecated.
      See Also:
    • ASYNC_SCRIPT_TIMEOUT

      public static final int ASYNC_SCRIPT_TIMEOUT
      Deprecated.
      See Also:
    • INVALID_SELECTOR_ERROR

      public static final int INVALID_SELECTOR_ERROR
      Deprecated.
      See Also:
    • SESSION_NOT_CREATED

      public static final int SESSION_NOT_CREATED
      Deprecated.
      See Also:
    • MOVE_TARGET_OUT_OF_BOUNDS

      public static final int MOVE_TARGET_OUT_OF_BOUNDS
      Deprecated.
      See Also:
    • INVALID_XPATH_SELECTOR

      public static final int INVALID_XPATH_SELECTOR
      Deprecated.
      See Also:
    • INVALID_XPATH_SELECTOR_RETURN_TYPER

      public static final int INVALID_XPATH_SELECTOR_RETURN_TYPER
      Deprecated.
      See Also:
    • ELEMENT_NOT_INTERACTABLE

      public static final int ELEMENT_NOT_INTERACTABLE
      Deprecated.
      See Also:
    • INVALID_ARGUMENT

      public static final int INVALID_ARGUMENT
      Deprecated.
      See Also:
    • UNABLE_TO_CAPTURE_SCREEN

      public static final int UNABLE_TO_CAPTURE_SCREEN
      Deprecated.
      See Also:
    • ELEMENT_CLICK_INTERCEPTED

      public static final int ELEMENT_CLICK_INTERCEPTED
      Deprecated.
      See Also:
    • NO_SUCH_SHADOW_ROOT

      public static final int NO_SUCH_SHADOW_ROOT
      Deprecated.
      See Also:
    • METHOD_NOT_ALLOWED

      public static final int METHOD_NOT_ALLOWED
      Deprecated.
      See Also:
  • Constructor Details

    • ErrorCodes

      public ErrorCodes()
      Deprecated.
  • Method Details

    • toState

      public String toState(@Nullable Integer status)
      Deprecated.
    • toStatus

      public int toStatus(String webdriverState, Optional<Integer> httpStatus)
      Deprecated.
    • getHttpStatusCode

      public int getHttpStatusCode(Throwable throwable)
      Deprecated.
    • getExceptionType

      public @Nullable Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(int statusCode)
      Deprecated.
      Returns the exception type that corresponds to the given statusCode. All unrecognized status codes will be mapped to WebDriverException.class.
      Parameters:
      statusCode - The status code to convert.
      Returns:
      The exception type that corresponds to the provided status code or null if statusCode == 0.
    • getExceptionType

      public Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(String webdriverState)
      Deprecated.
    • toStatusCode

      public int toStatusCode(@Nullable Throwable e)
      Deprecated.
    • isMappableError

      public boolean isMappableError(@Nullable Throwable rootCause)
      Deprecated.