playwright-mcp/tests
Max Schmitt 6c3f3b6576
feat: add MCP Chrome extension (#325)
Instructions:

1. `git clone https://github.com/mxschmitt/playwright-mcp && git
checkout extension-drafft`
2. `npm ci && npm run build`
3. `chrome://extensions` in your normal Chrome, "load unpacked" and
select the extension folder.
4. `node cli.js --port=4242 --extension` - The URL it prints at the end
you can put into the extension popup.
5. 
Put either this into Claude Desktop (it does not support SSE yet hence
wrapping it or just put the URL into Cursor/VSCode)

```json
{
  "mcpServers": {
    "playwright": {
      "command": "bash",
      "args": [
        "-c",
        "source $HOME/.nvm/nvm.sh && nvm use --silent 22 && npx supergateway --streamableHttp http://127.0.0.1:4242/mcp"
      ]
    }
  }
}
```

Things like `Take a snapshot of my browser.` should now work in your
Prompt Chat.

----

- SSE only for now, since we already have a http server with a port
there
- Upstream "page tests" can be executed over this CDP relay via
https://github.com/microsoft/playwright/pull/36286
- Limitations for now are everything what happens outside of the tab its
session is shared with -> `window.open` / `target=_blank`.

---------

Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-06-13 13:15:17 -07:00
..
testserver chore: only reset network log upon explicit navigation (#377) 2025-05-08 17:02:09 -07:00
browser-server.spec.ts chore: rename browser agent to server (#521) 2025-06-04 16:43:11 -07:00
capabilities.spec.ts test: verify the log in close/navigate test (#505) 2025-06-01 12:49:30 -07:00
cdp.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
config.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
console.spec.ts chore: account for undefined arguments (#400) 2025-05-12 09:35:33 -07:00
core.spec.ts chore: account for undefined arguments (#400) 2025-05-12 09:35:33 -07:00
device.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
dialogs.spec.ts chore: roll playwright 5/9 (#394) 2025-05-09 18:01:17 -07:00
extension.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
files.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
fixtures.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
headed.spec.ts test: run tests on MCP server inside Docker (#361) 2025-05-07 18:04:20 +02:00
iframes.spec.ts chore: roll playwright 5/9 (#394) 2025-05-09 18:01:17 -07:00
install.spec.ts chore: account for undefined arguments (#400) 2025-05-12 09:35:33 -07:00
launch.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
library.spec.ts chore: make library test run under older Node versions (#479) 2025-05-27 13:19:25 -07:00
network.spec.ts chore: account for undefined arguments (#400) 2025-05-12 09:35:33 -07:00
pdf.spec.ts test: verify the log in close/navigate test (#505) 2025-06-01 12:49:30 -07:00
request-blocking.spec.ts test: verify the log in close/navigate test (#505) 2025-06-01 12:49:30 -07:00
screenshot.spec.ts test: verify the log in close/navigate test (#505) 2025-06-01 12:49:30 -07:00
sse.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
tabs.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
trace.spec.ts feat: add MCP Chrome extension (#325) 2025-06-13 13:15:17 -07:00
wait.spec.ts chore: roll playwright 5/9 (#394) 2025-05-09 18:01:17 -07:00
webdriver.spec.ts chore: migrate to ESM (#303) 2025-04-30 23:06:56 +02:00