Skip to content

Commit

Permalink
Revert Capybara.javascript_driver settings to `:selenium_chrome_headl…
Browse files Browse the repository at this point in the history
…ess` to avoid capybara-screenshot errors
  • Loading branch information
texpert committed Apr 9, 2023
1 parent 494c061 commit 9840124
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@
require 'rack_session_access/capybara'
require 'capybara-screenshot/rspec'

Capybara.server_host = '0.0.0.0'
Capybara.server_port = 3030

Capybara.register_driver :chrome_headless do |app|
args = %w[--headless --disable-gpu --no-sandbox --disable-extensions --disable-dev-shm-usage --window-size=1440,900 --enable-features=NetworkService,NetworkServiceInProcess]
options = Selenium::WebDriver::Chrome::Options.new(args: args)
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
end

# Next 2 are Chrome drivers
# Capybara.javascript_driver = :selenium_chrome
Capybara.javascript_driver = :chrome_headless
Capybara.javascript_driver = :selenium_chrome_headless

# Next 2 are FireFox drivers
# Capybara.javascript_driver = :selenium
Expand Down

0 comments on commit 9840124

Please sign in to comment.