我正在尝试对chrome和firefox运行e2e测试,并且无法使用以下配置加载chrome浏览器,非常感谢任何评论,谢谢
var HtmlReporter = require('protractor-beautiful-reporter');
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: [ **some spec**
],
multiCapabilities: [{
"browserName": "firefox"
},
{
"browserName": "chrome",
}
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 180000
},
allScriptsTimeout: 200000,
onPrepare: function () {
browser.manage().timeouts().implicitlyWait(20000);
jasmine.getEnv().addReporter(new HtmlReporter({
baseDirectory: 'test-result',
preserveDirectory: false,
takeScreenShotsOnlyForFailedSpecs: true,
screenshotsSubfolder: 'images'
}).getJasmine2Reporter());
}
};
尝试使用directConnect: true
而不是使用seleniumAddress: http://localhost:4444/wd/hub
或确保您的网格服务器已启动并正在运行,并且硒服务器已启动并正在运行
启动硒服务器webdriver-manager start
的命令