1

I have a project with WebDriver 2.53. I am not ready to move it to 3.x. I am running Windows 7. My code is in Java.

With Selenium WebDriver 2.53, latest Firefox is not supported. I need to supply it with Firefox 44. (45 esr fails most of the time in my experience). But a system-wide installation of an old version of Firefox triggers a corporate auto-update system.

There is a portable version of Firefox 44 that one can install anywhere without affecting the system-wide Firefox. But I would need to set WebDriver to use the Firefox executable at a certain path, not in C:\Program Files(x86)\Mozilla Firefox.

How do I set this path? I did search bit nothing I could find online works.

Mikhail Ramendik
  • 1,063
  • 2
  • 12
  • 26

1 Answers1

0

Have you tried the following?

File pathToBinary = new File("C:\\user\\Programme\\FirefoxPortable\\App\\Firefox\\firefox.exe");
FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
FirefoxProfile firefoxProfile = new FirefoxProfile();       
WebDriver driver = new FirefoxDriver(ffBinary,firefoxProfile);

This is taken directly from another Stack Overflow post and I have not tried the code. Cannot find firefox binary in PATH. Make sure firefox is installed

Community
  • 1
  • 1
OCary
  • 3,231
  • 2
  • 16
  • 17