mirror of
https://github.com/microsoft/playwright-mcp.git
synced 2026-01-30 06:22:03 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cc557d677 | ||
|
|
15d382b940 | ||
|
|
e72701b21c | ||
|
|
8ee8445342 | ||
|
|
ac6e678135 |
23
README.md
23
README.md
@@ -84,7 +84,13 @@ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user),
|
||||
<details>
|
||||
<summary>Codex</summary>
|
||||
|
||||
Create or edit the configuration file `~/.codex/config.toml` and add:
|
||||
Use the Codex CLI to add the Playwright MCP server:
|
||||
|
||||
```bash
|
||||
codex mcp add playwright npx "@playwright/mcp@latest"
|
||||
```
|
||||
|
||||
Alternatively, create or edit the configuration file `~/.codex/config.toml` and add:
|
||||
|
||||
```toml
|
||||
[mcp_servers.playwright]
|
||||
@@ -109,6 +115,21 @@ Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, u
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Factory</summary>
|
||||
|
||||
Use the Factory CLI to add the Playwright MCP server:
|
||||
|
||||
```bash
|
||||
droid mcp add playwright "npx @playwright/mcp@latest"
|
||||
```
|
||||
|
||||
Alternatively, type `/mcp` within Factory droid to open an interactive UI for managing MCP servers.
|
||||
|
||||
For more information, see the [Factory MCP documentation](https://docs.factory.ai/cli/configuration/mcp).
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>Gemini CLI</summary>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Playwright MCP Bridge",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"description": "Share browser tabs with Playwright MCP server",
|
||||
"key": "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9nMS2b0WCohjVHPGb8D9qAdkbIngDqoAjTeSccHJijgcONejge+OJxOQOMLu7b0ovt1c9BiEJa5JcpM+EHFVGL1vluBxK71zmBy1m2f9vZF3HG0LSCp7YRkum9rAIEthDwbkxx6XTvpmAY5rjFa/NON6b9Hlbo+8peUSkoOK7HTwYnnI36asZ9eUTiveIf+DMPLojW2UX33vDWG2UKvMVDewzclb4+uLxAYshY7Mx8we/b44xu+Anb/EBLKjOPk9Yh541xJ5Ozc8EiP/5yxOp9c/lRiYUHaRW+4r0HKZyFt0eZ52ti2iM4Nfk7jRXR7an3JPsUIf5deC/1cVM/+1ZQIDAQAB",
|
||||
"permissions": [
|
||||
|
||||
4
extension/package-lock.json
generated
4
extension/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@playwright/mcp-extension",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@playwright/mcp-extension",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@types/chrome": "^0.0.315",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@playwright/mcp-extension",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"description": "Playwright MCP Browser Extension",
|
||||
"private": true,
|
||||
"repository": {
|
||||
|
||||
32
package-lock.json
generated
32
package-lock.json
generated
@@ -1,23 +1,23 @@
|
||||
{
|
||||
"name": "@playwright/mcp",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@playwright/mcp",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.57.0-alpha-2025-10-24",
|
||||
"playwright-core": "1.57.0-alpha-2025-10-24"
|
||||
"playwright": "1.57.0-alpha-2025-11-07",
|
||||
"playwright-core": "1.57.0-alpha-2025-11-07"
|
||||
},
|
||||
"bin": {
|
||||
"mcp-server-playwright": "cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.17.5",
|
||||
"@playwright/test": "1.57.0-alpha-2025-10-24",
|
||||
"@playwright/test": "1.57.0-alpha-2025-11-07",
|
||||
"@types/node": "^24.3.0",
|
||||
"zod-to-json-schema": "^3.24.6"
|
||||
},
|
||||
@@ -50,13 +50,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@playwright/test": {
|
||||
"version": "1.57.0-alpha-2025-10-24",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.57.0-alpha-2025-10-24.tgz",
|
||||
"integrity": "sha512-DJUHGfUcEZK3PLFphp/hq1ofBthwqaKARSQvtx9vdKgEXYfleaOKWCzhiS1zZpWdSQ3M2WUxpDIblQdrY5RkNQ==",
|
||||
"version": "1.57.0-alpha-2025-11-07",
|
||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.57.0-alpha-2025-11-07.tgz",
|
||||
"integrity": "sha512-dnSCKdVigPMHRVnBhiu4jh6GkKQfgtlHKBLxAYQUtIC0FmwryoxTFRtK5hNtcscfnRjy/LceSJlSwfDTTtbyBA==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright": "1.57.0-alpha-2025-10-24"
|
||||
"playwright": "1.57.0-alpha-2025-11-07"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -825,12 +825,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/playwright": {
|
||||
"version": "1.57.0-alpha-2025-10-24",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.57.0-alpha-2025-10-24.tgz",
|
||||
"integrity": "sha512-h7BK38U0t7ylKUftTHaL8erydzhwSstQco24OuEtoYS0xX67QHwc9fEQW2x6Rmnd8vT0RuD9ePuP3lDl2AmPDQ==",
|
||||
"version": "1.57.0-alpha-2025-11-07",
|
||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.57.0-alpha-2025-11-07.tgz",
|
||||
"integrity": "sha512-E5fgekU+NuIfE16bjL9xIffhmag2cInC/KDfXwvVGkCka5TpZfiWhHvCYIRW6/hEGr+eJS3jPHR91cyPO3gQgA==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"playwright-core": "1.57.0-alpha-2025-10-24"
|
||||
"playwright-core": "1.57.0-alpha-2025-11-07"
|
||||
},
|
||||
"bin": {
|
||||
"playwright": "cli.js"
|
||||
@@ -843,9 +843,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/playwright-core": {
|
||||
"version": "1.57.0-alpha-2025-10-24",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.57.0-alpha-2025-10-24.tgz",
|
||||
"integrity": "sha512-OXTMR6QjnUleUYLmEsZcKEvTaxik+6WEJgr6JXNxrD8DleV5U8+Hv5A1EDUfq3SpvUKstBnJEJwX7lyLHUKD2Q==",
|
||||
"version": "1.57.0-alpha-2025-11-07",
|
||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.57.0-alpha-2025-11-07.tgz",
|
||||
"integrity": "sha512-p61pk1XLuFBSia+37jfeuw62HbAi/KaXOGvjUoAiPdnDgO6AOj/DfodbWkZ1fqLZbW+q6Mja30YnzhD0CaePEQ==",
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"playwright-core": "cli.js"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@playwright/mcp",
|
||||
"version": "0.0.44",
|
||||
"version": "0.0.46",
|
||||
"description": "Playwright Tools for MCP",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -37,15 +37,15 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"playwright": "1.57.0-alpha-2025-10-24",
|
||||
"playwright-core": "1.57.0-alpha-2025-10-24"
|
||||
"playwright": "1.57.0-alpha-2025-11-07",
|
||||
"playwright-core": "1.57.0-alpha-2025-11-07"
|
||||
},
|
||||
"bin": {
|
||||
"mcp-server-playwright": "cli.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@modelcontextprotocol/sdk": "^1.17.5",
|
||||
"@playwright/test": "1.57.0-alpha-2025-10-24",
|
||||
"@playwright/test": "1.57.0-alpha-2025-11-07",
|
||||
"@types/node": "^24.3.0",
|
||||
"zod-to-json-schema": "^3.24.6"
|
||||
}
|
||||
|
||||
@@ -16,10 +16,16 @@
|
||||
|
||||
import { test, expect } from './fixtures';
|
||||
|
||||
test('browser_click', async ({ client, server, mcpBrowser }) => {
|
||||
test('browser_click', async ({ client, server }) => {
|
||||
server.setContent('/', `
|
||||
<title>Title</title>
|
||||
<button>Submit</button>
|
||||
<script>
|
||||
const button = document.querySelector('button');
|
||||
button.addEventListener('click', () => {
|
||||
button.focus(); // without manual focus, webkit focuses body
|
||||
});
|
||||
</script>
|
||||
`, 'text/html');
|
||||
|
||||
expect(await client.callTool({
|
||||
@@ -38,6 +44,6 @@ test('browser_click', async ({ client, server, mcpBrowser }) => {
|
||||
},
|
||||
})).toHaveResponse({
|
||||
code: `await page.getByRole('button', { name: 'Submit' }).click();`,
|
||||
pageState: expect.stringContaining(`- button "Submit" ${mcpBrowser !== 'webkit' || process.platform === 'linux' ? '[active] ' : ''}[ref=e2]`),
|
||||
pageState: expect.stringContaining(`button "Submit" [active] [ref=e2]`),
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user