selenium.webdriver.remote.errorhandler

Classes

ErrorCode Error codes defined in the WebDriver wire protocol.
ErrorHandler Handles errors returned by the WebDriver server.
class selenium.webdriver.remote.errorhandler.ErrorCode[source]

Error codes defined in the WebDriver wire protocol.

ELEMENT_CLICK_INTERCEPTED = [64, 'element click intercepted']
ELEMENT_IS_NOT_SELECTABLE = [15, 'element not selectable']
ELEMENT_NOT_INTERACTABLE = [60, 'element not interactable']
ELEMENT_NOT_VISIBLE = [11, 'element not visible']
IME_ENGINE_ACTIVATION_FAILED = [31, 'ime engine activation failed']
IME_NOT_AVAILABLE = [30, 'ime not available']
INSECURE_CERTIFICATE = ['insecure certificate']
INVALID_ARGUMENT = [61, 'invalid argument']
INVALID_COORDINATES = ['invalid coordinates']
INVALID_ELEMENT_COORDINATES = [29, 'invalid element coordinates']
INVALID_ELEMENT_STATE = [12, 'invalid element state']
INVALID_SELECTOR = [32, 'invalid selector']
INVALID_SESSION_ID = ['invalid session id']
INVALID_XPATH_SELECTOR = [51, 'invalid selector']
INVALID_XPATH_SELECTOR_RETURN_TYPER = [52, 'invalid selector']
JAVASCRIPT_ERROR = [17, 'javascript error']
METHOD_NOT_ALLOWED = [405, 'unsupported operation']
MOVE_TARGET_OUT_OF_BOUNDS = [34, 'move target out of bounds']
NO_ALERT_OPEN = [27, 'no such alert']
NO_SUCH_ELEMENT = [7, 'no such element']
NO_SUCH_FRAME = [8, 'no such frame']
NO_SUCH_SHADOW_ROOT = ['no such shadow root']
NO_SUCH_WINDOW = [23, 'no such window']
SCRIPT_TIMEOUT = [28, 'script timeout']
SESSION_NOT_CREATED = [33, 'session not created']
STALE_ELEMENT_REFERENCE = [10, 'stale element reference']
SUCCESS = 0
TIMEOUT = [21, 'timeout']
UNABLE_TO_CAPTURE_SCREEN = [63, 'unable to capture screen']
UNEXPECTED_ALERT_OPEN = [26, 'unexpected alert open']
UNKNOWN_COMMAND = [9, 'unknown command']
UNKNOWN_ERROR = [13, 'unknown error']
UNKNOWN_METHOD = ['unknown method exception']
XPATH_LOOKUP_ERROR = [19, 'invalid selector']
class selenium.webdriver.remote.errorhandler.ErrorHandler[source]

Handles errors returned by the WebDriver server.

check_response(response: Dict[str, Any]) → None[source]

Checks that a JSON response from the WebDriver does not have an error.

Args:
  • response - The JSON response from the WebDriver server as a dictionary object.
Raises:

If the response contains an error message.

class selenium.webdriver.remote.errorhandler.ExceptionMapping[source]

:Maps each errorcode in ErrorCode object to corresponding exception Please refer to https://www.w3.org/TR/webdriver2/#errors for w3c specification

ELEMENT_CLICK_INTERCEPTED

alias of selenium.common.exceptions.ElementClickInterceptedException

ELEMENT_IS_NOT_SELECTABLE

alias of selenium.common.exceptions.ElementNotSelectableException

ELEMENT_NOT_INTERACTABLE

alias of selenium.common.exceptions.ElementNotInteractableException

ELEMENT_NOT_VISIBLE

alias of selenium.common.exceptions.ElementNotVisibleException

IME_ENGINE_ACTIVATION_FAILED

alias of selenium.common.exceptions.ImeActivationFailedException

IME_NOT_AVAILABLE

alias of selenium.common.exceptions.ImeNotAvailableException

INSECURE_CERTIFICATE

alias of selenium.common.exceptions.InsecureCertificateException

INVALID_ARGUMENT

alias of selenium.common.exceptions.InvalidArgumentException

alias of selenium.common.exceptions.InvalidCookieDomainException

INVALID_COORDINATES

alias of selenium.common.exceptions.InvalidCoordinatesException

INVALID_ELEMENT_STATE

alias of selenium.common.exceptions.InvalidElementStateException

INVALID_SELECTOR

alias of selenium.common.exceptions.InvalidSelectorException

INVALID_SESSION_ID

alias of selenium.common.exceptions.InvalidSessionIdException

INVALID_XPATH_SELECTOR

alias of selenium.common.exceptions.InvalidSelectorException

INVALID_XPATH_SELECTOR_RETURN_TYPER

alias of selenium.common.exceptions.InvalidSelectorException

JAVASCRIPT_ERROR

alias of selenium.common.exceptions.JavascriptException

MOVE_TARGET_OUT_OF_BOUNDS

alias of selenium.common.exceptions.MoveTargetOutOfBoundsException

NO_ALERT_OPEN

alias of selenium.common.exceptions.NoAlertPresentException

alias of selenium.common.exceptions.NoSuchCookieException

NO_SUCH_ELEMENT

alias of selenium.common.exceptions.NoSuchElementException

NO_SUCH_FRAME

alias of selenium.common.exceptions.NoSuchFrameException

NO_SUCH_SHADOW_ROOT

alias of selenium.common.exceptions.NoSuchShadowRootException

NO_SUCH_WINDOW

alias of selenium.common.exceptions.NoSuchWindowException

SCRIPT_TIMEOUT

alias of selenium.common.exceptions.TimeoutException

SESSION_NOT_CREATED

alias of selenium.common.exceptions.SessionNotCreatedException

STALE_ELEMENT_REFERENCE

alias of selenium.common.exceptions.StaleElementReferenceException

TIMEOUT

alias of selenium.common.exceptions.TimeoutException

UNABLE_TO_CAPTURE_SCREEN

alias of selenium.common.exceptions.ScreenshotException

alias of selenium.common.exceptions.UnableToSetCookieException

UNEXPECTED_ALERT_OPEN

alias of selenium.common.exceptions.UnexpectedAlertPresentException

UNKNOWN_ERROR

alias of selenium.common.exceptions.WebDriverException

UNKNOWN_METHOD

alias of selenium.common.exceptions.UnknownMethodException