I am using Linux(Ubuntu) when run the web application it gives error:
Firefox cannot find binary path
I am using Firefox 46.0 and selenium 2.53.0.
Gilles-Antoine Nys
1,48116 silver badges21 bronze badges
asked Jul 20, 2018 at 9:36
-
Please have a look at this post : stackoverflow.com/questions/42094021/…dangi13– dangi132018年07月20日 09:42:39 +00:00Commented Jul 20, 2018 at 9:42
2 Answers 2
I think this should work in your case.
WebDriver firefox = new FirefoxDriver();
FirefoxProfile profile = new FirefoxProfile();
firefox = new FirefoxDriver(new FirefoxBinary(new File(System.getProperty("user.dir"),
"/tools/FirefoxPortable/FirefoxPortable.exe")), profile);
answered Jul 20, 2018 at 9:46
Try by using simple command in console, it should return path:
which firefox
And here is list of FF download site for binaries.
Usually path is like this:
"/usr/bin/firefox/firefox-bin"
Hope this helps,
answered Jul 20, 2018 at 9:47
lang-java