Test (Capybara): add no-sandbox option to headless chrome driver

Activating this option fix the 'DevToolsActivePort file doesn't exist'
error.

https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t
This commit is contained in:
François Vantomme 2021-03-08 10:24:53 +01:00
parent 299a98b3cb
commit 2032eb8144
No known key found for this signature in database
GPG key ID: 75A448E06F6B75F8

View file

@ -9,6 +9,7 @@ end
Capybara.register_driver :headless_chrome do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('--no-sandbox') unless ENV['SANDBOX']
options.add_argument('--headless') unless ENV['NO_HEADLESS']
options.add_argument('--window-size=1440,900')