aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock2
-rw-r--r--actionpack/lib/action_dispatch/system_testing/browser.rb14
3 files changed, 14 insertions, 4 deletions
diff --git a/Gemfile b/Gemfile
index 9eb449316c..52914b6698 100644
--- a/Gemfile
+++ b/Gemfile
@@ -10,7 +10,7 @@ gemspec
gem "rake", ">= 11.1"
gem "capybara", ">= 2.15"
-gem "selenium-webdriver", ">= 3.5.0"
+gem "selenium-webdriver", ">= 3.141.592"
gem "rack-cache", "~> 1.2"
gem "sass-rails"
diff --git a/Gemfile.lock b/Gemfile.lock
index c0d2971170..eb7dbf6877 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -582,7 +582,7 @@ DEPENDENCIES
rubocop-rails
sass-rails
sdoc (~> 1.0)
- selenium-webdriver (>= 3.5.0)
+ selenium-webdriver (>= 3.141.592)
sequel
sidekiq
sneakers
diff --git a/actionpack/lib/action_dispatch/system_testing/browser.rb b/actionpack/lib/action_dispatch/system_testing/browser.rb
index f5f195d876..e861e52f09 100644
--- a/actionpack/lib/action_dispatch/system_testing/browser.rb
+++ b/actionpack/lib/action_dispatch/system_testing/browser.rb
@@ -46,9 +46,19 @@ module ActionDispatch
def preload
case type
when :chrome
- ::Selenium::WebDriver::Chrome::Service.driver_path.try(:call)
+ if ::Selenium::WebDriver::Service.respond_to? :driver_path=
+ ::Selenium::WebDriver::Chrome::Service.driver_path.try(:call)
+ else
+ # Selenium <= v3.141.0
+ ::Selenium::WebDriver::Chrome.driver_path
+ end
when :firefox
- ::Selenium::WebDriver::Firefox::Service.driver_path.try(:call)
+ if ::Selenium::WebDriver::Service.respond_to? :driver_path=
+ ::Selenium::WebDriver::Firefox::Service.driver_path.try(:call)
+ else
+ # Selenium <= v3.141.0
+ ::Selenium::WebDriver::Firefox.driver_path
+ end
end
end