TestingDocs.com logoTestingDocs.com
Automation learning lab
TestingDocs • Self-paced course

Playwright Automation
Self Study Guide

Start from zero. Learn JavaScript and TypeScript, automate browsers, and build reliable end-to-end tests.

60 chaptersBeginner friendlyHands-on practice
Playwright / Chapter 51 of 60~18 min • Beginner
Chapter 51Playwright

UI mode and Trace Viewer

UI mode runs tests interactively and allows inspection of actions. Trace Viewer opens recorded traces with snapshots, timing, source and diagnostic information. Trace collection can be configured for retries or failures; trace files may contain sensitive information.

How it works

Step-by-step walkthrough

  1. Run a test with tracing
  2. Open the HTML report or trace file
  3. Inspect the failing action

Example

Terminal
npx playwright test --ui
npx playwright test --trace on
npx playwright show-report
# Or: npx playwright show-trace path/to/trace.zip
Expected result: Interactive UI or trace viewer
💡 Point to remember
Keep traces private if they contain sensitive test data.

Screenshot walkthrough

Trace Viewer with a failed action selected
Trace Viewer with a failed action selected • Official Playwright documentation. Source and walkthrough

✎ Your practice task

Intentionally fail an assertion and inspect the error timeline.

Knowledge check

Which tool explores a recorded trace?

🌐 Continue learning