我正在努力让elementExplorer正常工作。
我正在尝试以下方法:
node node_modules\protractor\bin\protractor .\protractor.dev.conf.js --baseUrl http://angularjs.org --elementExplorer
使用以下配置
/// protractor.dev.conf.js
exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
baseUrl: 'http://localhost:54054/',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true'],
'binary' : 'C:\\Users\\me\\AppData\\Local\\Chromium\\Application\\chrome.exe'
}
},
specs: ['specs/acceptance/**/*.js'],
framework: 'mocha',
onPrepare: 'specs/bootstrap-specs.js',
mochaOpts: {
reporter: "spec",
debug : true,
timeout : 4000
}
};
它按预期加载铬,但它不会重定向到http://angularjs.org,并且repl永远不会出现。
任何可能出错的想法?
注意:我可以正常执行正常测试
由于
我添加了--troubleshoot标志并获得以下内容:
> DEBUG - Running with --troubleshoot DEBUG - Protractor version: 1.7.0
> DEBUG - Your base url for tests is http://angularjs.org Using the
> selenium server at http://localhost:4444/wd/hub DEBUG - WebDriver
> session successfully started with capabilities { caps_: { platform:
> 'XP',
> acceptSslCerts: true,
> javascriptEnabled: true,
> browserName: 'chrome',
> chrome: { userDataDir: 'C:\\Users\\me\\AppData\\Local\\Temp\\scoped_dir25488_18232' },
> rotatable: false,
> locationContextEnabled: true,
> mobileEmulationEnabled: false,
> 'webdriver.remote.sessionid': '06c7edae-15e9-4e9a-8293-91e2d5c4fe90',
> version: '42.0.2310.0',
> takesHeapSnapshot: true,
> cssSelectorsEnabled: true,
> databaseEnabled: false,
> handlesAlerts: true,
> browserConnectionEnabled: false,
> nativeEvents: true,
> webStorageEnabled: true,
> applicationCacheEnabled: false,
> takesScreenshot: true } } Starting debugger agent. Debugger listening on port 5858