Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed.

Open 2 Answers 1352 Views Selenium
1 2
OS appears to be: WIN10
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'Mehedi', ip: '', 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_60'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.Executable.<init>(
at org.openqa.selenium.firefox.FirefoxBinary.<init>(
at org.openqa.selenium.firefox.FirefoxBinary.<init>(
at org.openqa.selenium.firefox.FirefoxDriver.<init>(
at fruit.evergreen.testcases.VerifyEvergreenLogin.verifyValidLogin(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(
at org.testng.internal.Invoker.invokeMethod(
at org.testng.internal.Invoker.invokeTestMethod(
at org.testng.internal.Invoker.invokeTestMethods(
at org.testng.internal.TestMethodWorker.invokeTestMethods(
at org.testng.TestRunner.privateRun(
at org.testng.SuiteRunner.runTest(
at org.testng.SuiteRunner.runSequentially(
at org.testng.SuiteRunner.privateRun(
at org.testng.SuiteRunnerWorker.runSuite(
at org.testng.TestNG.runSuitesSequentially(
at org.testng.TestNG.runSuitesLocally(
at org.testng.remote.RemoteTestNG.initAndRun(
at org.testng.remote.RemoteTestNG.main(

2 Answers


If you have installed Firefox at custom location, uninstall existing firefox and install at default locationi.


"C:\Program Files (x86)\Mozilla Firefox\"


Your firefox should be under "Program Files (x86)" NOT "Program Files" or anyother custom location.

answered by (151 points)

If you do not have the liberty to reinstall the Firefox browser or if you can not choose the location during installation, you can even specify the location of the existing binary as given below.

File pathBinary = new File("your\\location\\to\\the\\firefox.exe");
FirefoxBinary firefoxBinary = new FirefoxBinary(pathBinary);
FirefoxProfile firefoxProfile = new FirefoxProfile();       
WebDriver driver = new FirefoxDriver(firefoxBinary, firefoxProfile);


answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.