Merge pull request #4229 from betagouv/fix_capybara_on_sims_desktop
Fix capybara on linux ubuntu
This commit is contained in:
commit
5cc3a9eb60
1 changed files with 6 additions and 1 deletions
|
@ -39,13 +39,18 @@ Capybara.register_driver :chrome do |app|
|
|||
end
|
||||
|
||||
Capybara.register_driver :headless_chrome do |app|
|
||||
options = Selenium::WebDriver::Chrome::Options.new
|
||||
options.add_argument('--headless')
|
||||
options.add_argument('--window-size=1440,900')
|
||||
|
||||
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
||||
chromeOptions: { args: ['headless', 'disable-dev-shm-usage', 'disable-software-rasterizer', 'mute-audio', 'window-size=1440,900'] }
|
||||
)
|
||||
|
||||
Capybara::Selenium::Driver.new app,
|
||||
browser: :chrome,
|
||||
desired_capabilities: capabilities
|
||||
desired_capabilities: capabilities,
|
||||
options: options
|
||||
end
|
||||
|
||||
# FIXME: remove this line when https://github.com/rspec/rspec-rails/issues/1897 has been fixed
|
||||
|
|
Loading…
Reference in a new issue