0

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,481
  • 16
  • 21
QA Intern
  • 51
  • 1
  • 6
  • Please have a look at this post : https://stackoverflow.com/questions/42094021/how-to-set-firefox-binary-path-of-firefox-in-selenium-in-linux – dangi13 Jul 20 '18 at 09:42

2 Answers2

0

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);
0

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,

Kovacic
  • 1,473
  • 6
  • 21