Rayrun
← Back to Discord Forum

Adding screenshot when running Playwright

How can I add screenshot taking when running playwright so that I can see the exact error in the browser?

This thread is trying to answer question "How can I add screenshot taking when running playwright so that I can see the exact error in the browser?"

3 replies
refactoreric

And an even better alternative (to screenshots): Enable trace files and use the trace viewer to troubleshoot your test issues.

Set your traces to 'retain-on-failure'

https://playwright.dev/docs/trace-viewer-intro

In our big repo we retain video and traces on failure.

It's the only way to help engineers move forward.

The video is a bit redundant but it's easier to share with no technical folks.

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.