To use Firefox, ensure you’re using the appropriate driver Geckodriver is attempting to be 100% compliant with the soon to be released W3C WebDriver Specification, so it is not yet feature complete. It is recommended that you use the latest browser version available to have the most complete feature set.

Starting Firefox

b = :firefox

Firefox Options

All options are explained on the geckodriver page

  • :args - an Array of command-line arguments to use when starting Firefox
  • :binary - a String representing the Path to the Firefox Browser executable to use
  • :profile - an encoded profile string or Firefox::Profile instance
  • :log_level - the String or Symbol representing the desired log level for geckodriver
  • :prefs - a Hash with each entry consisting of the key of the preference and its value

Firefox Profiles

You can specify an existing profile to use, such as your ‘default’ profile:

b = :firefox, profile: 'default'

You can also create a new Firefox profile each test run using any of the options that you can configure in the about:config pane of Firefox

For example:

profile =
profile[''] = '/tmp/webdriver-downloads'
profile[''] = 2
profile['browser.helperApps.neverAsk.saveToDisk'] = 'application/pdf'

b = :firefox, profile: profile

Last Updated: August 10, 2018