1

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?

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47

1 Answers1

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