Automated Tester


This content shows Simple View

July 2016

Setting up Marionette/ GeckoDriver


Firefox will crash if you are using the Webdriver implementation for FirefoxDriver with Firefox v47 and beyond. This needs to be replaced with Mozilla’s GeckoDriver/ Marionette. At the time of writing it is still in a pre-release stage; meaning you may get unpredictable results against the current stable version of Firefox. You may want to use it with Firefox Nightly or Firefox Developer.

Below are some steps to get you going with Marionette/ Geckodriver C# .Net:

  • Download the latest release here
  • Extract the *.exe middleware and rename it to ‘wires.exe’
  • Place ‘wires.exe’ in to the given source code location
  • Include ‘wires.exe’ into your Solution and set properties to ‘Copy if Newer’

To set the Driver up in code, I have found the following works well in C# .Net:

            FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
            service.FirefoxBinaryPath = @"C:\Path\to\your\FF\exe.exe";
            FirefoxOptions options = new FirefoxOptions();
            options.AddAdditionalCapability(CapabilityType.AcceptSslCertificates, true);
            TimeSpan t = TimeSpan.FromSeconds(10);

            Driver = new FirefoxDriver(service, options, t);

Note that you need to put in the path to your Firefox *.exe or add it to your system Path variable.

If you are experiencing issues I would recommend having a look at the project bug list or the project GitHub issues page before raising any issues. There is also much more information over at the Mozilla page for Marionette.