Install from the Chrome Web Store, then click the extension icon on any tab. The icon turns green when connected.
The extension works with Chrome, Chromium, Brave, Arc, Edge, and any Chromium-based browser.
Only tabs where you click the extension icon are controllable. Other tabs stay private.
Install the CLI
1npm i -g playwriter
Or use without installing:
1npx playwriter@latest session new
Requirements: Node.js 18+.
Install the skill
The skill teaches your AI agent how to use Playwriter: which selectors to use, how to read snapshots, how to avoid common mistakes, and all available utilities.
This works with any agent that supports skills (OpenCode, Cursor, Claude Code, etc.). The skill is the recommended way to use Playwriter with agents; it gives them comprehensive instructions so they can use the full API without trial and error.
Quick start
1234playwriter session new # creates sandbox, outputs id (e.g. 1)playwriter-s1-e'state.page = await context.newPage(); await state.page.goto("https://example.com")'playwriter-s1-e'console.log(await snapshot({ page: state.page }))'playwriter-s1-e'await state.page.locator("aria-ref=e5").click()'
Start Chrome for Testing
If you don't have Chrome running or want a clean instance with the extension pre-loaded:
1playwriter browser start
This auto-finds Chrome for Testing or Chromium on your system, launches it with recording flags enabled, and loads the bundled Playwriter extension. You can also pass a specific browser binary:
1playwriter browser start /path/to/chrome
Verify it works
After installing the extension and CLI:
Open any website in Chrome
Click the Playwriter extension icon (turns green)
Run:
12playwriter session new
playwriter-s1-e'console.log(context.pages().map((p) => p.url()))'
If you see the tab URL printed, everything is working.