Open adeherdt-r7 opened 4 months ago
Seems like you're trying to set the window size on a non-existent session
Seems like you're trying to set the window size on a non-existent session
The issue is snap
.
This is Firefox installed through snap, and Capybara is unable to work with it.
Standalone installations seem to work fine.
I tried the different combinations that snap installs since /usr/bin/firefox is just a wrapper to start these with snap:
/snap/bin/firefox
/snap/bin/firefox.geckodriver
/snap/bin/geckodriver
The only one that worked to get past the not a firefox binary error was '/snap/bin/firefox'
options = Selenium::WebDriver::Firefox::Options.new
options.binary = '/snap/bin/firefox'
service = Selenium::WebDriver::Service.firefox
service.executable_path = options.binary
puts "!!! #{`ls -l #{options.binary}`}"
driver = Selenium::WebDriver.for :firefox, service: service, options: options
Capybara.current_driver = driver
While this gets me past the binary path not found errors and opens a firefox, I still get:
Selenium::WebDriver::Error::WebDriverError:
unable to connect to /snap/bin/firefox 127.0.0.1:4507
Meta
Capybara Version: 3.40.0 Driver Information (and browser if relevant):
Expected Behavior
Actual Behavior
Tests crash during Capybara configuration:
The before block:
Steps to reproduce