因此,出于某种原因,当我运行量角器时,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
}
};
答案 0 :(得分: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
FYI输出可能如下所示:
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:........