Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(trace): redirect output to file via --filename (#39953)

Simon Knott6b4c44ec902d
diff --git a/packages/playwright-core/src/tools/trace/SKILL.md b/packages/playwright-core/src/tools/trace/SKILL.md
index 6cf0af85ab..cc2e80a30b 100644
--- a/packages/playwright-core/src/tools/trace/SKILL.md
+++ b/packages/playwright-core/src/tools/trace/SKILL.md
@@ -125,8 +125,8 @@ npx playwright trace snapshot <action-id> -- eval "el => el.getAttribute('data-t
npx playwright trace snapshot <action-id> -- screenshot
# Redirect output to a file
-npx playwright trace snapshot <action-id> -- eval "document.body.outerHTML" > page.html
-npx playwright trace snapshot <action-id> -- screenshot > screenshot.png
+npx playwright trace snapshot <action-id> -- eval "document.body.outerHTML" --filename=page.html
+npx playwright trace snapshot <action-id> -- screenshot --filename=screenshot.png
```
Only three browser commands are useful on a frozen snapshot: `snapshot`, `eval`, and `screenshot`.