How to resolve Cannot find firefox binary in PATH Error In Selenium

Spread the love

WebDriver does not always supports the latest Firefox.It is better to use ESR version of Firefox. Or else downgrade the Firefox to at least 2-3 versions to see your test running.

How to get downgrade:
1. Uninstall the latest version
2. Find out the version by searching google
3. Install the FF
4. Change the preference- Not update automatically

A better approach would be to use System.setProperty(path of firefox)

WebDriver driver;
System.setProperty("webdriver.firefox.bin", "C:\Program Files (x86)\Mozilla Firefox\firefox.exe")
driver=new FirefoxDriver();

Using of a profile would help us. It is better to create a test profile.

Second thing to look if the driver is getting any popup saying the above written error message. This typically happens when our antivirus plays its role. Antivirus thinks it is a virus effect to control a .exe and operation on browser. Uninstall the Firefox and the AV. Then install Firefox first and then the AV. It will work !! If uninstalling AV makes Firefox work, we have no other choice.

Third,Check for the permission of Firefox.exe file. In a secure environment,we faced it once.
Last, but very rare-check out the plugins. One of the faulty plugin may crash the Firefox or prevents it to open. Deactivate all plugins and use your test code to run.

Spread the love
READ  How To Sync Applications With Selenium Execution
I am the founder and owner of the blog -, always love to share knowledge on test automation,tools,techniques and tips.I am a passionate coder of Java and VBScript.I also publish articles on Travel ideas and great honeymoon destinations.Apart from these, I am a gear-head,love to drive across India. I have shared lots of articles here on How to travel several parts of India.Customization of cars aka car modification is my another hobby.Get in touch with me on



Please enter your comment!
Please enter your name here