Skip to content

Commit

Permalink
Update chrome headless options
Browse files Browse the repository at this point in the history
  • Loading branch information
luciagirasoles committed Sep 2, 2024
1 parent 75f9156 commit ead1f48
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions spec/support/chromedriver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
# Next line turn on logging to see what Selenium Manager is doing, in case of errors
# Selenium::WebDriver.logger.level = :debug

# Capybara.register_driver :chrome do |app|
# Capybara::Selenium::Driver.new(app, browser: :chrome)
# end

Capybara.register_driver :headless_chrome do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument '--window-size=1680,1050'
options.add_argument '--headless'
options.add_argument '--headless=new'
# options.add_argument '--no-sandbox'
options.add_argument '--disable-gpu'
options.add_argument '--disable-dev-shm-usage'
Expand All @@ -25,7 +22,7 @@
config.before(:each, type: :system, js: true) { driven_by Capybara.javascript_driver }

config.after(:each, type: :system) do
Capybara.reset_sessions!
# Capybara.reset_sessions!
page.driver.reset!
end
end

0 comments on commit ead1f48

Please sign in to comment.