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.| Playwright CLI | Playwriter | |
| Browser | Spawns new browser | Uses your Chrome |
| Login state | Fresh (logged out) | Already logged in |
| Extensions | None | Your existing ones |
| Captchas | Always blocked | Bypass (disconnect extension) |
| Collaboration | Separate window | Same browser as user |
| Capabilities | Limited command set | Anything Playwright can do |
| Raw CDP access | No | Yes |
| Video recording | File-based tracing | Native tab capture (30-60fps) |
12345# 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' })"
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.12playwriter -s 1 -e "state.cdp = getCDPSession({ page })" playwriter -s 1 -e "state.cdp.send('Performance.getMetrics').then(console.log)"
chrome.tabCapture for native 30-60fps recording that survives page navigation.123playwriter -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 })"