Package org.openqa.selenium.remote
Class ErrorCodes
java.lang.Object
org.openqa.selenium.remote.ErrorCodes
Defines common error codes for the wire protocol.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final String
static final int
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends org.openqa.selenium.WebDriverException>
getExceptionType
(int statusCode) Returns the exception type that corresponds to the givenstatusCode
.Class<? extends org.openqa.selenium.WebDriverException>
getExceptionType
(String webdriverState) int
getHttpStatusCode
(Throwable throwable) boolean
isMappableError
(Throwable rootCause) int
int
-
Field Details
-
SUCCESS_STRING
- See Also:
-
SUCCESS
public static final int SUCCESS- See Also:
-
NO_SUCH_SESSION
public static final int NO_SUCH_SESSION- See Also:
-
NO_SUCH_ELEMENT
public static final int NO_SUCH_ELEMENT- See Also:
-
NO_SUCH_FRAME
public static final int NO_SUCH_FRAME- See Also:
-
UNKNOWN_COMMAND
public static final int UNKNOWN_COMMAND- See Also:
-
STALE_ELEMENT_REFERENCE
public static final int STALE_ELEMENT_REFERENCE- See Also:
-
INVALID_ELEMENT_STATE
public static final int INVALID_ELEMENT_STATE- See Also:
-
UNHANDLED_ERROR
public static final int UNHANDLED_ERROR- See Also:
-
JAVASCRIPT_ERROR
public static final int JAVASCRIPT_ERROR- See Also:
-
XPATH_LOOKUP_ERROR
public static final int XPATH_LOOKUP_ERROR- See Also:
-
TIMEOUT
public static final int TIMEOUT- See Also:
-
NO_SUCH_WINDOW
public static final int NO_SUCH_WINDOW- See Also:
-
INVALID_COOKIE_DOMAIN
public static final int INVALID_COOKIE_DOMAIN- See Also:
-
UNABLE_TO_SET_COOKIE
public static final int UNABLE_TO_SET_COOKIE- See Also:
-
UNEXPECTED_ALERT_PRESENT
public static final int UNEXPECTED_ALERT_PRESENT- See Also:
-
NO_ALERT_PRESENT
public static final int NO_ALERT_PRESENT- See Also:
-
ASYNC_SCRIPT_TIMEOUT
public static final int ASYNC_SCRIPT_TIMEOUT- See Also:
-
INVALID_SELECTOR_ERROR
public static final int INVALID_SELECTOR_ERROR- See Also:
-
SESSION_NOT_CREATED
public static final int SESSION_NOT_CREATED- See Also:
-
MOVE_TARGET_OUT_OF_BOUNDS
public static final int MOVE_TARGET_OUT_OF_BOUNDS- See Also:
-
INVALID_XPATH_SELECTOR
public static final int INVALID_XPATH_SELECTOR- See Also:
-
INVALID_XPATH_SELECTOR_RETURN_TYPER
public static final int INVALID_XPATH_SELECTOR_RETURN_TYPER- See Also:
-
ELEMENT_NOT_INTERACTABLE
public static final int ELEMENT_NOT_INTERACTABLE- See Also:
-
INVALID_ARGUMENT
public static final int INVALID_ARGUMENT- See Also:
-
NO_SUCH_COOKIE
public static final int NO_SUCH_COOKIE- See Also:
-
UNABLE_TO_CAPTURE_SCREEN
public static final int UNABLE_TO_CAPTURE_SCREEN- See Also:
-
ELEMENT_CLICK_INTERCEPTED
public static final int ELEMENT_CLICK_INTERCEPTED- See Also:
-
NO_SUCH_SHADOW_ROOT
public static final int NO_SUCH_SHADOW_ROOT- See Also:
-
METHOD_NOT_ALLOWED
public static final int METHOD_NOT_ALLOWED- See Also:
-
-
Constructor Details
-
ErrorCodes
public ErrorCodes()
-
-
Method Details
-
toState
-
toStatus
-
getHttpStatusCode
-
getExceptionType
Returns the exception type that corresponds to the givenstatusCode
. All unrecognized status codes will be mapped toWebDriverException.class
.- Parameters:
statusCode
- The status code to convert.- Returns:
- The exception type that corresponds to the provided status code or
null
ifstatusCode == 0
.
-
getExceptionType
-
toStatusCode
-
isMappableError
-