Installing Marionette (FirefoxDriver) on Mac OSX

It’s fairly straightforward to install and start using the new FirefoxDriver, Marionette.

Marionette is the name of Mozilla’s next generation automation driver for Selenium WebDriver 3.0.

Previously called FirefoxDriver, this driver was bundled into Firefox as an extension which meant once you had FF installed you could start using it. No installation required. However as Selenium 3 sheds its Core (Selenium 1) functionality and moves towards a W3C standardization, it’s easier to maintain this driver outside of the browser. Starting with Firefox 47 that extension is no longer shipped, you’ll have to download the Marionette Driver.

Marionette is turned on by default with Selenium 3, so all we have to do is install the driver and use Selenium 3.0 bindings for it to work. Here is how we do that on a Mac:

  1. Download the Marionette driver from the Github release page. (It’s confusingly called GeckoDriver.)
    1. Once we have it downloaded, we’ll need to tell Selenium where it is and for that we have a few choices (2 & 3):
  2. Specify the browser location in the Selenium Setup or
  3. Add it to the System PATH
    1. Steps 2 + 3 on this ChromeDriver post.

Once this is done, it should work like nothing has changed. The big advantage is you’ll now be able to use Firefox browsers newer than 46!