Protractor with Firefox (32 latest) browser not lo

2020-07-18 02:50发布

问题:

So for some reason, when I run protractor, Firefox (32 latest) just opens with an empty browser and doesn't navigate to the baseURL. The tests I have written work fine with chrome, but not with firefox. It probably has something to do with the way the conf file is set up. Any ideas?

Conf file:

exports.config = {
    allScriptsTimeout: 11000,

    specs: [
        'e2e/*.js'
    ],

    multiCapabilities: [
       {
            'browserName': 'firefox'
        },
        {
            'browserName': 'chrome'
        }
    ],

    chromeOnly: false,

    chromeDriver: 'e2e/chromedriver/',

    baseUrl: 'http://localhost:9000/',

    framework: 'jasmine',

    jasmineNodeOpts: {
        defaultTimeoutInterval: 30000
    }
};

回答1:

Firefox 32 is broken with selenium <= 2.42.2

UPDATE Selenium 2.43 is out!

Need selenium 2.43 or newer version. Or downgrade Firefox back to version 31 or less.

Issue: https://code.google.com/p/selenium/issues/detail?id=7642

FYI output might look like this:

Using the selenium server at: http://localhost:4444/wd/hub

/home/username/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:109
  var template = new Error(this.message);
                 ^
UnknownError: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
003407891246748webdriver-profile/extensions/fxdriver@googlecode.com
1409877425492   addons.xpi  DEBUG   Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous7362003407891246748webdriver-profile/extensions/webdriver-staging
1409877425492   addons.xpi  DEBUG   checkForChanges
1409877425502   addons.xpi  DEBUG   Directory state JSON differs:........