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 HtmlScreenshotReporter = require(' protractor-jasmine2-screenshot-reporter');
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
答案 0 :(得分:0)
在执行测试之前运行webdriver-manager start
。