Configure Capybara to use Marionette WebDriver for Firefox

When Marionette replaces FirefoxDriver, I need to configure my tests to run it. I downloaded the binary, but it seems like I cannot get the Capybara driver registration configured to use Marionette.

Capybara.register_driver :selenium_firefox do |app| capabilities = Selenium::WebDriver::Remote::Capabilities.firefox capabilities["firefox_binary"] = 'path/to/marionette/renamed/to/wires' Capybara::Selenium::Driver.new(app, browser: :firefox, desired_capabilities: capabilities) end 

However, when I run the test, I just get the FF start page, as if I were trying to run it without a puppet.

+4
selenium selenium-firefoxdriver firefox-marionette capybara
source share
1 answer

marionette the option Driver.new is passed - not for the desired quality

 Capybara.register_driver :selenium_firefox do |app| Capybara::Selenium::Driver.new(app, browser: :firefox, marionette: true) end 

It also requires that you download the geckodriver, put it in your path and rename it to wires

A full description of these configuration steps, including download links for the latest version of Marionette, can be found here .

Note: Capybara does not yet support the puppet, some things are fixed in capybara, some of them are errors in selenium-webdriver, and others are just a general roughness - things like just stop choosing options from your favorite elements - no errors are thrown, it just stops working. I do not think it is ready for use in the real world.

+5
source share

All Articles