4

因此,由于某种原因,当我运行量角器时,Firefox(最新 32 个)只是用一个空浏览器打开,并且没有导航到 baseURL。我编写的测试适用于 chrome,但不适用于 Firefox。它可能与 conf 文件的设置方式有关。有任何想法吗?

配置文件:

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
    }
};
4

1 回答 1

7

Firefox 32 被 selenium <= 2.42.2 破坏

更新Selenium 2.43 已发布!

需要selenium 2.43或更新版本。或者将 Firefox 降级到 31 或更低版本。

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

仅供参考的输出可能如下所示:

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:........
于 2014-09-04T23:40:58.933 回答