module Selenium::WebDriver::Error

Constants

ElementNotDisplayedError

#<RDoc::Comment:0x2989ee68>


#<RDoc::Comment:0x2943780c>

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:0x298aed54>


#<RDoc::Comment:0x28f0e524>

ScriptTimeOutError
UnexpectedJavascriptError

#<RDoc::Comment:0x29833974>


#<RDoc::Comment:0x296e453c>

UnhandledError

#<RDoc::Comment:0x2987f9c8>


#<RDoc::Comment:0x286e6748>

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