Agent-readable docs index: /llms.txt. Download /docs.zip to grep all markdown files locally.

Playwriter vs Playwright CLI

The Playwright CLI (npx playwright) launches a new browser for testing and automation. It's great for CI/CD pipelines and test suites, but for agent-driven browser control it has the same fresh-browser limitations as Playwright MCP.
Playwriter gives you the full Playwright API but runs it against your existing Chrome.

Comparison

Playwright CLIPlaywriter
BrowserSpawns new browserUses your Chrome
Login stateFresh (logged out)Already logged in
ExtensionsNoneYour existing ones
CaptchasAlways blockedBypass (disconnect extension)
CollaborationSeparate windowSame browser as user
CapabilitiesLimited command setAnything Playwright can do
Raw CDP accessNoYes
Video recordingFile-based tracingNative tab capture (30-60fps)

Same API, different browser

Playwriter uses the same Playwright API you already know. The difference is where it runs. Instead of spawning a new browser, your code controls the browser you're already using.
# Playwright CLI: fresh browser, no state npx playwright screenshot https://example.com shot.png # Playwriter: your browser, your cookies, your extensions playwriter -s 1 -e "page.screenshot({ path: './shot.png', scale: 'css' })"

Raw CDP access

Playwriter exposes the full Chrome DevTools Protocol through getCDPSession. This lets agents set breakpoints, profile performance, intercept network requests, and live-edit page scripts. The Playwright CLI doesn't expose CDP at all.
playwriter -s 1 -e "state.cdp = getCDPSession({ page })" playwriter -s 1 -e "state.cdp.send('Performance.getMetrics').then(console.log)"

Video recording

Playwright CLI records via tracing (file-based, low FPS). Playwriter uses chrome.tabCapture for native 30-60fps recording that survives page navigation.
playwriter -s 1 -e "recording.start({ page, outputPath: './demo.mp4' })" playwriter -s 1 -e "page.click('a'); page.waitForLoadState('domcontentloaded')" playwriter -s 1 -e "recording.stop({ page })"