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