Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs(cli): open the browser before tracing-start in the tracing reference (#43466)
Pablo De Chiaro Rosacdcef0bc92d3
diff --git a/packages/playwright-core/src/tools/skills/playwright-cli/references/tracing.md b/packages/playwright-core/src/tools/skills/playwright-cli/references/tracing.mdindex 51b8d30489..88d7eab621 100644--- a/packages/playwright-core/src/tools/skills/playwright-cli/references/tracing.md+++ b/packages/playwright-core/src/tools/skills/playwright-cli/references/tracing.md@@ -5,11 +5,14 @@ Capture detailed execution traces for debugging and analysis. Traces include DOM## Basic Usage```bash+# Open the browser (tracing needs an open browser)+playwright-cli open+# Start trace recordingplaywright-cli tracing-start# Perform actions-playwright-cli open https://example.com+playwright-cli goto https://example.complaywright-cli click e1playwright-cli fill e2 "test"@@ -64,8 +67,9 @@ When you start tracing, Playwright creates a `.playwright-cli/traces/` directory### Debugging Failed Actions```bash+playwright-cli openplaywright-cli tracing-start-playwright-cli open https://app.example.com+playwright-cli goto https://app.example.com# This click fails - why?playwright-cli click e5@@ -77,8 +81,9 @@ playwright-cli tracing-stop### Analyzing Performance```bash+playwright-cli openplaywright-cli tracing-start-playwright-cli open https://slow-site.com+playwright-cli goto https://slow-site.complaywright-cli tracing-stop# View network waterfall to identify slow resources@@ -88,9 +93,10 @@ playwright-cli tracing-stop```bash# Record a complete user flow for documentation+playwright-cli openplaywright-cli tracing-start-playwright-cli open https://app.example.com/checkout+playwright-cli goto https://app.example.com/checkoutplaywright-cli fill e1 "4111111111111111"playwright-cli fill e2 "12/25"playwright-cli fill e3 "123"@@ -117,8 +123,9 @@ playwright-cli tracing-stop```bash# Trace the entire flow, not just the failing step+playwright-cli openplaywright-cli tracing-start-playwright-cli open https://example.com+playwright-cli goto https://example.com# ... all steps leading to the issue ...playwright-cli tracing-stop```