Debug a CI-only Playwright test failure by capturing and inspecting a trace.zip in Trace Viewer

domain: playwright.dev · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Set trace: 'retain-on-failure' (or 'on-first-retry' combined with retries) in playwright.config so traces are saved only for failing runs, keeping CI artifact size manageable
  2. Upload the resulting trace.zip as a CI artifact after the test run completes
  3. Open it locally with npx playwright show-trace trace.zip, or drag it into trace.playwright.dev without installing anything
  4. Step through the action timeline, before/after DOM snapshots, console logs, and network requests together to find where behavior diverged from expectations
  5. Use the trace's Call tab to see exact locator resolution and source line, often faster than reproducing the failure on a local machine

Known gotchas

Related routes

open a playwright ci trace.zip artifact in the hosted trace viewer without downloading it locally
playwright.dev · 5 steps · unrated
Use Playwright Trace Viewer and built-in debugging tools to diagnose and fix flaky tests
playwright.dev · 5 steps · unrated
Capture and inspect a Playwright trace from a Robot Framework Browser library test suite
robotframework-browser.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans