WebDriverException: Cannot find firefox binary in PATH

14,588 views
Skip to first unread message

bert

unread,
Jan 26, 2013, 10:20:33 AM1/26/13
to seleniu...@googlegroups.com
Hi,

Trying to run some tests in Intellij but getting this error:-

org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: WIN8
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 15:53:30'
System info: os.name: 'Windows 8', os.arch: 'x86', os.version: '6.2', java.version: '1.7.0_11'

I'm running Windows 8 32 bit, FF16 which I believe should be supported in 2.28.0.

Any ideas?

Thanks

Manoj K

unread,
Jan 26, 2013, 12:28:33 PM1/26/13
to seleniu...@googlegroups.com
It seems selenium couldn't locate the Firefox instance that is installed in your machine.

Where have you installed Firefox ?

If its not a standard location, then you may need to set the "webdriver.firefox.bin" 


did you try giving the path ?

Regards,
Manoj

bert

unread,
Jan 26, 2013, 3:32:34 PM1/26/13
to seleniu...@googlegroups.com
Manoj,

Thank you.  Firefox is installed in the default path:

C:\Program Files\Mozilla Firefox

Forgive my ignorance (I am just learning), but where do I set the path?

bert

unread,
Jan 26, 2013, 3:40:07 PM1/26/13
to seleniu...@googlegroups.com
OK, I worked it out:

   System.setProperty("webdriver.firefox.bin","C:\\Program Files\\Mozilla Firefox\\Firefox.exe");

Thanks!

Mike Riley

unread,
Jan 27, 2013, 10:39:04 PM1/27/13
to seleniu...@googlegroups.com
It is better if you set up the system correctly, since the location will not be the same on a different OS.

For Windows you can right click on My Computer and select Properties (true of XP, Vista and 7 - not sure about 8).  Look for Advanced System Settings.  There should be a button to set Environment Variables.  In there you can add the directory to the PATH setting.

If you set p the system tests are run on your code will not have to know the placement of the binary, which can change just based on your Windows version, much less for Mac or Linux systems.

Mike

bert

unread,
Feb 9, 2013, 6:22:55 AM2/9/13
to seleniu...@googlegroups.com
Mike,

Many thanks and apologies for the delayed response!

I have Windows 8 as you mention.  When I set the System Path variable as follows: Path=C:\Program Files\Mozilla Firefox\Firefox.exe;%M2_HOME%\bin;......etc.........
I still get the same error message. Can you see anything obvious in the path setting that is incorrect?

When I explicitly set the path in the code:

System.setProperty("webdriver.firefox.bin","C:\\Program Files\\Mozilla Firefox\\Firefox.exe");
it runs fine.

Jim Evans

unread,
Feb 9, 2013, 9:37:32 AM2/9/13
to seleniu...@googlegroups.com
Remove "firefox.exe" from the path. The PATH variable should only contain directories, not individual files.
Reply all
Reply to author
Forward
0 new messages