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

Cant execute a test on nightmare #6

Closed
gerardus1995 opened this Issue Mar 1, 2017 · 7 comments

Comments

Projects
None yet
2 participants
@gerardus1995

gerardus1995 commented Mar 1, 2017

I'm new to testcafe so i installed with the npm command provided nightmare browser and by the explanation i understand that after that i can execute my test "testcafe nightmare 'path/to/test/file.js'" but my console gives this error "ERROR Unable to find the browser. "browser-provider-nightmare" is not a browser alias or path to an executable file.". Is there something obvios that im missing out? I just did the 2 steps commented before. Thanks.

@AlexanderMoskovkin

This comment has been minimized.

AlexanderMoskovkin commented Mar 2, 2017

Hi!

From this error:

"ERROR Unable to find the browser. "browser-provider-nightmare" is not a browser alias or path to an executable file."

it seems that you call

testcafe browser-provider-nightmare test.js

to run tests. Am I right? If so, it should be

testcafe nightmare test.js
@gerardus1995

This comment has been minimized.

gerardus1995 commented Mar 2, 2017

Im already doing "testcafe nightmare test.js" and i get the error above. Im on a mac i dont think if this matters.

@gerardus1995

This comment has been minimized.

gerardus1995 commented Mar 2, 2017

sorry the error im getting is this one "ERROR Unable to find the browser. "nightmare" is not a browser alias or path to an executable file."

@AlexanderMoskovkin

This comment has been minimized.

AlexanderMoskovkin commented Mar 2, 2017

Please check that testcafe and testcafe-browser-provider-nightmare are installed locally both (or globally both). I've reproduced the issue only if I use locally installed testcafe, but the provider is installed globally (via npm install -g testcafe-browser-provider-nightmare)

@gerardus1995

This comment has been minimized.

gerardus1995 commented Mar 2, 2017

I definitely have testcafe installed because i already did some tests with it on chrome. And testcafe-browser-provider-nightmare seems to be installed as i can see it on node_modules. What do you mean by locally or globally? I installed both by npm install.

@AlexanderMoskovkin

This comment has been minimized.

AlexanderMoskovkin commented Mar 2, 2017

What do you mean by locally or globally?

I mean the following: https://docs.npmjs.com/getting-started/installing-npm-packages-globally

To be sure that both modules installed in the same way go to some folder, and call:

npm install testcafe
npm install testcafe-browser-provider-nightmare
testcafe --list-browsers nightmare

It should output "nightmare"

@gerardus1995

This comment has been minimized.

gerardus1995 commented Mar 2, 2017

Thanks, now its working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment