我一直在尝试使用“量角器茉莉花2截图记者”,但HTML报告得到我的执行结果的HTML报告和屏幕截图与内容创建像量角器茉莉花2截图记者创建报告,但结果为'0',没有截图
报告
摘要
总规格测试:0
总失败:0
并没有截图保存在该位置。 HTML report screenshot here
我的配置文件是如下
var HtmlScreenshotReporter = require('protractor-jasmine2-screenshot-reporter');
var reporter = new HtmlScreenshotReporter({
dest: 'target/screenshots',
filename: 'my-report.html'
});
exports.config = {
directConnect: true,
//seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {'browserName': 'chrome'},
framework: 'jasmine',
specs: ['Login_spec3.js'],
allScriptsTimeout: 180000,
getPageTimeout: 180000,
jasmineNodeOpts: {
defaultTimeoutInterval: 180000
},
// Setup the report before any tests start
beforeLaunch: function() {
return new Promise(function(resolve){
reporter.beforeLaunch(resolve);
});
},
// Assign the test reporter to each running instance
onPrepare: function() {
jasmine.getEnv().addReporter(reporter);
afterAll(function(done) {
process.nextTick(done);
})
},
// 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);
}
};
其他详情如下: [email protected], nodeVersion:4.2.4, npmVersion:12年2月14日, 茉莉:2.4 .1, selenium-webdriver:2.52.0
有人可以建议我任何解决方案吗?
它没有找到你的规格,检查你的规格路径! –
感谢您的回复。 “检查规范的路径”是什么意思?你能告诉我什么应该是文件夹结构? –
用于conf和spec文件的我的文件夹结构是:User/My_folder/npm-global/lib/node_modules/protractor/FFAutomation,在FFAutomation里面我有我所有的spec文件和conf文件。 “量角器-jasmine2-screenshot-reporter”的文件夹结构是:User/My_folder/node_modules。我的目标文件夹正在FFAutomation文件夹内创建。我需要改变什么吗?请建议。 –