How can I configure the firefox binary location in Protractor?

Issue

I am successfully running Protractor tests with Chrome, specifying the path to my chrome binary using the following section in my Protractor configuration:

capabilities: {
// You can use other browsers
// like firefox, phantoms, safari, IE
'browserName': 'chrome',
"chromeOptions": {
  binary: 'C:/BuildSoftware/Chrome/Application/chrome.exe',
}

This works.

My Firefox is also installed in a non-standard location.

Is there an equivalent way to specify the binary for Firefox in the protractor config?

Solution

UPDATED: See newer answer below: https://stackoverflow.com/a/28313583/800699

It seems you have to start the Selenium Server by yourself with custom arguments for firefox driver.
See Protractor test is not starting on Firefox

More options for firefox driver (including custom firefox binary location) can be found here:
https://code.google.com/p/selenium/wiki/FirefoxDriver

P/S: Browsing the firefox driver source reveals more light:
https://code.google.com/p/selenium/source/browse/javascript/node/selenium-webdriver/firefox/index.js

You can try adding:

"browserName": "firefox",
"firefox_binary": "path/to/custom/firefox",
"binary_": "path/to/custom/firefox"

Answered By – 6220119

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published