Reema Reema - 2 months ago 1319x
Java Question

Fail to Launch Mozilla with selenium

I am trying to launch

but still i am getting this error:

Exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see The latest version can be downloaded from

I am using
Selenium 3.0.01
Beta version and
Mozilla 45
. I have tried with
Mozilla 47
too. but still the same thing.


As exception is clearly saying you need to download latest geckodriver.exe from here and set downloaded geckodriver.exe path where it's exists in your computer as system property with with variable webdriver.gecko.driver before initiating marionette driver and launching firefox as below :-

System.setProperty("webdriver.gecko.driver", "path/to/geckodriver.exe");

//Now you can Initialize marionette driver to launch firefox

Note : Just like the other drivers available to Selenium from other browser vendors, Mozilla has released now an executable that will run alongside the browser.

Hope it helps...:)