What is geckodriver? How to use it in Selenium Webdriver?

closed as too broad by IAmMilinPatel, Bharat Mane, Yu Zhang, NarendraC, Peter M. Mar 23 '17 at 14:13

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Good question. Did you try search that on the web? – IAmMilinPatel Mar 23 '17 at 7:17
  • I was searched, But still confuse between geckodriver and Marionette. – Bhushan Patil Mar 23 '17 at 7:36
  • So it would be good if you put up an appropriate question. Current question is likely to get closed! – IAmMilinPatel Mar 23 '17 at 7:38
  • This maybe? youtube.com/watch?v=vTS917o7_f8 – user246 Mar 23 '17 at 11:56


A Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers. Geckodriver provides HTTP API described by the WebDriver protocol to communicate with Gecko browsers, such as Firefox version above 47.


Marionette (the next generation of FirefoxDriver) is turned on by default from Selenium 3. Even if you are working with older versions of Firefox browser, Selenium 3 expects you to set a path to the driver executable by the webdriver.gecko.driver

For more details on Marionette click here.

Note: If you are using Selenium version below 2.53, you don't need gecko additional driver.

If you are not doing so, it will throw exception:
"java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property;"

How to use it?

If you are using Selenium 3.0 and you are running your test on Firefox; in this case, you have to download and set the path of the geckodriver as like chrome in selenium 2.0.

System.setProperty("webdriver.gecko.driver","path of/geckodriver.exe");
WebDriver driver = new FirefoxDriver();

with RemotWebDriver:

System.setProperty("webdriver.gecko.driver","path of/geckodriver.exe");
DesiredCapabilities capabilities=DesiredCapabilities.firefox();
capabilities.setCapability("marionette", true);
WebDriver driver = new FirefoxDriver(capabilities);
  • 3
    +1; It looks like the perfect answer for this question with proper explanation and desired code to launch firefox using Selenium 3.0. – Michael Roy Mar 23 '17 at 9:12

I'm not sure if you had googled it before you post your question here.

Anyway, first you need to know what Gecko is. Gecko is a web browser engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation. Where Gecko Driver is the link between your tests in Selenium and the Firefox browser.

GeckoDriver is a proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers, in this case, Firefox.

As Selenium 3 will not have any native implementation of Firefox, we have to direct all the driver commands through Gecko Driver.

How to use it in Selenium? Check this link out.


Lot of article are present on internet regarding GeckoDriver and Selenium 3.

Gecko is a webbrowser-engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation

Gecko Driver is the connection between your tests in Selenium and the Firefox program. compatible clients to interact with Gecko-based browsers i.e. Mozilla Firefox for this situation. As Selenium 3 won't have any local usage of Firefox, we need to direct all the driver through Gecko Driver. Gecko Driver is an executable record that you need in one of the framework way before beginning your tests. Firefox program actualizes the WebDriver convention utilizing an executable called GeckoDriver.exe. This executable starts a server on your system. All your tests communicate to this server to run your tests. It translates calls into the Marionette automation protocol by acting as a proxy between the local and remote ends

I had created some demo on Selenium 3 using Gecko driver using Java. Github code link is provided in blog. Check out my blog for demo code

  • Can the manual download be avoided somehow? On Windows, we have System.setProperty("webdriver.gecko.driver", "C:/Users/asst/Desktop/geckodriver.exe"); and this is not portable at all. – koppor Oct 18 '17 at 10:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.