Cypress web automation - Cannot open Test Runner - cypress

I'm trying to open the Test Runner in cypress first time using the command node_modules.bin\cypress open
But I'm getting the following error.
Cypress verification timed out
Command failed "path"\cypress.exe\smoke test ping=948
I had tried all other open commands as well.
Could you help me with this?

I know this question was long ago, but I just had this problem, and in case anyone does in the future, I want to tell you how I solved it. In my case I had just installed Cypress in a project, and after running npm install the problem has been solved.

Related

Unable to run Cypress 9.7.0 tests in Firefox

My Cypress tests run as expected in Chrome, Electron, & Edge.
However, when I try to run these tests against Firefox, I get the below error:
Cypress failed to make a connection to Firefox.
This usually indicates there was a problem opening the Firefox
browser.
Error: could not find CRI target
at lazyAssLogic
I am using Cypress version9.7.0, & using the below command:
"scripts": {
"firefoxTest": "cypress run --browser firefox"
}
One thing that may be important is that I'm using failOnStatusCode in some of the tests.
I've seen there have been similar issues before with earlier versions of Cypress such as this issue, but I believe that has been fixed in a later release.
Can someone please tell me what the issue may be?
By installing a older version from firefox (v 99) i could solve it. The idea i got from this forum https://issuehint.com/issue/cypress-io/cypress/22086 and the link for downloading an older version is from here https://ftp.mozilla.org/pub/firefox/releases/99.0/win64/en-US/. Hope this helps

Cypress doesn't create directory on install

I did have Cypress working at one point with 4.12.1, then upgraded to 5.0 and updated a couple of npm packages identified by npm-check-update. Now it refuses to start at all, it just hangs with Starting:Cypress displayed.
I tried my best to uninstall and remove all trace of cypress, even deleting the cache directory before installing the new version (either 4.12.1 or 5.0).
But every time I install it, even in a new project directory, it no longer creates the cypress directory. I think if I can find out why that isn't happening it will somehow be related to the original problem.
When I try to start with 'npx run cypress', I get the following:
Starting: cypress
internal/modules/cjs/loader.js:800
throw err;
^
Error: Cannot find module 'D:\inSight_HEAD\Web\Frontend\Apps\Test\cypress'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Function.Module.runMain (internal/modules/cjs/loader.js:1047:10)
at internal/main/run_main_module.js:17:11 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
I even went so far as to revert my (Windows 10) machine back to a system save point from yesterday when it was working, having to reinstall my web browsers afterward, but it didn't help.
Thanks for any ideas on how to proceed. I've only been using cypress for a couple of days, had written a few successful tests, but now it's come to a screeching halt and I've spent an entire day just trying to get it to run at all.
Thanks Alapan, that was it. Somehow I got confused and kept trying to run 'npx run cypress' (which either doesn't create the directories, or if the directories do exist it hangs forever on Starting: cypress), when I should have been running 'npx cypress open' or 'npx cypress run'.

cypress open --config baseUrl=https://... won't open

I can't manage to open cypress in my windows machine (this is the CI environment) when I pass --config:
In cmd.exe, if I type npx cypress open cypress opens just fine;
If I instead type npx cypress open --config baseUrl=https://... then nothing appears and the command terminates without printing anything in the terminal.
In the second case, echo %errorlevel% prints 0.
I can reproduce the problem with cypress run: passing a --config baseUrl=... parameter breaks it.
I'm using cypress package and binary 3.6.0. cypress verify is happy.
The regression is now fixed in Cypress 3.8.0 (h/t to Robert DROP TABLE STUDENTS).
OLD ANSWER:
It's a regression introduced in 3.5.0 which came bundled with new Electron, where the underlying issue seems to be this PR: electron/electron#13039 (h/t Jennifer Sheane), which is fixing a security issue and is unlikely to be reverted/handled differently any time soon.
It's being tracked in cypress shows error in Windows when passing args containing a url in 3.5.0.

Selenium::WebDriver::Error::WebDriverError: unexpected response, code=404, content-type=""

I am trying to execute some tests using archani for auto login plugin and intermittently I see this error Has anyone else also experienced this issue? If yes, what are possible ways of resolving?
I had similar (if not the same) issue. I'm not sure what is your exact error (next row), because you haven't added it, mine was Unable to load Atom 'execute_script' from file './third_party/webdriver-atoms/execute_script.js'. And resolution was just to update phantomjs, which I did just by running npm install -g phantomjs.
That was it. Hope this helps

Running Expresso TDD in Node.js on Windows

Has anyone been able to get this to work?
Environment:
Windows 7 64-bit
node.js v0.6.7
npm 1.1.0-beta-10
expresso 0.9.2
I've successfully installed via npm from zip download (after modifying package.json to remove node-jscoverage dependence). 'npm ls' lists expresso as installed. After overcoming the problem described here by commenting out the reference to SIGINT, expresso will execute from cmd window. However, when I actually attempt to run test suites, I get a 'Cannot find module' error when it tries to open the first test suite. Any help would be appreciated.
You'll have to install the module locally, too.
Have you considered using mocha? It's supposed to be expresso's successor, written by the same author.

Resources