2

When I try to run Protractor tests against a "Nightly" Firefox build, firefox window hangs indefinitely:

enter image description here

Here is the relevant part of my configuration:

exports.config = {
    baseUrl: 'http://localhost:8080/dev/src/',
    specs: ['dev/test/e2e/**/dashboard.spec.js'],
    directConnect: true,
    capabilities: {
        browserName: "firefox",
        firefox_binary: "/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin",
    },

    allScriptsTimeout: 110000,
    getPageTimeout: 100000,
    framework: 'jasmine2',
    jasmineNodeOpts: {
        isVerbose: false,
        showColors: true,
        includeStackTrace: false,
        defaultTimeoutInterval: 400000
    },
};

There was a related issue with no solution provided.

One of the possible workarounds I've found might be to move the WebDriver xpi extension from the stable firefox installation (or a different source) to the "extensions" directory of the Nightly firefox profile, but I'm not sure how to do it.

I've also found something about using "Marionette" driver to test a nightly Firefox build, but I haven't found any guidelines on it's relationship to Protractor.


Using:

  • currently latest Protractor 3.0.0
  • Firefox Nightly is 46.0.a1
  • Mac OS X El Capitan

Tried with directConnect and without - same behavior.

Community
  • 1
  • 1
alecxe
  • 462,703
  • 120
  • 1,088
  • 1,195

2 Answers2

2

On both Mac and Linux I had to update to FF 47.0.1 selenium 2.53.1.

I initially explored trying to configure Protractor with the new Mozilla Marionette driver, per the answer by jrharshath

I got protractor to use it (description of what I did below). However, I had manifold problems with the driver running my tests.

I then found discussions saying 47.0.1 and selenium 2.53.1 restored FirefoxDriver functionality, so abandoned the Marionette driver in favor of compatible upgrades.

For those looking at configuring and using the Marionette driver with Protractor and webdriver I did the following:

  1. Downloaded and unzipped the latest Marionette driver from https://github.com/mozilla/geckodriver/releases
  2. Renamed it to wires and put it on the path
  3. Started a standalone selenium webdriver 2.53.1 with the -Dwebdriver.gecko.driver=${path_to_driver} property, and used that server.
  4. Set marionette true in my firefox capabilities in my config, ie : multiCapabilities:[ { 'browserName': 'chrome' } }, { 'browserName': 'firefox', 'marionette' : true } ],
Community
  • 1
  • 1
sporkthrower
  • 806
  • 1
  • 7
  • 19
1

Apparently this is an issue with Firefox 46. The default FirefoxDriver no longer works with this version - you need to be using the Marionette driver. I also found a quick how-to on using the new driver with Selenium.

I'm facing the same problem as well. We run our tests with directConnect by default, so I'm yet to figure out how to get protractor to use Marionette instead of FirefoxDriver.

If you're having protractor connect to Selenium, then you should be able to follow the guides available to make Selenium use the new driver - that shouldn't affect protractor's relationship with Selenium.


Update: Looking into the problem of using the latest versions of Firefox with directConnect, I found no way of instructing protractor to use the Marionette driver. I've opened an issue with the protractor team for this.

jrharshath
  • 25,975
  • 33
  • 97
  • 127
  • 1
    Thanks so much for looking into that, I'll reiterate over the problem and will post the results in the future. – alecxe May 02 '16 at 15:04