Sha256: 13e927394ef3385e730fe5d69cb824e2afd6e74ce64430f467f6b72ff551638d
Contents?: true
Size: 804 Bytes
Versions: 12
Compression:
Stored size: 804 Bytes
Contents
module Selenium module WebDriver module Error class ServerError < StandardError def initialize(response) return super(response) if response.kind_of?(String) if response.error super(response.error["message"]) else super("status code #{response.code}") end end end REMOTE_EXCEPTIONS = { 'org.openqa.selenium.NoSuchElementException' => NoSuchElementError, 'org.openqa.selenium.NoSuchFrameException' => NoSuchFrameError, 'org.openqa.selenium.NoSuchWindowException' => NoSuchWindowError, } class << self def for_remote_class(klass) REMOTE_EXCEPTIONS[klass] || ServerError end end end # Error end # WebDriver end # Selenium
Version data entries
12 entries across 12 versions & 1 rubygems