我正在使用Protractor进行自动化。实际上我需要重新运行失败的测试用例,所以我使用了量角器重试。但是,当我得到执行时#34; TypeError:" file"参数必须是非空字符串"错误&失败的案件不会被重新执行。
下面是我的conf& spec文件:
Sample.conf
var retry = require('protractor-retry').retry;
exports.config = {
specs: ['sampleCase.js'],
onCleanUp: function (results) {
retry.onCleanUp(results);
},
onPrepare: function () {
retry.onPrepare();
},
afterLaunch: function() {
return retry.afterLaunch(3);
}
};
SampleSpec.js
describe('Enter GURU99 Name', function() {
it('should add a Name as GURU99', function() {
browser.get('https://angularjs.org');
element(by.model('yourName')).sendKeys('GURU99');
var guru= element(by.xpath('html/body/div[2]/div[1]/div[2]/div[2]/div/h1'));
expect(guru.getText()).toEqual('Hello GURU99111!');
});
});
详细错误:
E/launcher - Error: TypeError: "file" argument must be a non-empty string
at normalizeSpawnArguments (child_process.js:380:11)
at Object.exports.spawn (child_process.js:487:38)
请协助