Many of you know that Selenium 3.0 beta has been released and in this version of Selenium, you can open Firefox in a different way. You need to use Gecko driver a.k.a Marionette driver to launch Firefox. Before Selenium 3.0 we can launch Firefox by default without any property settings. On the other hand, we need ChromeDriverServer and IEDriverServer executables for chrome and Internet Explorer browsers. Now, with Selenium 3.0 we need to set Gecko (Marionette) driver executable to use Firefox and in this article I will show you how to accomplish this.

Marionette is the next generation of FirefoxDriver.

Step by Step Explanations to use Gecko a.k.a Marionette Driver

Method 1: Set Gecko a.k.a Marionette Driver path as webdriver.gecko.driver Property

Step-1: Go to and download latest release of geckodriver.


Step-2: Create a new folder as “C:\Marionette” and extract the zip file inside this folder.


Step-3: Now, we should set webdriver.gecko.driver System property to the “C:\Marionette\geckodriver.exe” path.

Test Code:

Test Result:


Method 2: Set Gecko (Marionette) path as Environmental Variable

Step-1: Copy the geckodriver.exe’s folder path. In our case it is “C:\Marionette

Step-2: Use RapidEE or go to Windows System Properties -> Environmental Variables  and then click to Path and add this folder to Path variable.


Step-3: Restart the PC that your settings take effect!

After restart, you can directly create FirefoxDriver instance without set the System property every time. Your test code will look like this.