Spaces:
Paused
Paused
Yury Semikhatsky commited on
chore: roll 1.59.0-alpha-1771028105000 (#1400)
Browse files- README.md +2 -2
- package-lock.json +25 -14
- package.json +1 -1
- packages/extension/README.md +2 -9
- packages/extension/package.json +1 -0
- packages/extension/tests/extension.spec.ts +9 -6
- packages/playwright-mcp/cli.js +2 -2
- packages/playwright-mcp/package.json +2 -2
README.md
CHANGED
|
@@ -344,6 +344,8 @@ Playwright MCP server supports following arguments. They can be provided in the
|
|
| 344 |
| --cdp-endpoint <endpoint> | CDP endpoint to connect to.<br>*env* `PLAYWRIGHT_MCP_CDP_ENDPOINT` |
|
| 345 |
| --cdp-header <headers...> | CDP headers to send with the connect request, multiple can be specified.<br>*env* `PLAYWRIGHT_MCP_CDP_HEADER` |
|
| 346 |
| --cdp-timeout <timeout> | timeout in milliseconds for connecting to CDP endpoint, defaults to 30000ms<br>*env* `PLAYWRIGHT_MCP_CDP_TIMEOUT` |
|
|
|
|
|
|
|
| 347 |
| --codegen <lang> | specify the language to use for code generation, possible values: "typescript", "none". Default is "typescript".<br>*env* `PLAYWRIGHT_MCP_CODEGEN` |
|
| 348 |
| --config <path> | path to the configuration file.<br>*env* `PLAYWRIGHT_MCP_CONFIG` |
|
| 349 |
| --console-level <level> | level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.<br>*env* `PLAYWRIGHT_MCP_CONSOLE_LEVEL` |
|
|
@@ -358,13 +360,11 @@ Playwright MCP server supports following arguments. They can be provided in the
|
|
| 358 |
| --init-script <path...> | path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.<br>*env* `PLAYWRIGHT_MCP_INIT_SCRIPT` |
|
| 359 |
| --isolated | keep the browser profile in memory, do not save it to disk.<br>*env* `PLAYWRIGHT_MCP_ISOLATED` |
|
| 360 |
| --image-responses <mode> | whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".<br>*env* `PLAYWRIGHT_MCP_IMAGE_RESPONSES` |
|
| 361 |
-
| --no-sandbox | disable the sandbox for all process types that are normally sandboxed.<br>*env* `PLAYWRIGHT_MCP_NO_SANDBOX` |
|
| 362 |
| --output-dir <path> | path to the directory for output files.<br>*env* `PLAYWRIGHT_MCP_OUTPUT_DIR` |
|
| 363 |
| --output-mode <mode> | whether to save snapshots, console messages, network logs to a file or to the standard output. Can be "file" or "stdout". Default is "stdout".<br>*env* `PLAYWRIGHT_MCP_OUTPUT_MODE` |
|
| 364 |
| --port <port> | port to listen on for SSE transport.<br>*env* `PLAYWRIGHT_MCP_PORT` |
|
| 365 |
| --proxy-bypass <bypass> | comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"<br>*env* `PLAYWRIGHT_MCP_PROXY_BYPASS` |
|
| 366 |
| --proxy-server <proxy> | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"<br>*env* `PLAYWRIGHT_MCP_PROXY_SERVER` |
|
| 367 |
-
| --sandbox | enable the sandbox for all process types that are normally not sandboxed.<br>*env* `PLAYWRIGHT_MCP_SANDBOX` |
|
| 368 |
| --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
|
| 369 |
| --save-trace | Whether to save the Playwright Trace of the session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_TRACE` |
|
| 370 |
| --save-video <size> | Whether to save the video of the session into the output directory. For example "--save-video=800x600"<br>*env* `PLAYWRIGHT_MCP_SAVE_VIDEO` |
|
|
|
|
| 344 |
| --cdp-endpoint <endpoint> | CDP endpoint to connect to.<br>*env* `PLAYWRIGHT_MCP_CDP_ENDPOINT` |
|
| 345 |
| --cdp-header <headers...> | CDP headers to send with the connect request, multiple can be specified.<br>*env* `PLAYWRIGHT_MCP_CDP_HEADER` |
|
| 346 |
| --cdp-timeout <timeout> | timeout in milliseconds for connecting to CDP endpoint, defaults to 30000ms<br>*env* `PLAYWRIGHT_MCP_CDP_TIMEOUT` |
|
| 347 |
+
| --chromium-sandbox | enable the chromium sandbox. disable with --no-chromium-sandbox.<br>*env* `PLAYWRIGHT_MCP_CHROMIUM_SANDBOX` |
|
| 348 |
+
| --no-chromium-sandbox | disable the chromium sandbox.<br>*env* `PLAYWRIGHT_MCP_NO_CHROMIUM_SANDBOX` |
|
| 349 |
| --codegen <lang> | specify the language to use for code generation, possible values: "typescript", "none". Default is "typescript".<br>*env* `PLAYWRIGHT_MCP_CODEGEN` |
|
| 350 |
| --config <path> | path to the configuration file.<br>*env* `PLAYWRIGHT_MCP_CONFIG` |
|
| 351 |
| --console-level <level> | level of console messages to return: "error", "warning", "info", "debug". Each level includes the messages of more severe levels.<br>*env* `PLAYWRIGHT_MCP_CONSOLE_LEVEL` |
|
|
|
|
| 360 |
| --init-script <path...> | path to JavaScript file to add as an initialization script. The script will be evaluated in every page before any of the page's scripts. Can be specified multiple times.<br>*env* `PLAYWRIGHT_MCP_INIT_SCRIPT` |
|
| 361 |
| --isolated | keep the browser profile in memory, do not save it to disk.<br>*env* `PLAYWRIGHT_MCP_ISOLATED` |
|
| 362 |
| --image-responses <mode> | whether to send image responses to the client. Can be "allow" or "omit", Defaults to "allow".<br>*env* `PLAYWRIGHT_MCP_IMAGE_RESPONSES` |
|
|
|
|
| 363 |
| --output-dir <path> | path to the directory for output files.<br>*env* `PLAYWRIGHT_MCP_OUTPUT_DIR` |
|
| 364 |
| --output-mode <mode> | whether to save snapshots, console messages, network logs to a file or to the standard output. Can be "file" or "stdout". Default is "stdout".<br>*env* `PLAYWRIGHT_MCP_OUTPUT_MODE` |
|
| 365 |
| --port <port> | port to listen on for SSE transport.<br>*env* `PLAYWRIGHT_MCP_PORT` |
|
| 366 |
| --proxy-bypass <bypass> | comma-separated domains to bypass proxy, for example ".com,chromium.org,.domain.com"<br>*env* `PLAYWRIGHT_MCP_PROXY_BYPASS` |
|
| 367 |
| --proxy-server <proxy> | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"<br>*env* `PLAYWRIGHT_MCP_PROXY_SERVER` |
|
|
|
|
| 368 |
| --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
|
| 369 |
| --save-trace | Whether to save the Playwright Trace of the session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_TRACE` |
|
| 370 |
| --save-video <size> | Whether to save the video of the session into the output directory. For example "--save-video=800x600"<br>*env* `PLAYWRIGHT_MCP_SAVE_VIDEO` |
|
package-lock.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
],
|
| 14 |
"devDependencies": {
|
| 15 |
"@modelcontextprotocol/sdk": "^1.25.2",
|
| 16 |
-
"@playwright/test": "1.59.0-alpha-
|
| 17 |
"@types/node": "^24.3.0"
|
| 18 |
}
|
| 19 |
},
|
|
@@ -854,13 +854,13 @@
|
|
| 854 |
"link": true
|
| 855 |
},
|
| 856 |
"node_modules/@playwright/test": {
|
| 857 |
-
"version": "1.59.0-alpha-
|
| 858 |
-
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.0-alpha-
|
| 859 |
-
"integrity": "sha512-
|
| 860 |
"dev": true,
|
| 861 |
"license": "Apache-2.0",
|
| 862 |
"dependencies": {
|
| 863 |
-
"playwright": "1.59.0-alpha-
|
| 864 |
},
|
| 865 |
"bin": {
|
| 866 |
"playwright": "cli.js"
|
|
@@ -2442,6 +2442,16 @@
|
|
| 2442 |
"url": "https://opencollective.com/express"
|
| 2443 |
}
|
| 2444 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2445 |
"node_modules/ms": {
|
| 2446 |
"version": "2.1.3",
|
| 2447 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
@@ -2616,12 +2626,12 @@
|
|
| 2616 |
}
|
| 2617 |
},
|
| 2618 |
"node_modules/playwright": {
|
| 2619 |
-
"version": "1.59.0-alpha-
|
| 2620 |
-
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.0-alpha-
|
| 2621 |
-
"integrity": "sha512-
|
| 2622 |
"license": "Apache-2.0",
|
| 2623 |
"dependencies": {
|
| 2624 |
-
"playwright-core": "1.59.0-alpha-
|
| 2625 |
},
|
| 2626 |
"bin": {
|
| 2627 |
"playwright": "cli.js"
|
|
@@ -2638,9 +2648,9 @@
|
|
| 2638 |
"link": true
|
| 2639 |
},
|
| 2640 |
"node_modules/playwright-core": {
|
| 2641 |
-
"version": "1.59.0-alpha-
|
| 2642 |
-
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.0-alpha-
|
| 2643 |
-
"integrity": "sha512-
|
| 2644 |
"license": "Apache-2.0",
|
| 2645 |
"bin": {
|
| 2646 |
"playwright-core": "cli.js"
|
|
@@ -3417,6 +3427,7 @@
|
|
| 3417 |
"@types/react": "^18.2.66",
|
| 3418 |
"@types/react-dom": "^18.2.22",
|
| 3419 |
"@vitejs/plugin-react": "^4.0.0",
|
|
|
|
| 3420 |
"react": "^18.2.0",
|
| 3421 |
"react-dom": "^18.2.0",
|
| 3422 |
"typescript": "^5.8.2",
|
|
@@ -3437,8 +3448,8 @@
|
|
| 3437 |
"version": "0.0.66",
|
| 3438 |
"license": "Apache-2.0",
|
| 3439 |
"dependencies": {
|
| 3440 |
-
"playwright": "1.59.0-alpha-
|
| 3441 |
-
"playwright-core": "1.59.0-alpha-
|
| 3442 |
},
|
| 3443 |
"bin": {
|
| 3444 |
"playwright-mcp": "cli.js"
|
|
|
|
| 13 |
],
|
| 14 |
"devDependencies": {
|
| 15 |
"@modelcontextprotocol/sdk": "^1.25.2",
|
| 16 |
+
"@playwright/test": "1.59.0-alpha-1771028105000",
|
| 17 |
"@types/node": "^24.3.0"
|
| 18 |
}
|
| 19 |
},
|
|
|
|
| 854 |
"link": true
|
| 855 |
},
|
| 856 |
"node_modules/@playwright/test": {
|
| 857 |
+
"version": "1.59.0-alpha-1771028105000",
|
| 858 |
+
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.0-alpha-1771028105000.tgz",
|
| 859 |
+
"integrity": "sha512-chMidCR7qg6ExeTrYP3isJ5fzIgD0bXldX4aQo1vVWPb0su5xJL0UcA5hD1qsmuP1dkUlkI4Qf2wfuxuCfxdyg==",
|
| 860 |
"dev": true,
|
| 861 |
"license": "Apache-2.0",
|
| 862 |
"dependencies": {
|
| 863 |
+
"playwright": "1.59.0-alpha-1771028105000"
|
| 864 |
},
|
| 865 |
"bin": {
|
| 866 |
"playwright": "cli.js"
|
|
|
|
| 2442 |
"url": "https://opencollective.com/express"
|
| 2443 |
}
|
| 2444 |
},
|
| 2445 |
+
"node_modules/minimist": {
|
| 2446 |
+
"version": "1.2.8",
|
| 2447 |
+
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
| 2448 |
+
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
| 2449 |
+
"dev": true,
|
| 2450 |
+
"license": "MIT",
|
| 2451 |
+
"funding": {
|
| 2452 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 2453 |
+
}
|
| 2454 |
+
},
|
| 2455 |
"node_modules/ms": {
|
| 2456 |
"version": "2.1.3",
|
| 2457 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
|
|
| 2626 |
}
|
| 2627 |
},
|
| 2628 |
"node_modules/playwright": {
|
| 2629 |
+
"version": "1.59.0-alpha-1771028105000",
|
| 2630 |
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.0-alpha-1771028105000.tgz",
|
| 2631 |
+
"integrity": "sha512-tSRYmBZlJt32Q0CKNlVyavvobXt+P7kFUJN+ak9wkcUo+hRSHqyAUcp6G9pRG/vilraanrS6gmAIs3cjUwwxhA==",
|
| 2632 |
"license": "Apache-2.0",
|
| 2633 |
"dependencies": {
|
| 2634 |
+
"playwright-core": "1.59.0-alpha-1771028105000"
|
| 2635 |
},
|
| 2636 |
"bin": {
|
| 2637 |
"playwright": "cli.js"
|
|
|
|
| 2648 |
"link": true
|
| 2649 |
},
|
| 2650 |
"node_modules/playwright-core": {
|
| 2651 |
+
"version": "1.59.0-alpha-1771028105000",
|
| 2652 |
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.0-alpha-1771028105000.tgz",
|
| 2653 |
+
"integrity": "sha512-yEIjYyIGSWw8cuaw1hSkAQ+1EBQSdYW2RaHOgHLVAKW8iw7gs8tpY9Wr/75oGazhohRyZNNDom41SO7ktuTUcA==",
|
| 2654 |
"license": "Apache-2.0",
|
| 2655 |
"bin": {
|
| 2656 |
"playwright-core": "cli.js"
|
|
|
|
| 3427 |
"@types/react": "^18.2.66",
|
| 3428 |
"@types/react-dom": "^18.2.22",
|
| 3429 |
"@vitejs/plugin-react": "^4.0.0",
|
| 3430 |
+
"minimist": "^1.2.5",
|
| 3431 |
"react": "^18.2.0",
|
| 3432 |
"react-dom": "^18.2.0",
|
| 3433 |
"typescript": "^5.8.2",
|
|
|
|
| 3448 |
"version": "0.0.66",
|
| 3449 |
"license": "Apache-2.0",
|
| 3450 |
"dependencies": {
|
| 3451 |
+
"playwright": "1.59.0-alpha-1771028105000",
|
| 3452 |
+
"playwright-core": "1.59.0-alpha-1771028105000"
|
| 3453 |
},
|
| 3454 |
"bin": {
|
| 3455 |
"playwright-mcp": "cli.js"
|
package.json
CHANGED
|
@@ -26,7 +26,7 @@
|
|
| 26 |
],
|
| 27 |
"devDependencies": {
|
| 28 |
"@modelcontextprotocol/sdk": "^1.25.2",
|
| 29 |
-
"@playwright/test": "1.59.0-alpha-
|
| 30 |
"@types/node": "^24.3.0"
|
| 31 |
}
|
| 32 |
}
|
|
|
|
| 26 |
],
|
| 27 |
"devDependencies": {
|
| 28 |
"@modelcontextprotocol/sdk": "^1.25.2",
|
| 29 |
+
"@playwright/test": "1.59.0-alpha-1771028105000",
|
| 30 |
"@types/node": "^24.3.0"
|
| 31 |
}
|
| 32 |
}
|
packages/extension/README.md
CHANGED
|
@@ -10,16 +10,9 @@ The Playwright MCP Chrome Extension allows you to connect to pages in your exist
|
|
| 10 |
|
| 11 |
## Installation Steps
|
| 12 |
|
| 13 |
-
###
|
| 14 |
|
| 15 |
-
|
| 16 |
-
- **Download link**: https://github.com/microsoft/playwright-mcp/releases
|
| 17 |
-
|
| 18 |
-
### Load Chrome Extension
|
| 19 |
-
|
| 20 |
-
1. Open Chrome and navigate to `chrome://extensions/`
|
| 21 |
-
2. Enable "Developer mode" (toggle in the top right corner)
|
| 22 |
-
3. Click "Load unpacked" and select the extension directory
|
| 23 |
|
| 24 |
### Configure Playwright MCP server
|
| 25 |
|
|
|
|
| 10 |
|
| 11 |
## Installation Steps
|
| 12 |
|
| 13 |
+
### Install the Extension
|
| 14 |
|
| 15 |
+
Install [Playwright MCP Bridge](https://chromewebstore.google.com/detail/playwright-mcp-bridge/mmlmfjhmonkocbjadbfplnigmagldckm) from the Chrome Web Store.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
### Configure Playwright MCP server
|
| 18 |
|
packages/extension/package.json
CHANGED
|
@@ -27,6 +27,7 @@
|
|
| 27 |
"@types/react": "^18.2.66",
|
| 28 |
"@types/react-dom": "^18.2.22",
|
| 29 |
"@vitejs/plugin-react": "^4.0.0",
|
|
|
|
| 30 |
"react": "^18.2.0",
|
| 31 |
"react-dom": "^18.2.0",
|
| 32 |
"typescript": "^5.8.2",
|
|
|
|
| 27 |
"@types/react": "^18.2.66",
|
| 28 |
"@types/react-dom": "^18.2.22",
|
| 29 |
"@vitejs/plugin-react": "^4.0.0",
|
| 30 |
+
"minimist": "^1.2.5",
|
| 31 |
"react": "^18.2.0",
|
| 32 |
"react-dom": "^18.2.0",
|
| 33 |
"typescript": "^5.8.2",
|
packages/extension/tests/extension.spec.ts
CHANGED
|
@@ -42,8 +42,8 @@ type TestFixtures = {
|
|
| 42 |
cli: (...args: string[]) => Promise<CliResult>;
|
| 43 |
};
|
| 44 |
|
| 45 |
-
const extensionPublicKey = '
|
| 46 |
-
const extensionId = '
|
| 47 |
|
| 48 |
const test = base.extend<TestFixtures>({
|
| 49 |
pathToExtension: async ({}, use, testInfo) => {
|
|
@@ -52,6 +52,9 @@ const test = base.extend<TestFixtures>({
|
|
| 52 |
await fs.cp(srcDir, extensionDir, { recursive: true });
|
| 53 |
const manifestPath = path.join(extensionDir, 'manifest.json');
|
| 54 |
const manifest = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
|
|
|
|
|
|
|
|
|
|
| 55 |
manifest.key = extensionPublicKey;
|
| 56 |
await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
| 57 |
await use(extensionDir);
|
|
@@ -113,7 +116,7 @@ const test = base.extend<TestFixtures>({
|
|
| 113 |
});
|
| 114 |
|
| 115 |
// Cleanup sessions
|
| 116 |
-
await runCli(['
|
| 117 |
|
| 118 |
const daemonDir = path.join(testInfo.outputDir, 'daemon');
|
| 119 |
await fs.rm(daemonDir, { recursive: true, force: true }).catch(() => {});
|
|
@@ -130,7 +133,7 @@ async function runCli(
|
|
| 130 |
const testInfo = options.testInfo;
|
| 131 |
|
| 132 |
// Path to the terminal CLI
|
| 133 |
-
const cliPath = path.join(__dirname, '../../../node_modules/playwright/lib/
|
| 134 |
|
| 135 |
return new Promise<CliResult>((resolve, reject) => {
|
| 136 |
let stdout = '';
|
|
@@ -405,8 +408,8 @@ test.describe('CLI with extension', () => {
|
|
| 405 |
// Wait for the confirmation page to appear
|
| 406 |
const confirmationPage = await confirmationPagePromise;
|
| 407 |
|
| 408 |
-
// Click the
|
| 409 |
-
await confirmationPage.getByRole('button', { name: '
|
| 410 |
|
| 411 |
// Wait for the CLI command to complete
|
| 412 |
const { output } = await cliPromise;
|
|
|
|
| 42 |
cli: (...args: string[]) => Promise<CliResult>;
|
| 43 |
};
|
| 44 |
|
| 45 |
+
const extensionPublicKey = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwRsUUO4mmbCi4JpmrIoIw31iVW9+xUJRZ6nSzya17PQkaUPDxe1IpgM+vpd/xB6mJWlJSyE1Lj95c0sbomGfVY1M0zUeKbaRVcAb+/a6m59gNR+ubFlmTX0nK9/8fE2FpRB9D+4N5jyeIPQuASW/0oswI2/ijK7hH5NTRX8gWc/ROMSgUj7rKhTAgBrICt/NsStgDPsxRTPPJnhJ/ViJtM1P5KsSYswE987DPoFnpmkFpq8g1ae0eYbQfXy55ieaacC4QWyJPj3daU2kMfBQw7MXnnk0H/WDxouMOIHnd8MlQxpEMqAihj7KpuONH+MUhuj9HEQo4df6bSaIuQ0b4QIDAQAB';
|
| 46 |
+
const extensionId = 'mmlmfjhmonkocbjadbfplnigmagldckm';
|
| 47 |
|
| 48 |
const test = base.extend<TestFixtures>({
|
| 49 |
pathToExtension: async ({}, use, testInfo) => {
|
|
|
|
| 52 |
await fs.cp(srcDir, extensionDir, { recursive: true });
|
| 53 |
const manifestPath = path.join(extensionDir, 'manifest.json');
|
| 54 |
const manifest = JSON.parse(await fs.readFile(manifestPath, 'utf8'));
|
| 55 |
+
// We don't hardcode the key in manifest, but for the tests we set the key field
|
| 56 |
+
// to ensure that locally installed extension has the same id as the one published
|
| 57 |
+
// in the store.
|
| 58 |
manifest.key = extensionPublicKey;
|
| 59 |
await fs.writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
| 60 |
await use(extensionDir);
|
|
|
|
| 116 |
});
|
| 117 |
|
| 118 |
// Cleanup sessions
|
| 119 |
+
await runCli(['close-all'], { mcpBrowser, testInfo }).catch(() => {});
|
| 120 |
|
| 121 |
const daemonDir = path.join(testInfo.outputDir, 'daemon');
|
| 122 |
await fs.rm(daemonDir, { recursive: true, force: true }).catch(() => {});
|
|
|
|
| 133 |
const testInfo = options.testInfo;
|
| 134 |
|
| 135 |
// Path to the terminal CLI
|
| 136 |
+
const cliPath = path.join(__dirname, '../../../node_modules/playwright/lib/cli/client/program.js');
|
| 137 |
|
| 138 |
return new Promise<CliResult>((resolve, reject) => {
|
| 139 |
let stdout = '';
|
|
|
|
| 408 |
// Wait for the confirmation page to appear
|
| 409 |
const confirmationPage = await confirmationPagePromise;
|
| 410 |
|
| 411 |
+
// Click the Connect button
|
| 412 |
+
await confirmationPage.locator('.tab-item', { hasText: 'Playwright MCP extension' }).getByRole('button', { name: 'Connect' }).click();
|
| 413 |
|
| 414 |
// Wait for the CLI command to complete
|
| 415 |
const { output } = await cliPromise;
|
packages/playwright-mcp/cli.js
CHANGED
|
@@ -16,9 +16,9 @@
|
|
| 16 |
*/
|
| 17 |
|
| 18 |
const { program } = require('playwright-core/lib/utilsBundle');
|
| 19 |
-
const {
|
| 20 |
|
| 21 |
const packageJSON = require('./package.json');
|
| 22 |
const p = program.version('Version ' + packageJSON.version).name('Playwright MCP');
|
| 23 |
-
|
| 24 |
void program.parseAsync(process.argv);
|
|
|
|
| 16 |
*/
|
| 17 |
|
| 18 |
const { program } = require('playwright-core/lib/utilsBundle');
|
| 19 |
+
const { decorateMCPCommand } = require('playwright/lib/mcp/program');
|
| 20 |
|
| 21 |
const packageJSON = require('./package.json');
|
| 22 |
const p = program.version('Version ' + packageJSON.version).name('Playwright MCP');
|
| 23 |
+
decorateMCPCommand(p, packageJSON.version)
|
| 24 |
void program.parseAsync(process.argv);
|
packages/playwright-mcp/package.json
CHANGED
|
@@ -32,8 +32,8 @@
|
|
| 32 |
}
|
| 33 |
},
|
| 34 |
"dependencies": {
|
| 35 |
-
"playwright": "1.59.0-alpha-
|
| 36 |
-
"playwright-core": "1.59.0-alpha-
|
| 37 |
},
|
| 38 |
"bin": {
|
| 39 |
"playwright-mcp": "cli.js"
|
|
|
|
| 32 |
}
|
| 33 |
},
|
| 34 |
"dependencies": {
|
| 35 |
+
"playwright": "1.59.0-alpha-1771028105000",
|
| 36 |
+
"playwright-core": "1.59.0-alpha-1771028105000"
|
| 37 |
},
|
| 38 |
"bin": {
|
| 39 |
"playwright-mcp": "cli.js"
|