public class ErrorCodes
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
private static class |
ErrorCodes.KnownError |
Constructor and Description |
---|
ErrorCodes() |
Modifier and Type | Method and Description |
---|---|
java.lang.Class<? extends org.openqa.selenium.WebDriverException> |
getExceptionType(int statusCode)
Returns the exception type that corresponds to the given
statusCode . |
java.lang.Class<? extends org.openqa.selenium.WebDriverException> |
getExceptionType(java.lang.String webdriverState) |
boolean |
isMappableError(java.lang.Throwable rootCause) |
java.lang.String |
toState(java.lang.Integer status) |
int |
toStatus(java.lang.String webdriverState,
java.util.Optional<java.lang.Integer> httpStatus) |
int |
toStatusCode(java.lang.Throwable e) |
@Beta public static final java.lang.String SUCCESS_STRING
public static final int SUCCESS
public static final int NO_SUCH_SESSION
public static final int NO_SUCH_ELEMENT
public static final int NO_SUCH_FRAME
public static final int UNKNOWN_COMMAND
public static final int STALE_ELEMENT_REFERENCE
public static final int ELEMENT_NOT_VISIBLE
public static final int INVALID_ELEMENT_STATE
public static final int UNHANDLED_ERROR
public static final int ELEMENT_NOT_SELECTABLE
public static final int JAVASCRIPT_ERROR
public static final int XPATH_LOOKUP_ERROR
public static final int TIMEOUT
public static final int NO_SUCH_WINDOW
public static final int INVALID_COOKIE_DOMAIN
public static final int UNABLE_TO_SET_COOKIE
public static final int UNEXPECTED_ALERT_PRESENT
public static final int NO_ALERT_PRESENT
public static final int ASYNC_SCRIPT_TIMEOUT
public static final int INVALID_ELEMENT_COORDINATES
public static final int IME_NOT_AVAILABLE
public static final int IME_ENGINE_ACTIVATION_FAILED
public static final int INVALID_SELECTOR_ERROR
public static final int SESSION_NOT_CREATED
public static final int MOVE_TARGET_OUT_OF_BOUNDS
public static final int INVALID_XPATH_SELECTOR
public static final int INVALID_XPATH_SELECTOR_RETURN_TYPER
public static final int ELEMENT_NOT_INTERACTABLE
public static final int INVALID_ARGUMENT
public static final int NO_SUCH_COOKIE
public static final int UNABLE_TO_CAPTURE_SCREEN
public static final int METHOD_NOT_ALLOWED
private static final java.util.logging.Logger log
private static final com.google.common.collect.ImmutableSet<ErrorCodes.KnownError> KNOWN_ERRORS
public java.lang.String toState(java.lang.Integer status)
public int toStatus(java.lang.String webdriverState, java.util.Optional<java.lang.Integer> httpStatus)
public java.lang.Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(int statusCode)
statusCode
. All unrecognized
status codes will be mapped to WebDriverException.class
.statusCode
- The status code to convert.null
if
statusCode == 0
.public java.lang.Class<? extends org.openqa.selenium.WebDriverException> getExceptionType(java.lang.String webdriverState)
public int toStatusCode(java.lang.Throwable e)
public boolean isMappableError(java.lang.Throwable rootCause)