Cannot find firefox binary in PATH

OS:win10 (64bit)
Java:jdk8
Studio:5.4.1
Firefox:59
Driver:geckodriver.exe (0.20.1)

I think I have set up the environment variables and start the parameters, but running the test case is still wrong.

Step 1:Enviroment Setting

Step 2:Studio Setting

Step 3 :Run/Debug Error

1.png

2.png

3.png

Dear friend, I need your help,If you know how to solve it

Is firefox.exe actually installed in that path? The WebDriver module is telling you it is not there.

Russ Thomas said:

Is firefox.exe actually installed in that path? The WebDriver module is telling you it is not there.

Yes, I am sure that it is installed in that location. Is the windows path useless?

QQ图片20180514090238.png

I would suggest to you in your test case before calling WebUI.openBrowser(), insert this line:

...
System.setSytemProperty('webdriver.firefox.logfile', 'C:/temp/firefoxdriver.log')
WebUI.openBrowser()
...

and execute your test case with firefox. Then you would get a file C:/temp/firefoxdriver.log.

In the firefoxdriver.log file, possibly 3rd line in it, you would find such information:

1526270318173	mozrunner::runner	INFO	Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-profile" "C:\\Users\\username\\AppData\\Local\\Temp\\rust_mozprofile.jbEJBUiTUIvI"

Here you can check the exact path at which Katalon Studio tried to find the binary of firefox.exe.

Have a look at this and verify if the path is valid or not.

kazurayam said:

I would suggest to you in your test case before calling WebUI.openBrowser(), insert this line:

...

System.setSytemProperty(‘webdriver.firefox.logfile’, ‘C:/temp/firefoxdriver.log’)
WebUI.openBrowser()


and execute your test case with firefox. Then you would get a file C:/temp/firefoxdriver.log.

In the firefoxdriver.log file, possibly 3rd line in it, you would find such information:

1526270318173 mozrunner::runner INFO Running command: “C:\Program Files\Mozilla Firefox\firefox.exe” “-marionette” “-profile” “C:\Users\username\AppData\Local\Temp\rust_mozprofile.jbEJBUiTUIvI”


Here you can check the exact path at which Katalon Studio tried to find the binary of firefox.exe.  
  
Have a look at this and verify if the path is valid or not.  
  

  

It appears that setting environment variables and modifying parameters did not take effect

When I use Java to test, I set the system variables manually…

There’s no problem running. I should have thought of that earlier. Thank you.

The following is a part of my java test code

QQ图片2018051601111.png

I added firefox_binary variable in Studio settings, browser window is opened, but URL is not loaded.

plaidshirtakos,

This post is other ones’ and already closed. I am afraid you are intruding.

Please go back to your post and continue:

1 Like

you had better download the correct web driver for your browser,.

//Firefox setting
//System.setProperty(“webdriver.firefox.bin”, “C:/PersonalInstall/Firefox/firefox.exe”);
//System.setProperty(“webdriver.gecko.driver”, “C:/JavaTest/eclipse32/workspace/SeleniumTestNG0312/webDrivers/geckodriverV0191.exe”);
//Chrom setting
//System.setProperty(“webdriver.chrome.driver”, “C:/JavaTest/eclipse32/workspace/SeleniumTestNG0312/webDrivers/chromedriverV236.exe”);
//Edge setting, and keep browser zoom=100%
//System.setProperty(“webdriver.edge.driver”, “C:/JavaTest/eclipse32/workspace/SeleniumTestNG0312/webDrivers/MicrosoftWebDriver14.exe”);
//IE setting, and make sure browser zoom=100%
//System.setProperty(“webdriver.ie.driver”, “C:/JavaTest/eclipse32/workspace/SeleniumTestNG0312/webDrivers/IEDriverServerV340.exe”);
//open ie browser, click Internet Option->Security,for the 4 zones, check the “Enable Protected Mode(requires restarting Internet Explorer)”

System.setProperty (“webdriver.firefox.bin”, “C:/PersonalInstall/Firefox/firefox.exe”);

use firefox_bin instead of webdriver.firefox.bin

Hello,

It’s a bit old but I had the same issue and @kazurayam anwser did not solve my problem.

I added my firefox install directory (YOUR_PATH\Mozilla Firefox) to the windows PATH and restarded katalon studio. Now it’s working perfectly.

Here are the steps to troubleshoot and fix this issue:

Cause: This error usually indicates that the tool/script could not find firefox on its default location

Option 1

Step 1 - In your test case before calling WebUI.openBrowser(), insert this line:

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

(Make sure to replace the path of firefox.exe to the path on your system)

Step 2 - Save and run test on Firefox browser

Step 3 - If the above steps works and you are able to run on Firefox then Goto Project > Settings > Desired Capabilities > Web UI > Firefox

And add the same settings as name value pair as shown in this image
NAME - webdriver.firefox.bin
VALUE - C:/Program Files/Mozilla Firefox/firefox.exe
Image URL - https://ibb.co/5rQzCmh

You can also try name firefox_bin instead of webdriver.firefox.bin

Step 4 - Save and close the settings

Step 5 - Goto the test case (script) and delete/comment the line added in Step 1

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

Step 6 - Save and Run

Option 2

Step 1 - Check your firefox is installed on the default location

c:/Program Files (x86)/Mozilla Firefox

OR

C:\Program Files\Mozilla Firefox

Step 2 - Copy the path where your firefox.exe file is located

e.g. C:\Program Files\Mozilla Firefox\firefox.exe

Step 2 - Goto System Environment Variables, Select Path and click Edit

Step 3 - Add the location of firefox.exe file. Make sure not to change/delete existing values

e.g. C:\Program Files\Mozilla Firefox\

Step 4 - Restart Katalon Studio

Step 5 - Save and Run the test again