Pavel Feldman commited on
Commit
4c6d66d
·
unverified ·
1 Parent(s): a6baddb

chore: roll Playwright to 1.59.0-alpha-1773608981000 (#1461)

Browse files

## Summary
- Roll playwright and playwright-core to `1.59.0-alpha-1773451864000`
- Fix `install-browser` CLI command registration (was calling
`parseAsync` before registering the subcommand)
- Add `selector` parameter to accessibility snapshot documentation
- Add CLAUDE.md

CLAUDE.md ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Commit Convention
2
+
3
+ Semantic commit messages: `label(scope): description`
4
+
5
+ Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops`
6
+
7
+ ```bash
8
+ git checkout -b fix-39562
9
+ # ... make changes ...
10
+ git add <changed-files>
11
+ git commit -m "$(cat <<'EOF'
12
+ fix(proxy): handle SOCKS proxy authentication
13
+
14
+ Fixes: https://github.com/microsoft/playwright/issues/39562
15
+ EOF
16
+ )"
17
+ git push origin fix-39562
18
+ gh pr create --repo microsoft/playwright --head username:fix-39562 \
19
+ --title "fix(proxy): handle SOCKS proxy authentication" \
20
+ --body "$(cat <<'EOF'
21
+ ## Summary
22
+ - <describe the change very! briefly>
23
+
24
+ Fixes https://github.com/microsoft/playwright/issues/39562
25
+ EOF
26
+ )"
27
+ ```
28
+
29
+ Never add Co-Authored-By agents in commit message.
30
+ Branch naming for issue fixes: `fix-<issue-number>`
31
+
README.md CHANGED
@@ -386,8 +386,6 @@ Playwright MCP server supports following arguments. They can be provided in the
386
  | --proxy-server <proxy> | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"<br>*env* `PLAYWRIGHT_MCP_PROXY_SERVER` |
387
  | --sandbox | enable the sandbox for all process types that are normally not sandboxed.<br>*env* `PLAYWRIGHT_MCP_SANDBOX` |
388
  | --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
389
- | --save-trace | Whether to save the Playwright Trace of the session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_TRACE` |
390
- | --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` |
391
  | --secrets <path> | path to a file containing secrets in the dotenv format<br>*env* `PLAYWRIGHT_MCP_SECRETS` |
392
  | --shared-browser-context | reuse the same browser context between all connected HTTP clients.<br>*env* `PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT` |
393
  | --snapshot-mode <mode> | when taking snapshots for responses, specifies the mode to use. Can be "incremental", "full", or "none". Default is incremental.<br>*env* `PLAYWRIGHT_MCP_SNAPSHOT_MODE` |
@@ -598,19 +596,6 @@ npx @playwright/mcp@latest --config path/to/config.json
598
  */
599
  saveSession?: boolean;
600
 
601
- /**
602
- * Whether to save the Playwright trace of the session into the output directory.
603
- */
604
- saveTrace?: boolean;
605
-
606
- /**
607
- * If specified, saves the Playwright video of the session into the output directory.
608
- */
609
- saveVideo?: {
610
- width: number;
611
- height: number;
612
- };
613
-
614
  /**
615
  * Reuse the same browser context between all connected HTTP clients.
616
  */
@@ -675,6 +660,11 @@ npx @playwright/mcp@latest --config path/to/config.json
675
  * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
676
  */
677
  navigation?: number;
 
 
 
 
 
678
  };
679
 
680
  /**
@@ -804,6 +794,7 @@ http.createServer(async (req, res) => {
804
  - Parameters:
805
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
806
  - `ref` (string): Exact target element reference from the page snapshot
 
807
  - `doubleClick` (boolean, optional): Whether to perform a double click instead of a single click
808
  - `button` (string, optional): Button to click, defaults to left
809
  - `modifiers` (array, optional): Modifier keys to press
@@ -824,6 +815,7 @@ http.createServer(async (req, res) => {
824
  - Description: Returns all console messages
825
  - Parameters:
826
  - `level` (string): Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
 
827
  - `filename` (string, optional): Filename to save the console messages to. If not provided, messages are returned as text.
828
  - Read-only: **true**
829
 
@@ -835,8 +827,10 @@ http.createServer(async (req, res) => {
835
  - Parameters:
836
  - `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
837
  - `startRef` (string): Exact source element reference from the page snapshot
 
