Reputation: 417
I am using cypress to test my web site. Everything works great but there is one page that opens fine when I am running the test using chrome but if I try to run that against headless or regular electron the lhes simply don’t open. I am assuming that there must be something on my code that is not working on the chromium version that electron uses (61) that do works the version that chromes uses (75).
Is there a way to debug or check some logging on what is not being able to execute? The console for electron does not display anything.
Any ideas?
Upvotes: 2
Views: 2904
Reputation: 665
After adding these two env variables Cypress started showing console.log output on the terminal:
ELECTRON_ENABLE_LOGGING=true DEBUG=cypress:electron $(npm bin)/cypress run ...
Upvotes: 4
Reputation: 5871
You can show console.log
messages from Electron by enabling a subset of DEBUG
logs.
Like so:
npm i -g cross-env
cross-env DEBUG=cypress:server:browsers:electron cypress run...
DEBUG=cypress:server:browsers:electron cypress run...
Upvotes: 4