I'm using testcafe for test automation of angular based web application but my test is failing due to javascript error in browser console. I have tried to skip javascript error by using '--skip-js-errors' but it's not working so is there any way to handle it so test run without any error?
Asked
Active
Viewed 880 times
1
-
1What errors do you get? Not all errors can be skipped. You might want to fix them on your web site first. – Alex Skorkin Mar 09 '20 at 08:29
1 Answers
3
If you are passing '--skip-js-errors' in the terminal, please try this instead. Add "skipJsErrors": true in testcaferc.json of your e2e project and retry.

eliminatorMP
- 91
- 1
- 4
-
TestCafe 2.0 and newer versions also allow you to use different ways to ignore ONLY unimportant JS errors on testing pages (e.g., from third-party libraries or advertisement iframes). Read more about the `skip-js-errors` option in the [Docs](https://testcafe.io/documentation/404038/recipes/debugging/skip-javascript-errors). – Helen Dikareva Sep 02 '22 at 10:50