How to debug failed scripts with Playwright’s Trace Viewer



AI Summary

This video from Checkly demonstrates how to debug Playwright scripts using Playwright’s Trace Viewer. It covers a sample Playwright test script for navigation and assertions on the Checkly website. The tutorial explains how to configure tracing in the Playwright config to record all steps in the script. It shows how to intentionally fail a test to create a trace.zip file and then use the “show trace” command to open the Playwright Trace Viewer. The viewer presents a timeline with screenshots and a list of actions from the script, highlighting where the failure occurred and helping to understand the root cause. This tool is particularly useful for intermittent or environment-specific test failures, allowing developers to ‘travel back in time’ and see exactly what happened during test execution.