From 10f9fde535a38241563d46183d542a54eaa84c66 Mon Sep 17 00:00:00 2001 From: Thomas Walpole Date: Tue, 10 Jul 2018 11:27:47 -0700 Subject: [PATCH] Restore missing error class and limit error class lookup scope --- rb/lib/selenium/webdriver/common/error.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rb/lib/selenium/webdriver/common/error.rb b/rb/lib/selenium/webdriver/common/error.rb index c337d1d0c80d9..c8c5a7e69b569 100644 --- a/rb/lib/selenium/webdriver/common/error.rb +++ b/rb/lib/selenium/webdriver/common/error.rb @@ -32,7 +32,7 @@ def self.for_code(code) ERRORS.fetch(code) when String klass_name = code.split(' ').map(&:capitalize).join.sub(/Error$/, '') - const_get("#{klass_name}Error") + const_get("#{klass_name}Error", false) end rescue KeyError, NameError WebDriverError @@ -264,6 +264,7 @@ class UnsupportedOperationError < WebDriverError; end # Aliases for OSS dialect. ScriptTimeoutError = ScriptTimeOutError + TimeoutError = TimeOutError NoAlertOpenError = NoAlertPresentError # Aliases for backwards compatibility.