How to Enable Firefox Marionette in Selenium WebDriver

Please refer to the official documentation for more details. Using Marionette via WebDriver

Prerequisites

  1. Download the latest Firefox nightly build
  2. Download the latest [Marionette executable] (https://github.com/jgraham/wires/releases)

Test Code


In [ ]:
import os
data_path = os.path.expanduser(os.path.join('~', 'tronline', 'nboss-ci', 'testrunner'))

from marigoso import Test
request = {
    'browser': 'Firefox',
    'firefox':     {
        'capabilities': {
            'marionette': True,
            'binary': r'C:\Program Files\Nightly\firefox.exe'
        },
    },
}
test = Test(request)
test.launch_browser()
test.browser.get_url("http://www.python.org")

Remarks

  1. Wires, the marionette executable, need to be added to your machine's PATH (therefore, you don't see it mentioned in the above code).
  2. Marionette does not support Firefox profile so you won't be able to automatically add extensions to the Firefox instance being launched by WebDriver.