Node.js 量角器浏览器,但未连接到测试url
我有Windows10笔记本电脑。我的问题是,在运行conf.js文件之后,浏览器正在打开,但没有连接到测试url。给出以下错误消息Node.js 量角器浏览器,但未连接到测试url,node.js,protractor,Node.js,Protractor,我有Windows10笔记本电脑。我的问题是,在运行conf.js文件之后,浏览器正在打开,但没有连接到测试url。给出以下错误消息 C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\acer\AppData\Roaming\npm\protractor conf.js Report destination: target\screenshots\Report.h
C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\acer\AppData\Roaming\npm\protractor conf.js
Report destination: target\screenshots\Report.html
[15:59:26] I/direct - Using FirefoxDriver directly...
[15:59:26] I/launcher - Running 1 instances of WebDriver
[16:00:15] E/launcher - Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hub
[16:00:15] E/launcher - Error: Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hubat Error (native)
And lastly [16:00:15] E/launcher - Process exited with error code 199
enter code here
conf.js文件如下所示:
var htmlscreenshorteporter=require(“量角器-jasmine2-screenshot-reporter”)
在执行测试之前运行
webdriver manager start
。在执行测试之前运行webdriver manager start
。您可以发布config.json
文件的内容吗?将chrome驱动程序更改为v23.x.x。这将解决我的问题guess@sudharshan.我已经上传了conf.js文件,我已经执行了,并且得到了上面的错误。macbook上正在执行相同的conf.js文件。请尽快回复我您的反馈。您能发布config.json
文件的内容吗?将您的chrome驱动程序更改为v23.x.x。这将解决我的问题guess@sudharshan.我已经上传了conf.js文件,我已经执行了,并且得到了上面的错误。macbook上正在执行相同的conf.js文件。请尽快将您的反馈回复给我。@morgan。是的,我已尝试运行webdriver manager start并成功执行。@morgan。是的,我已尝试运行webdriver manager start并成功执行。
var reporter = new HtmlScreenshotReporter({
dest: 'target/screenshots',
filename: 'Report.html',
reportTitle: 'Execution Report',
showSummary: true,
showQuickLinks: true,
pathBuilder: function(currentSpec, suites, browserCapabilities) {
// will return chrome/your-spec-name.png
return browserCapabilities.get('browserName') + '/' + currentSpec.fullName;
}
});
exports.config = {
directConnect: true,
//seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {'browserName': 'firefox'},
// multiCapabilities: [
// {
// browserName: 'firefox'
// },
// {
// browserName: 'chrome'
// }
// ],
framework: 'jasmine',
specs: ['Login_spec3.js'],
//'Login_spec2.js','Article_spec.js','Catalog_spec.js', ' 'LoginwithTD_spec2.js', 'Login_spec3copy.js','Setting_spec.js'
allScriptsTimeout: 300000,
getPageTimeout: 300000,
jasmineNodeOpts: {
defaultTimeoutInterval: 300000
},
// Setup the report before any tests start
beforeLaunch: function() {
return new Promise(function(resolve){
reporter.beforeLaunch(resolve);
});
},
// Close the report after all tests finish
afterLaunch: function(exitCode) {
return new Promise(function(resolve){
reporter.afterLaunch(resolve.bind(this, exitCode));
});
},
onPrepare: function() {
var width = 1300;
var height = 1200;
browser.driver.manage().window().setSize(width,height);
jasmine.getEnv().addReporter(reporter);
afterAll(function(done) {
process.nextTick(done);
})
//browser.params.users = require('./shared.params.' + countryCode + '.json').users;
}
};
*I have copied some scripts(which is executable on her macbook) from a friend and paste it in a folderin window 10 pc named FFAutomation path. C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation
1)I have update the chrome driver to version 2.24 chromedriver_win32 , update the chrome driver with command "webdriver-manager update" and run the webdriver with command "webdriver-manager start".
2) Than i run conf.js file on another terminal with the firefox browser
C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\ acer\AppData\Roaming\npm\protractor conf.js
I am getting this following error
Report destination: target\screenshots\Report.html
[15:59:26] I/direct - Using FirefoxDriver directly...
[15:59:26] I/launcher - Running 1 instances of WebDriver
[16:00:15] E/launcher - Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hub
[16:00:15] E/launcher - Error: Timed out waiting for the WebDriver server at http://127.0.0.1:55402/hubat Error (native)
And lastly [16:00:15] E/launcher - Process exited with error code 199
enter code here
3) Than i run conf.js file on another terminal with the "chrome" browser
C:\Users\acer\AppData\Roaming\npm\node_modules\protractor\FFAutomation>C:\Users\ acer\AppData\Roaming\npm\protractor conf.js
I am getting this following error
Error: Error: Cannot find module '/Users/rohitgathibandhe/npm- global/lib/node_modules/protractor/FFAutomation/Function_Lib.js'
E/launcher - Process exited with error code 100