florian norbert bepunkt
florian norbert bepunkt

Reputation: 2539

How to ignore website console error in playwright tests?

I'm using playwright for some visual regression testing. On the site in question there third-party scripts that might throw a console error if blocked by the user due to privacy concerns. My playwright tests fail due to those console errors

Is there a way to ignore some or all website console errors so my regression tests pass?

Upvotes: 2

Views: 4256

Answers (1)

Max Schmitt
Max Schmitt

Reputation: 3152

When you are using jest-playwright then you can put exitOnPageError: false in your jest-playwright.config.js.

See here for more information: https://github.com/playwright-community/jest-playwright#options

Upvotes: 3

Related Questions