Closed thebravoman closed 3 years ago
Tests are running successfully in browser and on CLI by opening a browser.
Trying to run the specs with selenim driver, headless
config is
config.driver = :selenium config.driver_options = { client_driver: :firefox, selenium_options: { options: Selenium::WebDriver::Firefox::Options.new(args: ['--headless']) } }
Tried also
options: Selenium::WebDriver::Firefox::Options.new(args: ['headless'])
The firefox browser is opened in both cases.
The following configuration works for another gem on the same machine so I would assume the driver is generally working on this machine.
Capybara.register_driver :firefox_headless do |app| options = ::Selenium::WebDriver::Firefox::Options.new options.args << '--headless' Capybara::Selenium::Driver.new(app, browser: :firefox, options: options) end Capybara.javascript_driver = :firefox_headless
Can you open a PR with the suggested change?
thank you
works for me, tests run in firefox headless locally and on CI browser window is not opening when using headless see 805523c55eb0 for details
Tests are running successfully in browser and on CLI by opening a browser.
Trying to run the specs with selenim driver, headless
config is
Tried also
The firefox browser is opened in both cases.
The following configuration works for another gem on the same machine so I would assume the driver is generally working on this machine.