Skip to content

Commit

Permalink
🚧
Browse files Browse the repository at this point in the history
  • Loading branch information
josemigallas committed Oct 10, 2024
1 parent e185ba4 commit 3f03640
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions features/support/capybara.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@
end

Capybara.register_driver :headless_chrome do |app|
options = Selenium::WebDriver::Options.chrome(**BASE_DRIVER_OPTIONS.merge(
args: [
'--disable-gpu',
'--disable-popup-blocking',
'--headless=new',
'--host-resolver-rules=MAP * ~NOTFOUND , EXCLUDE *localhost*',
'--no-sandbox',
],
logging_prefs: { performance: 'ALL', browser: 'ALL' },
perf_logging_prefs: { enableNetwork: true },
prefs: {
browser: {
set_download_behavior: { behavior: 'allow' }
}
}
))
options = Selenium::WebDriver::Options.chrome(**BASE_DRIVER_OPTIONS)

options.logging_prefs = { performance: 'ALL', browser: 'ALL' }

options.add_argument('--disable-gpu')
options.add_argument('--disable-popup-blocking')
options.add_argument('--headless=new')
options.add_argument('--host-resolver-rules=MAP * ~NOTFOUND , EXCLUDE *localhost*')
options.add_argument('--no-sandbox')

options.add_option(:perf_logging_prefs, enableNetwork: true)

options.add_preference(:browser, set_download_behavior: { behavior: 'allow' })

Capybara::Selenium::Driver.new(app, browser: :chrome, options: options, timeout: 120)
end

0 comments on commit 3f03640

Please sign in to comment.