838
  - `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
839
  - `endRef` (string): Exact target element reference from the page snapshot
 
840
  - Read-only: **false**
841
 
842
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -848,6 +842,7 @@ http.createServer(async (req, res) => {
848
  - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
849
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
850
  - `ref` (string, optional): Exact target element reference from the page snapshot
 
851
  - Read-only: **false**
852
 
853
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -886,6 +881,7 @@ http.createServer(async (req, res) => {
886
  - Parameters:
887
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
888
  - `ref` (string): Exact target element reference from the page snapshot
 
889
  - Read-only: **false**
890
 
891
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -951,6 +947,7 @@ http.createServer(async (req, res) => {
951
  - Parameters:
952
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
953
  - `ref` (string): Exact target element reference from the page snapshot
 
954
  - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
955
  - Read-only: **false**
956
 
@@ -961,6 +958,7 @@ http.createServer(async (req, res) => {
961
  - Description: Capture accessibility snapshot of the current page, this is better than screenshot
962
  - Parameters:
963
  - `filename` (string, optional): Save snapshot to markdown file instead of returning it in the response.
 
964
  - Read-only: **true**
965
 
966
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -973,6 +971,7 @@ http.createServer(async (req, res) => {
973
  - `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified. Prefer relative file names to stay within the output directory.
974
  - `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
975
  - `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
 
