aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/system_testing/browser.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/browser.rb b/actionpack/lib/action_dispatch/system_testing/browser.rb
index f691bd5fe5..2ffb5f67f6 100644
--- a/actionpack/lib/action_dispatch/system_testing/browser.rb
+++ b/actionpack/lib/action_dispatch/system_testing/browser.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+require "selenium/webdriver"
+
module ActionDispatch
module SystemTesting
class Browser # :nodoc:
@@ -30,18 +32,19 @@ module ActionDispatch
end
def capabilities
- @option ||= case type
- when :chrome
- Selenium::WebDriver::Chrome::Options.new
- when :firefox
- Selenium::WebDriver::Firefox::Options.new
- end
+ @option ||=
+ case type
+ when :chrome
+ Selenium::WebDriver::Chrome::Options.new
+ when :firefox
+ Selenium::WebDriver::Firefox::Options.new
+ end
end
private
def headless_chrome_browser_options
- capability.args << "--headless"
- capability.args << "--disable-gpu" if Gem.win_platform?
+ capabilities.args << "--headless"
+ capabilities.args << "--disable-gpu" if Gem.win_platform?
capabilities
end