Module: Selenium::WebDriver::Error

Defined in:
lib/selenium/webdriver/common/error.rb,
lib/selenium/webdriver/remote/server_error.rb

Defined Under Namespace

Classes: ElementNotDisplayedError, ElementNotSelectableError, ExpectedError, IndexOutOfBoundsError, InvalidCookieDomainError, InvalidElementCoordinatesError, InvalidElementStateError, NoCollectionError, NoScriptResultError, NoStringError, NoStringLengthError, NoStringWrapperError, NoSuchCollectionError, NoSuchDocumentError, NoSuchDriverError, NoSuchElementError, NoSuchFrameError, NoSuchWindowError, NullPointerError, ObsoleteElementError, ServerError, TimeOutError, UnableToSetCookieError, UnexpectedJavascriptError, UnhandledError, UnknownCommandError, UnsupportedOperationError, WebDriverError, XPathLookupError

Constant Summary collapse

Errors =
[
  IndexOutOfBoundsError,
  NoCollectionError,
  NoStringError,
  NoStringLengthError,
  NoStringWrapperError,
  NoSuchDriverError,
  NoSuchElementError,
  NoSuchFrameError,
  UnknownCommandError,
  ObsoleteElementError,
  ElementNotDisplayedError,
  InvalidElementStateError,
  UnhandledError,
  ExpectedError,
  ElementNotSelectableError,
  NoSuchDocumentError,
  UnexpectedJavascriptError,
  NoScriptResultError,
  XPathLookupError,
  NoSuchCollectionError,
  TimeOutError,
  NullPointerError,
  NoSuchWindowError,
  InvalidCookieDomainError,
  UnableToSetCookieError,
  nil,                            # not used
  nil,                            # not used
  TimeOutError,                   # repeated.
  InvalidElementCoordinatesError
]

Class Method Summary collapse

Class Method Details

.for_code(code) ⇒ Object



70
71
72
73
74
# File 'lib/selenium/webdriver/common/error.rb', line 70

def for_code(code)
  return if code == 0

  Errors[code - 1] || WebDriverError
end