Use Chrome::Options instead of Capabilities
Resolves:
$ docker-compose run --rm osem bundle exec rspec --tag js
…
Selenium::WebDriver::Error::UnknownError:
unknown error: Chrome failed to start: exited abnormally.
This commit is contained in:
parent
e6f3aa559e
commit
f37eab88c7
1 changed files with 3 additions and 5 deletions
|
|
@ -78,12 +78,10 @@ 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(
|
||||
args: %w(headless disable-gpu window-size=1920x1080 no-sandbox)
|
||||
)
|
||||
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
|
||||
end
|
||||
|
||||
Capybara.default_max_wait_time = 10 # seconds
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue