selenium.webdriver.remote.errorhandler

1. class selenium.webdriver.remote.errorhandler.ErrorCode

WebDriver 有线协议中定义的错误代码。

1.1. ELEMENT_CLICK_INTERCEPTED = [64, 'element click intercepted']

1.2. ELEMENT_IS_NOT_SELECTABLE = [15, 'element not selectable']

1.3. ELEMENT_NOT_INTERACTABLE = [60, 'element not interactable']

1.4. ELEMENT_NOT_VISIBLE = [11, 'element not visible']¶

1.5. IME_ENGINE_ACTIVATION_FAILED = [31, 'ime engine activation failed']

1.6. IME_NOT_AVAILABLE = [30, 'ime not available']

1.7. INSECURE_CERTIFICATE = ['insecure certificate']

1.8. INVALID_ARGUMENT = [61, 'invalid argument']

1.9. INVALID_COOKIE_DOMAIN = [24, 'invalid cookie domain']

1.10. INVALID_COORDINATES = ['invalid coordinates']

1.11. INVALID_ELEMENT_COORDINATES = [29, 'invalid element coordinates']

1.12. INVALID_ELEMENT_STATE = [12, 'invalid element state']

1.13. INVALID_SELECTOR = [32, 'invalid selector']

1.14. INVALID_SESSION_ID = ['invalid session id']

1.15. INVALID_XPATH_SELECTOR = [51, 'invalid selector']

1.16. INVALID_XPATH_SELECTOR_RETURN_TYPER = [52, 'invalid selector']

1.17. JAVASCRIPT_ERROR = [17, 'javascript error']

1.18. METHOD_NOT_ALLOWED = [405, 'unsupported operation']

1.19. MOVE_TARGET_OUT_OF_BOUNDS = [34, 'move target out of bounds']

1.20. NO_ALERT_OPEN = [27, 'no such alert']

1.21. NO_SUCH_COOKIE = [62, 'no such cookie']

1.22. NO_SUCH_ELEMENT = [7, 'no such element']

1.23. NO_SUCH_FRAME = [8, 'no such frame']

1.24. NO_SUCH_WINDOW = [23, 'no such window']

1.25. SCRIPT_TIMEOUT = [28, 'script timeout']

1.26. SESSION_NOT_CREATED = [33, 'session not created']

1.27. STALE_ELEMENT_REFERENCE = [10, 'stale element reference']

1.28. SUCCESS = 0

1.29. TIMEOUT = [21, 'timeout']

1.30. UNABLE_TO_CAPTURE_SCREEN = [63, 'unable to capture screen']

1.31. UNABLE_TO_SET_COOKIE = [25, 'unable to set cookie']

1.32. UNEXPECTED_ALERT_OPEN = [26, 'unexpected alert open']

1.33. UNKNOWN_COMMAND = [9, 'unknown command']

1.34. UNKNOWN_ERROR = [13, 'unknown error']

1.35. UNKNOWN_METHOD = ['unknown method exception']

1.36. XPATH_LOOKUP_ERROR = [19, 'invalid selector']

2. class selenium.webdriver.remote.errorhandler.ErrorHandler

处理 WebDriver 服务器返回的错误。

2.1. check_response(response)

检查来自 WebDriver 的 JSON 响应是否没有错误。

  • 参数:

    • response - 来自 WebDriver 服务器的 JSON 响应,作为字典对象。
  • Raises:

    如果响应包含错误消息。

© 2020 刘士. All rights reserved.

结果匹配 ""

    没有匹配的结果 ""