Closed Nantris closed 4 years ago
I also tried installing the devDependencies
as regular dependencies, and even adding testcafe
as a local dependency, but electron
is never a recognized browser.
@AndreyBelym any thoughts on this? I'd love to use TestCafe, but so far, no luck. I've tried powershell
, cmd
and babun
terminals, but the same error every time.
Please, specify your Node.js and NPM/Yarn versions. Try to add testcafe
to the devDependencies
and try to execute the following commands in a cmd
session:
npm cache clean -f
rd /s /q node_modules
npm install --production=false
If it doesn't help, please follow steps from this comment and post your directory structure here.
I was facing the same issue on Linux - again TestCafe is installed globally but my Electron app was built as an executable file.
Resolved it by doing yarn add -D testcafe testcafe-browser-provider-electron
testcafe -b electron
then returned:
Using locally installed version of TestCafe.
"electron:${PATH_TO_ELECTRON_APP}"
Then when I tried to run a test it launched my app OK.
Re-installing packages worked for me.
@calumcraig @pjc0247
Thank you for sharing your experience with us.
This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.
Running from
/
which contains the following files:package.json
.testcafe-electron-rc
testcafe electron ./tests/testcafe/test1.js
ortestcafe "electron:./" ./tests/testcafe/test1.js
both lead to:ERROR Unable to find the browser. "electron" is not a browser alias or path to an executable file.
I have
testcafe@0.23.0
installed globally on Windows 7 x64.testcafe -b
returns Firefox, IE, and Chrome, but not Electron. Using an absolute path makes no difference.