976
  - `fullPage` (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
977
  - Read-only: **true**
978
 
@@ -984,6 +983,7 @@ http.createServer(async (req, res) => {
984
  - Parameters:
985
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
986
  - `ref` (string): Exact target element reference from the page snapshot
 
987
  - `text` (string): Text to type into the element
988
  - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
989
  - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
@@ -1020,14 +1020,6 @@ http.createServer(async (req, res) => {
1020
  <details>
1021
  <summary><b>Browser installation</b></summary>
1022
 
1023
- <!-- NOTE: This has been generated via update-readme.js -->
1024
-
1025
- - **browser_install**
1026
- - Title: Install the browser specified in the config
1027
- - Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
1028
- - Parameters: None
1029
- - Read-only: **false**
1030
-
1031
  </details>
1032
 
1033
  <details>
@@ -1048,6 +1040,15 @@ http.createServer(async (req, res) => {
1048
 
1049
  <!-- NOTE: This has been generated via update-readme.js -->
1050
 
 
 
 
 
 
 
 
 
 
1051
  - **browser_route**
1052
  - Title: Mock network requests
1053
  - Description: Set up a route to mock network requests matching a URL pattern
@@ -1288,10 +1289,13 @@ http.createServer(async (req, res) => {
1288
 
1289
  - **browser_mouse_click_xy**
1290
  - Title: Click
1291
- - Description: Click left mouse button at a given position
1292
  - Parameters:
1293
  - `x` (number): X coordinate
1294
  - `y` (number): Y coordinate
 
 
 
1295
  - Read-only: **false**
1296
 
1297
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -1371,6 +1375,7 @@ http.createServer(async (req, res) => {
1371
  - Parameters:
1372
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1373
  - `ref` (string): Exact target element reference from the page snapshot
 
1374
  - Read-only: **true**
1375
 
1376
  <!-- NOTE: This has been generated via update-readme.js -->
@@ -1391,6 +1396,7 @@ http.createServer(async (req, res) => {
1391
  - Parameters:
1392
  - `element` (string): Human-readable list description
1393
  - `ref` (string): Exact target element reference that points to the list
 
1394
  - `items` (array): Items to verify
1395
  - Read-only: **false**
1396
 
@@ -1411,7 +1417,8 @@ http.createServer(async (req, res) => {
1411
  - Parameters:
1412
  - `type` (string): Type of the element
1413
  - `element` (string): Human-readable element description
1414
- - `ref` (string): Exact target element reference that points to the element
 
1415
  - `value` (string): Value to verify. For checkbox, use "true" or "false".
1416
  - Read-only: **false**
1417
 
 
386
  | --proxy-server <proxy> | specify proxy server, for example "http://myproxy:3128" or "socks5://myproxy:8080"<br>*env* `PLAYWRIGHT_MCP_PROXY_SERVER` |
387
  | --sandbox | enable the sandbox for all process types that are normally not sandboxed.<br>*env* `PLAYWRIGHT_MCP_SANDBOX` |
388
  | --save-session | Whether to save the Playwright MCP session into the output directory.<br>*env* `PLAYWRIGHT_MCP_SAVE_SESSION` |
 
 
389
  | --secrets <path> | path to a file containing secrets in the dotenv format<br>*env* `PLAYWRIGHT_MCP_SECRETS` |
390
  | --shared-browser-context | reuse the same browser context between all connected HTTP clients.<br>*env* `PLAYWRIGHT_MCP_SHARED_BROWSER_CONTEXT` |
391
  | --snapshot-mode <mode> | when taking snapshots for responses, specifies the mode to use. Can be "incremental", "full", or "none". Default is incremental.<br>*env* `PLAYWRIGHT_MCP_SNAPSHOT_MODE` |
 
596
  */
597
  saveSession?: boolean;
598
 
 
 
 
 
 
 
 
 
 
 
 
 
 
599
  /**
600
  * Reuse the same browser context between all connected HTTP clients.
601
  */
 
660
  * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
661
  */
662
  navigation?: number;
663
+
664
+ /**
665
+ * Configures default expect timeout: https://playwright.dev/docs/test-timeouts#expect-timeout. Defaults to 5000ms.
666
+ */
667
+ expect?: number;
668
  };
669
 
670
  /**
 
794
  - Parameters:
795
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
796
  - `ref` (string): Exact target element reference from the page snapshot
797
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
798
  - `doubleClick` (boolean, optional): Whether to perform a double click instead of a single click
799
  - `button` (string, optional): Button to click, defaults to left
800
  - `modifiers` (array, optional): Modifier keys to press
 
815
  - Description: Returns all console messages
816
  - Parameters:
817
  - `level` (string): Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info".
818
+ - `all` (boolean, optional): Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false.
819
  - `filename` (string, optional): Filename to save the console messages to. If not provided, messages are returned as text.
820
  - Read-only: **true**
821
 
 
827
  - Parameters:
828
  - `startElement` (string): Human-readable source element description used to obtain the permission to interact with the element
829
  - `startRef` (string): Exact source element reference from the page snapshot
830
+ - `startSelector` (string, optional): CSS or role selector for the source element, when ref is not available
831
  - `endElement` (string): Human-readable target element description used to obtain the permission to interact with the element
832
  - `endRef` (string): Exact target element reference from the page snapshot
833
+ - `endSelector` (string, optional): CSS or role selector for the target element, when ref is not available
834
  - Read-only: **false**
835
 
836
  <!-- NOTE: This has been generated via update-readme.js -->
 
842
  - `function` (string): () => { /* code */ } or (element) => { /* code */ } when element is provided
843
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
844
  - `ref` (string, optional): Exact target element reference from the page snapshot
845
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available.
846
  - Read-only: **false**
847
 
848
  <!-- NOTE: This has been generated via update-readme.js -->
 
881
  - Parameters:
882
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
883
  - `ref` (string): Exact target element reference from the page snapshot
884
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
885
  - Read-only: **false**
886
 
887
  <!-- NOTE: This has been generated via update-readme.js -->
 
947
  - Parameters:
948
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
949
  - `ref` (string): Exact target element reference from the page snapshot
950
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
951
  - `values` (array): Array of values to select in the dropdown. This can be a single value or multiple values.
952
  - Read-only: **false**
953
 
 
958
  - Description: Capture accessibility snapshot of the current page, this is better than screenshot
959
  - Parameters:
960
  - `filename` (string, optional): Save snapshot to markdown file instead of returning it in the response.
961
+ - `selector` (string, optional): Element selector of the root element to capture a partial snapshot instead of the whole page
962
  - Read-only: **true**
963
 
964
  <!-- NOTE: This has been generated via update-readme.js -->
 
971
  - `filename` (string, optional): File name to save the screenshot to. Defaults to `page-{timestamp}.{png|jpeg}` if not specified. Prefer relative file names to stay within the output directory.
972
  - `element` (string, optional): Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too.
973
  - `ref` (string, optional): Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too.
974
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available.
975
  - `fullPage` (boolean, optional): When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots.
976
  - Read-only: **true**
977
 
 
983
  - Parameters:
984
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
985
  - `ref` (string): Exact target element reference from the page snapshot
986
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
987
  - `text` (string): Text to type into the element
988
  - `submit` (boolean, optional): Whether to submit entered text (press Enter after)
989
  - `slowly` (boolean, optional): Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once.
 
1020
  <details>
1021
  <summary><b>Browser installation</b></summary>
1022
 
 
 
 
 
 
 
 
 
1023
  </details>
1024
 
1025
  <details>
 
1040
 
1041
  <!-- NOTE: This has been generated via update-readme.js -->
1042
 
1043
+ - **browser_network_state_set**
1044
+ - Title: Set network state
1045
+ - Description: Sets the browser network state to online or offline. When offline, all network requests will fail.
1046
+ - Parameters:
1047
+ - `state` (string): Set to "offline" to simulate offline mode, "online" to restore network connectivity
1048
+ - Read-only: **false**
1049
+
1050
+ <!-- NOTE: This has been generated via update-readme.js -->
1051
+
1052
  - **browser_route**
1053
  - Title: Mock network requests
1054
  - Description: Set up a route to mock network requests matching a URL pattern
 
1289
 
1290
  - **browser_mouse_click_xy**
1291
  - Title: Click
1292
+ - Description: Click mouse button at a given position
1293
  - Parameters:
1294
  - `x` (number): X coordinate
1295
  - `y` (number): Y coordinate
1296
+ - `button` (string, optional): Button to click, defaults to left
1297
+ - `clickCount` (number, optional): Number of clicks, defaults to 1
1298
+ - `delay` (number, optional): Time to wait between mouse down and mouse up in milliseconds, defaults to 0
1299
  - Read-only: **false**
1300
 
1301
  <!-- NOTE: This has been generated via update-readme.js -->
 
1375
  - Parameters:
1376
  - `element` (string, optional): Human-readable element description used to obtain permission to interact with the element
1377
  - `ref` (string): Exact target element reference from the page snapshot
1378
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
1379
  - Read-only: **true**
1380
 
1381
  <!-- NOTE: This has been generated via update-readme.js -->
 
1396
  - Parameters:
1397
  - `element` (string): Human-readable list description
1398
  - `ref` (string): Exact target element reference that points to the list
1399
+ - `selector` (string, optional): CSS or role selector for the target list, when "ref" is not available.
1400
  - `items` (array): Items to verify
1401
  - Read-only: **false**
1402
 
 
1417
  - Parameters:
1418
  - `type` (string): Type of the element
1419
  - `element` (string): Human-readable element description
1420
+ - `ref` (string): Exact target element reference from the page snapshot
1421
+ - `selector` (string, optional): CSS or role selector for the target element, when "ref" is not available
1422
  - `value` (string): Value to verify. For checkbox, use "true" or "false".
1423
  - Read-only: **false**
1424
 
package-lock.json CHANGED
@@ -13,7 +13,7 @@
13
  ],
14
  "devDependencies": {
15
  "@modelcontextprotocol/sdk": "^1.25.2",
16
- "@playwright/test": "1.59.0-alpha-1771104257000",
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-1771104257000",
858
- "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.0-alpha-1771104257000.tgz",
859
- "integrity": "sha512-0zUPgLuSbyO2xtA+FdEWejFpA5tYU1dINMj2D6KGbB7dgxW8V/4bOrpYS38hizSrzpdSiuRcIK7UgiNFxEeK3A==",
860
  "dev": true,
861
  "license": "Apache-2.0",
862
  "dependencies": {
863
- "playwright": "1.59.0-alpha-1771104257000"
864
  },
865
  "bin": {
866
  "playwright": "cli.js"
@@ -2626,12 +2626,12 @@
2626
  }
2627
  },
2628
  "node_modules/playwright": {
2629
- "version": "1.59.0-alpha-1771104257000",
2630
- "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.0-alpha-1771104257000.tgz",
2631
- "integrity": "sha512-6SCMMMJaDRsSqiKVLmb2nhtLES7iTYawTWWrQK6UdIGNzXi8lka4sLKRec3L4DnTWwddAvCuRn8035dhNiHzbg==",
2632
  "license": "Apache-2.0",
2633
  "dependencies": {
2634
- "playwright-core": "1.59.0-alpha-1771104257000"
2635
  },
2636
  "bin": {
2637
  "playwright": "cli.js"
@@ -2648,9 +2648,9 @@
2648
  "link": true
2649
  },
2650
  "node_modules/playwright-core": {
2651
- "version": "1.59.0-alpha-1771104257000",
2652
- "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.0-alpha-1771104257000.tgz",
2653
- "integrity": "sha512-YiXup3pnpQUCBMSIW5zx8CErwRx4K6O5Kojkw2BzJui8MazoMUDU6E3xGsb1kzFviEAE09LFQ+y1a0RhIJQ5SA==",
2654
  "license": "Apache-2.0",
2655
  "bin": {
2656
  "playwright-core": "cli.js"
@@ -3448,8 +3448,8 @@
3448
  "version": "0.0.68",
3449
  "license": "Apache-2.0",
3450
  "dependencies": {
3451
- "playwright": "1.59.0-alpha-1771104257000",
3452
- "playwright-core": "1.59.0-alpha-1771104257000"
3453
  },
3454
  "bin": {
3455
  "playwright-mcp": "cli.js"
 
13
  ],
14
  "devDependencies": {
15
  "@modelcontextprotocol/sdk": "^1.25.2",
16
+ "@playwright/test": "1.59.0-alpha-1773608981000",
17
  "@types/node": "^24.3.0"
18
  }
19
  },
 
854
  "link": true
855
  },
856
  "node_modules/@playwright/test": {
857
+ "version": "1.59.0-alpha-1773608981000",
858
+ "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.59.0-alpha-1773608981000.tgz",
859
+ "integrity": "sha512-px+GAf8KIaMcPsCUPG3+xqPRSIPHgnizH7ygUjo6OXT1AigXTNCsIIVrPY3C5GjouM2MI4CQOkIKcSEjO84ZTg==",
860
  "dev": true,
861
  "license": "Apache-2.0",
862
  "dependencies": {
863
+ "playwright": "1.59.0-alpha-1773608981000"
864
  },
865
  "bin": {
866
  "playwright": "cli.js"
 
2626
  }
2627
  },
2628
  "node_modules/playwright": {
2629
+ "version": "1.59.0-alpha-1773608981000",
2630
+ "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.59.0-alpha-1773608981000.tgz",
2631
+ "integrity": "sha512-nb+BzawNj48eH6NdxecsysLuhCAB/p18FG7LLJp3MBfRGUkCAFtax0CFo/BhD+r0V4+0EW7llPK0p4cJQEIwUQ==",
2632
  "license": "Apache-2.0",
2633
  "dependencies": {
2634
+ "playwright-core": "1.59.0-alpha-1773608981000"
2635
  },
2636
  "bin": {
2637
  "playwright": "cli.js"
 
2648
  "link": true
2649
  },
2650
  "node_modules/playwright-core": {
2651
+ "version": "1.59.0-alpha-1773608981000",
2652
+ "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.59.0-alpha-1773608981000.tgz",
2653
+ "integrity": "sha512-w6E5Q0Wleek3Wp7gtlSPGXuKeQ5eg6QPPJNNwgMHQRpkxgqOwgN2mX7x6Z52HJE10HFC88U5HQzOLMbag928Lg==",
2654
  "license": "Apache-2.0",
2655
  "bin": {
2656
  "playwright-core": "cli.js"
 
3448
  "version": "0.0.68",
3449
  "license": "Apache-2.0",
3450
  "dependencies": {
3451
+ "playwright": "1.59.0-alpha-1773608981000",
3452
+ "playwright-core": "1.59.0-alpha-1773608981000"
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-1771104257000",
30
  "@types/node": "^24.3.0"
31
  }
32
  }
 
26
  ],
27
  "devDependencies": {
28
  "@modelcontextprotocol/sdk": "^1.25.2",
29
+ "@playwright/test": "1.59.0-alpha-1773608981000",
30
  "@types/node": "^24.3.0"
31
  }
32
  }
packages/playwright-mcp/cli.js CHANGED
@@ -16,9 +16,17 @@
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);
 
16
  */
17
 
18
  const { program } = require('playwright-core/lib/utilsBundle');
19
+ const { decorateMCPCommand } = require('playwright-core/lib/tools/mcp/program');
20
+
21
+ if (process.argv.includes('install-browser')) {
22
+ const argv = process.argv.map(arg => arg === 'install-browser' ? 'install' : arg);
23
+ const { program: mainProgram } = require('playwright-core/lib/cli/program');
24
+ mainProgram.parse(argv);
25
+ return;
26
+ }
27
 
28
  const packageJSON = require('./package.json');
29
  const p = program.version('Version ' + packageJSON.version).name('Playwright MCP');
30
  decorateMCPCommand(p, packageJSON.version)
31
+
32
  void program.parseAsync(process.argv);
packages/playwright-mcp/config.d.ts CHANGED
@@ -137,19 +137,6 @@ export type Config = {
137
  */
138
  saveSession?: boolean;
139
 
140
- /**
141
- * Whether to save the Playwright trace of the session into the output directory.
142
- */
143
- saveTrace?: boolean;
144
-
145
- /**
146
- * If specified, saves the Playwright video of the session into the output directory.
147
- */
148
- saveVideo?: {
149
- width: number;
150
- height: number;
151
- };
152
-
153
  /**
154
  * Reuse the same browser context between all connected HTTP clients.
155
  */
@@ -214,6 +201,11 @@ export type Config = {
214
  * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
215
  */
216
  navigation?: number;
 
 
 
 
 
217
  };
218
 
219
  /**
 
137
  */
138
  saveSession?: boolean;
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  /**
141
  * Reuse the same browser context between all connected HTTP clients.
142
  */
 
201
  * Configures default navigation timeout: https://playwright.dev/docs/api/class-page#page-set-default-navigation-timeout. Defaults to 60000ms.
202
  */
203
  navigation?: number;
204
+
205
+ /**
206
+ * Configures default expect timeout: https://playwright.dev/docs/test-timeouts#expect-timeout. Defaults to 5000ms.
207
+ */
208
+ expect?: number;
209
  };
210
 
211
  /**
packages/playwright-mcp/index.js CHANGED
@@ -15,5 +15,5 @@
15
  * limitations under the License.
16
  */
17
 
18
- const { createConnection } = require('playwright/lib/mcp/index');
19
  module.exports = { createConnection };
 
15
  * limitations under the License.
16
  */
17
 
18
+ const { createConnection } = require('playwright-core/lib/tools/exports');
19
  module.exports = { createConnection };
packages/playwright-mcp/package.json CHANGED
@@ -33,8 +33,8 @@
33
  }
34
  },
35
  "dependencies": {
36
- "playwright": "1.59.0-alpha-1771104257000",
37
- "playwright-core": "1.59.0-alpha-1771104257000"
38
  },
39
  "bin": {
40
  "playwright-mcp": "cli.js"
 
33
  }
34
  },
35
  "dependencies": {
36
+ "playwright": "1.59.0-alpha-1773608981000",
37
+ "playwright-core": "1.59.0-alpha-1773608981000"
38
  },
39
  "bin": {
40
  "playwright-mcp": "cli.js"
packages/playwright-mcp/tests/capabilities.spec.ts CHANGED
@@ -30,7 +30,6 @@ test('test snapshot tool list', async ({ client }) => {
30
  'browser_select_option',
31
  'browser_type',
32
  'browser_close',
33
- 'browser_install',
34
  'browser_navigate_back',
35
  'browser_navigate',
36
  'browser_network_requests',
 
30
  'browser_select_option',
31
  'browser_type',
32
  'browser_close',
 
33
  'browser_navigate_back',
34
  'browser_navigate',
35
  'browser_network_requests',
packages/playwright-mcp/tests/cli.spec.ts ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Copyright (c) Microsoft Corporation.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import child_process from 'child_process';
17
+ import path from 'path';
18
+ import { test, expect } from './fixtures';
19
+
20
+ const cliPath = path.resolve(__dirname, '..', 'cli.js');
21
+
22
+ test('install-browser --help', async () => {
23
+ const output = child_process.execSync(`node ${cliPath} install-browser --help`, { encoding: 'utf-8' });
24
+ expect(output).toContain('install');
25
+ });
packages/playwright-mcp/update-readme.js CHANGED
@@ -20,7 +20,7 @@ const fs = require('fs')
20
  const path = require('path')
21
  const { execSync } = require('child_process');
22
 
23
- const { browserTools } = require('playwright/lib/mcp/browser/tools');
24
 
25
  const capabilities = /** @type {Record<string, string>} */ ({
26
  'core-navigation': 'Core automation',
 
20
  const path = require('path')
21
  const { execSync } = require('child_process');
22
 
23
+ const { browserTools } = require('playwright-core/lib/tools/exports');
24
 
25
  const capabilities = /** @type {Record<string, string>} */ ({
26
  'core-navigation': 'Core automation',
roll.js CHANGED
@@ -3,7 +3,7 @@ const path = require('path');
3
  const { execSync } = require('child_process');
4
 
5
  function copyConfig() {
6
- const src = path.join(__dirname, '..', 'playwright', 'packages', 'playwright', 'src', 'mcp', 'config.d.ts');
7
  const dst = path.join(__dirname, 'packages', 'playwright-mcp', 'config.d.ts');
8
  let content = fs.readFileSync(src, 'utf-8');
9
  content = content.replace(
 
3
  const { execSync } = require('child_process');
4
 
5
  function copyConfig() {
6
+ const src = path.join(__dirname, '..', 'playwright', 'packages', 'playwright-core', 'src', 'tools', 'mcp', 'config.d.ts');
7
  const dst = path.join(__dirname, 'packages', 'playwright-mcp', 'config.d.ts');
8
  let content = fs.readFileSync(src, 'utf-8');
9
  content = content.replace(