public class ErrorCodes extends Object
| 构造器和说明 |
|---|
ErrorCodes() |
| 限定符和类型 | 方法和说明 |
|---|---|
Class<? extends WebDriverException> |
getExceptionType(int statusCode)
Returns the exception type that corresponds to the given
statusCode. |
Class<? extends WebDriverException> |
getExceptionType(String webdriverState) |
boolean |
isMappableError(Throwable rootCause) |
String |
toState(Integer status) |
int |
toStatus(String webdriverState,
Optional<Integer> httpStatus) |
int |
toStatusCode(Throwable e) |
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
public Class<? extends 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 Class<? extends WebDriverException> getExceptionType(String webdriverState)
public int toStatusCode(Throwable e)
public boolean isMappableError(Throwable rootCause)