Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: "file" argument must be a non-empty string #17

Open
stemkar123 opened this issue Jan 18, 2018 · 5 comments
Open

TypeError: "file" argument must be a non-empty string #17

stemkar123 opened this issue Jan 18, 2018 · 5 comments

Comments

@stemkar123
Copy link

I am using Protractor for automation. Actually I need to rerun the failed test cases so I used protractor-retry. But while execution I am getting "TypeError: "file" argument must be a non-empty string" error & failed cases are not re-executed.

below is my conf & spec file:

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);
}	

};

Sample.spec
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!');
});
});

Error logs
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)

Please assist

@dreuxl
Copy link
Contributor

dreuxl commented Jan 24, 2018

hi

  • What is the OS you are using? if windows, i m still working on windows support but for now not yet supported.
  • If you are running on Mac or Unix, can u please provide a console output gist of your run in order to try to repro.

Thanks

@stemkar123
Copy link
Author

@dreuxl I am using Windows10. Please let know once you got the solution for windows

@dreuxl
Copy link
Contributor

dreuxl commented Feb 8, 2018

#16 WIP

@ngaruko
Copy link

ngaruko commented Apr 16, 2018

I am having the same issue on Mac?
Error comes when trying to re-run the failed spec.

    at normalizeSpawnArguments (child_process.js:383:11)
    at Object.exports.spawn (child_process.js:496:38)
    at .../node_modules/protractor-retry/lib/retry.js:151:38
    at Function.promise ...(/node_modules/q/q.js:682:9)
    at../node_modules/protractor-retry/lib/retry.js:150:18
    at Promise.apply (../node_modules/q/q.js:1165:26)
    at Promise.promise.promiseDispatch (../medic-webapp/node_modules/q/q.js:788:41)
    at /../node_modules/q/q.js:1391:14
    at runSingle (../node_modules/q/q.js:137:13)
    at flush (../node_modules/q/q.js:125:13)

@bishnupanda93
Copy link

Can someone please let me know if the solution for windows is ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants