The "chromeOptions" key in chrome capabilities changed to "goog:chromeOptions".

But I'm rather switching to the 'option' array here for readability and alignment with Firefox options.
This commit is contained in:
Thomas Schmidt 2020-09-29 00:02:18 +02:00
parent 046ed9f7b7
commit f5ac859b9b
No known key found for this signature in database
GPG key ID: C11A28463B554979

View file

@ -78,12 +78,12 @@ RSpec.configure do |config|
end end
Capybara.register_driver :chrome_headless do |app| Capybara.register_driver :chrome_headless do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome( options = ::Selenium::WebDriver::Chrome::Options.new
chromeOptions: { args: %w(headless disable-gpu window-size=1920x1080 no-sandbox) } options.args << '--window-size=1920x1080'
) options.args << '--headless'
Capybara::Selenium::Driver.new( options.args << '--no-sandbox'
app, browser: :chrome, desired_capabilities: capabilities options.args << '--disable-gpu'
) Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end end
Capybara.default_max_wait_time = 10 # seconds Capybara.default_max_wait_time = 10 # seconds