module Selenium::WebDriver::Error

Constants

ElementNotDisplayedError

#<RDoc::Comment:0x2a41cb14>


#<RDoc::Comment:0x295385e4>

Errors

@api private

NoAlertOpenError

Indicates that a user has tried to access an alert when one is not present.

NoAlertPresentError

aliased for backwards compatibility

ObsoleteElementError

#<RDoc::Comment:0x2a3c76c8>


#<RDoc::Comment:0x28f18dd0>

ScriptTimeOutError
UnexpectedJavascriptError

#<RDoc::Comment:0x294d9170>


#<RDoc::Comment:0x2929b9d0>

UnhandledError

#<RDoc::Comment:0x2a404438>


#<RDoc::Comment:0x28a4cedc>

Public Class Methods

for_code(code) click to toggle source
# File lib/selenium/webdriver/common/error.rb, line 214
def for_code(code)
  return if [nil, 0].include? code
  return Errors[code - 1] if code.is_a? Fixnum

  klass_name = code.split(' ').map(&:capitalize).join
  Error.const_get("#{klass_name.gsub('Error','')}Error")
rescue NameError
  WebDriverError
end