playwright-trace
Skill5 starsChanged 16 days agoMITView on GitHub
Inspect Playwright trace files from the command line — list actions, view requests, console, errors, snapshots and screenshots.
5 other projects use a version of this, 4 of them edited; 2 new projects in the last 4 weeks, against 0 the 4 before.
Adopted by
Surging: 2 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- nora-weisser/ai-assisted-testing-demoedited, first seen Nov 8, 2026
- PracticalSwan/agent-skillsedited, first seen Oct 19, 2026
- microsoft/playwrightword for word, first seen Oct 13, 2026
- JameMy0001/antigravity-skills-hubedited, first seen Oct 2, 2026
- dqtx760/skills-manageedited, first seen May 27, 2026
Other versions5 projects use a version of this.
Word for word · 1
- microsoft/playwright★ 100k100% same
Edited · 4
- PracticalSwan/agent-skills★ 2246% same
- dqtx760/skills-manage★ 297% same
- nora-weisser/ai-assisted-testing-demo★ 297% same
- JameMy0001/antigravity-skills-hub★ 186% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/playwright-e2e.mdcCursor rule
- playwright-cliSkill
- playwright-component-testingSkill
- playwright-e2eSkill
- playwright-cliSkill
- playwright-component-testingSkill
- playwright-e2eSkill
- playwright-traceSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 0 are distinctive, and 8 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Start with trace open <trace.zip> to extract the trace and see its metadata.
- Very specific: line 14
Use trace actions to see all actions with their action IDs.
- Very specific: line 15
Use trace action <action-id> to drill into a specific action — see parameters, logs, source location, and available snapshots.
- Very specific: line 16
Use trace requests, trace console, or trace errors for cross-cutting views.
- Very specific: line 17
Use trace snapshot <action-id> to get the DOM snapshot, or run a browser command against it.
- Very specific: line 18
Use trace close to remove the extracted trace data when done.
- Very specific: line 20
All commands after open operate on the currently opened trace — no need to pass the trace file again.
- Very specific: line 135
Only three browser commands are useful on a frozen snapshot: snapshot, eval, and screenshot.
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Playwright Trace CLI
Inspect .zip trace files produced by Playwright tests without opening a browser.
Workflow
- Start with
trace open <trace.zip>to extract the trace and see its metadata. - Use
trace actionsto see all actions with their action IDs. - Use
trace action <action-id>to drill into a specific action — see parameters, logs, source location, and available snapshots. - Use
trace requests,trace console, ortrace errorsfor cross-cutting views. - Use
trace snapshot <action-id>to get the DOM snapshot, or run a browser command against it. - Use
trace closeto remove the extracted trace data when done.
All commands after open operate on the currently opened trace — no need to pass the trace file again. Opening a new trace replaces the previous one.
Commands
Open a trace
# Extract trace and show metadata: browser, viewport, duration, action/error counts
npx playwright trace open <trace.zip>Close a trace
# Remove extracted trace data
npx playwright trace closeActions
# List all actions as a tree with action IDs and timing
npx playwright trace actions
# Filter by action title (regex, case-insensitive)
npx playwright trace actions --grep "click"
# Only failed actions
npx playwright trace actions --errors-onlyAction details
# Show full details for one action: params, result, logs, source, snapshots
npx playwright trace action <action-id>The action command displays available snapshot phases (before, action, after) and the exact command to extract them.
Requests
# All network requests: start time (on the `trace actions` clock), method, status, URL, duration, size
npx playwright trace requests
# Filter by URL pattern
npx playwright trace requests --grep "api"
# Filter by HTTP method
npx playwright trace requests --method POST
# Only failed requests (status >= 400)
npx playwright trace requests --failedRequest details
# Show full details for one request: headers, body, security
npx playwright trace request <request-id>Console
# All console messages and stdout/stderr
npx playwright trace console
# Only errors
npx playwright trace console --errors-only
# Only browser console (no stdout/stderr)
npx playwright trace console --browser
# Only stdout/stderr (no browser console)
npx playwright trace console --stdio
# Filter by message text pattern
npx playwright trace console --grep "failed to fetch"Errors
# All errors with stack traces and associated actions
npx playwright trace errorsSnapshots
The snapshot command loads the DOM snapshot for an action into a headless browser and runs a single browser command against it. Without a browser command, it returns the accessibility snapshot.
# Get the accessibility snapshot (default)
npx playwright trace snapshot <action-id>
# Use a specific phase
npx playwright trace snapshot <action-id> --phase before
# Run eval to query the DOM
npx playwright trace snapshot <action-id> -- eval "document.title"
npx playwright trace snapshot <action-id> -- eval "document.querySelector('#error').textContent"
# Eval on a specific element ref (from the snapshot)
npx playwright trace snapshot <action-id> -- eval "el => el.getAttribute('data-testid')" e5
# Take a screenshot of the snapshot
npx playwright trace snapshot <action-id> -- screenshot
# Redirect output to a file
npx playwright trace snapshot <action-id> -- eval "document.body.outerHTML" --filename=page.html
npx playwright trace snapshot <action-id> -- screenshot --filename=screenshot.pngOnly three browser commands are useful on a frozen snapshot: snapshot, eval, and screenshot.
Attachments
# List all trace attachments
npx playwright trace attachments
# Extract an attachment by its number
npx playwright trace attachment 1
npx playwright trace attachment 1 -o out.pngTypical investigation
# 1. Open the trace and see what's inside
npx playwright trace open test-results/my-test/trace.zip
# 2. What actions ran?
npx playwright trace actions
# 3. Which action failed?
npx playwright trace actions --errors-only
# 4. What went wrong?
npx playwright trace action 12
# 5. What did the page look like at that moment?
npx playwright trace snapshot 12
# 6. Query the DOM for more detail
npx playwright trace snapshot 12 -- eval "document.querySelector('.error-message').textContent"
# 7. Any relevant network failures?
npx playwright trace requests --failed
# 8. Any console errors?
npx playwright trace console --errors-onlyDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

