From 98401241376e4453e8d5bd8c0b2f255092d63d19 Mon Sep 17 00:00:00 2001 From: texpert Date: Mon, 10 Apr 2023 01:31:03 +0300 Subject: [PATCH] Revert Capybara.javascript_driver settings to `:selenium_chrome_headless` to avoid capybara-screenshot errors --- spec/spec_helper.rb | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5163aadb..63194f25 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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