@playwright/mcp 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +352 -179
- package/config.d.ts +5 -0
- package/lib/config.js +43 -3
- package/lib/connection.js +2 -2
- package/lib/context.js +48 -39
- package/lib/program.js +22 -13
- package/lib/tools/common.js +1 -41
- package/lib/tools/screenshot.js +77 -0
- package/lib/tools/snapshot.js +1 -59
- package/lib/tools/utils.js +3 -0
- package/lib/tools/wait.js +59 -0
- package/lib/tools.js +8 -3
- package/package.json +1 -1
- /package/lib/tools/{screen.js → vision.js} +0 -0
package/README.md
CHANGED
|
@@ -4,25 +4,22 @@ A Model Context Protocol (MCP) server that provides browser automation capabilit
|
|
|
4
4
|
|
|
5
5
|
### Key Features
|
|
6
6
|
|
|
7
|
-
- **Fast and lightweight
|
|
8
|
-
- **LLM-friendly
|
|
9
|
-
- **Deterministic tool application
|
|
7
|
+
- **Fast and lightweight**. Uses Playwright's accessibility tree, not pixel-based input.
|
|
8
|
+
- **LLM-friendly**. No vision models needed, operates purely on structured data.
|
|
9
|
+
- **Deterministic tool application**. Avoids ambiguity common with screenshot-based approaches.
|
|
10
10
|
|
|
11
|
-
###
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
- Data extraction from structured content
|
|
15
|
-
- Automated testing driven by LLMs
|
|
16
|
-
- General-purpose browser interaction for agents
|
|
11
|
+
### Requirements
|
|
12
|
+
- Node.js 18 or newer
|
|
13
|
+
- VS Code, Cursor, Windsurf, Claude Desktop or any other MCP client
|
|
17
14
|
|
|
18
15
|
<!--
|
|
19
16
|
// Generate using:
|
|
20
17
|
node utils/generate-links.js
|
|
21
18
|
-->
|
|
22
19
|
|
|
23
|
-
|
|
20
|
+
### Getting started
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
First, install the Playwright MCP server with your client. A typical configuration looks like this:
|
|
26
23
|
|
|
27
24
|
```js
|
|
28
25
|
{
|
|
@@ -37,20 +34,12 @@ node utils/generate-links.js
|
|
|
37
34
|
}
|
|
38
35
|
```
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
[<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D)
|
|
41
38
|
|
|
42
|
-
- [Installation in VS Code](#installation-in-vs-code)
|
|
43
|
-
- [Command line](#command-line)
|
|
44
|
-
- [User profile](#user-profile)
|
|
45
|
-
- [Configuration file](#configuration-file)
|
|
46
|
-
- [Running on Linux](#running-on-linux)
|
|
47
|
-
- [Docker](#docker)
|
|
48
|
-
- [Programmatic usage](#programmatic-usage)
|
|
49
|
-
- [Tool modes](#tool-modes)
|
|
50
39
|
|
|
51
|
-
|
|
40
|
+
<details><summary><b>Install in VS Code</b></summary>
|
|
52
41
|
|
|
53
|
-
You can install the Playwright MCP server using the VS Code CLI:
|
|
42
|
+
You can also install the Playwright MCP server using the VS Code CLI:
|
|
54
43
|
|
|
55
44
|
```bash
|
|
56
45
|
# For VS Code
|
|
@@ -58,45 +47,171 @@ code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@la
|
|
|
58
47
|
```
|
|
59
48
|
|
|
60
49
|
After installation, the Playwright MCP server will be available for use with your GitHub Copilot agent in VS Code.
|
|
50
|
+
</details>
|
|
61
51
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
The Playwright MCP server supports the following command-line options:
|
|
65
|
-
|
|
66
|
-
- `--browser <browser>`: Browser or chrome channel to use. Possible values:
|
|
67
|
-
- `chrome`, `firefox`, `webkit`, `msedge`
|
|
68
|
-
- Chrome channels: `chrome-beta`, `chrome-canary`, `chrome-dev`
|
|
69
|
-
- Edge channels: `msedge-beta`, `msedge-canary`, `msedge-dev`
|
|
70
|
-
- Default: `chrome`
|
|
71
|
-
- `--caps <caps>`: Comma-separated list of capabilities to enable, possible values: tabs, pdf, history, wait, files, install. Default is all.
|
|
72
|
-
- `--cdp-endpoint <endpoint>`: CDP endpoint to connect to
|
|
73
|
-
- `--executable-path <path>`: Path to the browser executable
|
|
74
|
-
- `--headless`: Run browser in headless mode (headed by default)
|
|
75
|
-
- `--device`: Emulate mobile device
|
|
76
|
-
- `--user-data-dir <path>`: Path to the user data directory
|
|
77
|
-
- `--port <port>`: Port to listen on for SSE transport
|
|
78
|
-
- `--host <host>`: Host to bind server to. Default is localhost. Use 0.0.0.0 to bind to all interfaces.
|
|
79
|
-
- `--allowed-origins <origins>`: Semicolon-separated list of origins to allow the browser to request. Default is to allow all. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
|
|
80
|
-
- `--blocked-origins <origins>`: Semicolon-separated list of origins to block the browser to request. Origins matching both `--allowed-origins` and `--blocked-origins` will be blocked.
|
|
81
|
-
- `--vision`: Run server that uses screenshots (Aria snapshots are used by default)
|
|
82
|
-
- `--output-dir`: Directory for output files
|
|
83
|
-
- `--config <path>`: Path to the configuration file
|
|
52
|
+
<details>
|
|
53
|
+
<summary><b>Install in Cursor</b></summary>
|
|
84
54
|
|
|
85
|
-
|
|
55
|
+
Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx @playwright/mcp`. You can also verify config or add command like arguments via clicking `Edit`.
|
|
56
|
+
|
|
57
|
+
```js
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"playwright": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": [
|
|
63
|
+
"@playwright/mcp@latest"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
</details>
|
|
70
|
+
|
|
71
|
+
<details>
|
|
72
|
+
<summary><b>Install in Windsurf</b></summary>
|
|
73
|
+
|
|
74
|
+
Follow Windsuff MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use following configuration:
|
|
75
|
+
|
|
76
|
+
```js
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"playwright": {
|
|
80
|
+
"command": "npx",
|
|
81
|
+
"args": [
|
|
82
|
+
"@playwright/mcp@latest"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary><b>Install in Claude Desktop</b></summary>
|
|
92
|
+
|
|
93
|
+
Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use following configuration:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
{
|
|
97
|
+
"mcpServers": {
|
|
98
|
+
"playwright": {
|
|
99
|
+
"command": "npx",
|
|
100
|
+
"args": [
|
|
101
|
+
"@playwright/mcp@latest"
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
</details>
|
|
108
|
+
|
|
109
|
+
### Configuration
|
|
110
|
+
|
|
111
|
+
Playwright MCP server supports following arguments. They can be provided in the JSON configuration above, as a part of the `"args"` list:
|
|
86
112
|
|
|
87
|
-
|
|
113
|
+
<!--- Options generated by update-readme.js -->
|
|
88
114
|
|
|
89
115
|
```
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
116
|
+
> npx @playwright/mcp@latest --help
|
|
117
|
+
--allowed-origins <origins> semicolon-separated list of origins to allow the
|
|
118
|
+
browser to request. Default is to allow all.
|
|
119
|
+
--blocked-origins <origins> semicolon-separated list of origins to block the
|
|
120
|
+
browser from requesting. Blocklist is evaluated
|
|
121
|
+
before allowlist. If used without the allowlist,
|
|
122
|
+
requests not matching the blocklist are still
|
|
123
|
+
allowed.
|
|
124
|
+
--block-service-workers block service workers
|
|
125
|
+
--browser <browser> browser or chrome channel to use, possible
|
|
126
|
+
values: chrome, firefox, webkit, msedge.
|
|
127
|
+
--caps <caps> comma-separated list of capabilities to enable,
|
|
128
|
+
possible values: tabs, pdf, history, wait, files,
|
|
129
|
+
install. Default is all.
|
|
130
|
+
--cdp-endpoint <endpoint> CDP endpoint to connect to.
|
|
131
|
+
--config <path> path to the configuration file.
|
|
132
|
+
--device <device> device to emulate, for example: "iPhone 15"
|
|
133
|
+
--executable-path <path> path to the browser executable.
|
|
134
|
+
--headless run browser in headless mode, headed by default
|
|
135
|
+
--host <host> host to bind server to. Default is localhost. Use
|
|
136
|
+
0.0.0.0 to bind to all interfaces.
|
|
137
|
+
--ignore-https-errors ignore https errors
|
|
138
|
+
--isolated keep the browser profile in memory, do not save
|
|
139
|
+
it to disk.
|
|
140
|
+
--no-image-responses do not send image responses to the client.
|
|
141
|
+
--no-sandbox disable the sandbox for all process types that
|
|
142
|
+
are normally sandboxed.
|
|
143
|
+
--output-dir <path> path to the directory for output files.
|
|
144
|
+
--port <port> port to listen on for SSE transport.
|
|
145
|
+
--proxy-bypass <bypass> comma-separated domains to bypass proxy, for
|
|
146
|
+
example ".com,chromium.org,.domain.com"
|
|
147
|
+
--proxy-server <proxy> specify proxy server, for example
|
|
148
|
+
"http://myproxy:3128" or "socks5://myproxy:8080"
|
|
149
|
+
--storage-state <path> path to the storage state file for isolated
|
|
150
|
+
sessions.
|
|
151
|
+
--user-agent <ua string> specify user agent string
|
|
152
|
+
--user-data-dir <path> path to the user data directory. If not
|
|
153
|
+
specified, a temporary directory will be created.
|
|
154
|
+
--viewport-size <size> specify browser viewport size in pixels, for
|
|
155
|
+
example "1280, 720"
|
|
156
|
+
--vision Run server that uses screenshots (Aria snapshots
|
|
157
|
+
are used by default)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
<!--- End of options generated section -->
|
|
161
|
+
|
|
162
|
+
### User profile
|
|
163
|
+
|
|
164
|
+
You can run Playwright MCP with persistent profile like a regular browser (default), or in the isolated contexts for the testing sessions.
|
|
165
|
+
|
|
166
|
+
**Persistent profile**
|
|
167
|
+
|
|
168
|
+
All the logged in information will be stored in the persistent profile, you can delete it between sessions if you'd like to clear the offline state.
|
|
169
|
+
Persistent profile is located at the following locations and you can override it with the `--user-data-dir` argument.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Windows
|
|
173
|
+
%USERPROFILE%\AppData\Local\ms-playwright\mcp-{channel}-profile
|
|
174
|
+
|
|
175
|
+
# macOS
|
|
176
|
+
- ~/Library/Caches/ms-playwright/mcp-{channel}-profile
|
|
177
|
+
|
|
178
|
+
# Linux
|
|
179
|
+
- ~/.cache/ms-playwright/mcp-{channel}-profile
|
|
93
180
|
```
|
|
94
181
|
|
|
95
|
-
|
|
182
|
+
**Isolated**
|
|
183
|
+
|
|
184
|
+
In the isolated mode, each session is started in the isolated profile. Every time you ask MCP to close the browser,
|
|
185
|
+
the session is closed and all the storage state for this session is lost. You can provide initial storage state
|
|
186
|
+
to the browser via the config's `contextOptions` or via the `--storage-state` argument. Learn more about the storage
|
|
187
|
+
state [here](https://playwright.dev/docs/auth).
|
|
188
|
+
|
|
189
|
+
```js
|
|
190
|
+
{
|
|
191
|
+
"mcpServers": {
|
|
192
|
+
"playwright": {
|
|
193
|
+
"command": "npx",
|
|
194
|
+
"args": [
|
|
195
|
+
"@playwright/mcp@latest",
|
|
196
|
+
"--isolated",
|
|
197
|
+
"--storage-state={path/to/storage.json}
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
96
203
|
|
|
97
204
|
### Configuration file
|
|
98
205
|
|
|
99
|
-
The Playwright MCP server can be configured using a JSON configuration file.
|
|
206
|
+
The Playwright MCP server can be configured using a JSON configuration file. You can specify the configuration file
|
|
207
|
+
using the `--config` command line option:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npx @playwright/mcp@latest --config path/to/config.json
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
<details>
|
|
214
|
+
<summary>Configuration file schema</summary>
|
|
100
215
|
|
|
101
216
|
```typescript
|
|
102
217
|
{
|
|
@@ -105,6 +220,9 @@ The Playwright MCP server can be configured using a JSON configuration file. Her
|
|
|
105
220
|
// Browser type to use (chromium, firefox, or webkit)
|
|
106
221
|
browserName?: 'chromium' | 'firefox' | 'webkit';
|
|
107
222
|
|
|
223
|
+
// Keep the browser profile in memory, do not save it to disk.
|
|
224
|
+
isolated?: boolean;
|
|
225
|
+
|
|
108
226
|
// Path to user data directory for browser profile persistence
|
|
109
227
|
userDataDir?: string;
|
|
110
228
|
|
|
@@ -170,14 +288,9 @@ The Playwright MCP server can be configured using a JSON configuration file. Her
|
|
|
170
288
|
noImageResponses?: boolean;
|
|
171
289
|
}
|
|
172
290
|
```
|
|
291
|
+
</details>
|
|
173
292
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
npx @playwright/mcp@latest --config path/to/config.json
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Running on Linux
|
|
293
|
+
### Standalone MCP server
|
|
181
294
|
|
|
182
295
|
When running headed browser on system w/o display or from worker processes of the IDEs,
|
|
183
296
|
run the MCP server from environment with the DISPLAY and pass the `--port` flag to enable SSE transport.
|
|
@@ -198,7 +311,8 @@ And then in MCP client config, set the `url` to the SSE endpoint:
|
|
|
198
311
|
}
|
|
199
312
|
```
|
|
200
313
|
|
|
201
|
-
|
|
314
|
+
<details>
|
|
315
|
+
<summary><b>Docker</b></summary>
|
|
202
316
|
|
|
203
317
|
**NOTE:** The Docker implementation only supports headless chromium at the moment.
|
|
204
318
|
|
|
@@ -218,8 +332,10 @@ You can build the Docker image yourself.
|
|
|
218
332
|
```
|
|
219
333
|
docker build -t mcr.microsoft.com/playwright/mcp .
|
|
220
334
|
```
|
|
335
|
+
</details>
|
|
221
336
|
|
|
222
|
-
|
|
337
|
+
<details>
|
|
338
|
+
<summary><b>Programmatic usage</b></summary>
|
|
223
339
|
|
|
224
340
|
```js
|
|
225
341
|
import http from 'http';
|
|
@@ -238,8 +354,9 @@ http.createServer(async (req, res) => {
|
|
|
238
354
|
// ...
|
|
239
355
|
});
|
|
240
356
|
```
|
|
357
|
+
</details>
|
|
241
358
|
|
|
242
|
-
###
|
|
359
|
+
### Tools
|
|
243
360
|
|
|
244
361
|
The tools are available in two modes:
|
|
245
362
|
|
|
@@ -265,10 +382,10 @@ To use Vision Mode, add the `--vision` flag when starting the server:
|
|
|
265
382
|
Vision Mode works best with the computer use models that are able to interact with elements using
|
|
266
383
|
X Y coordinate space, based on the provided screenshot.
|
|
267
384
|
|
|
385
|
+
<!--- Tools generated by update-readme.js -->
|
|
268
386
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
### Snapshot-based Interactions
|
|
387
|
+
<details>
|
|
388
|
+
<summary><b>Interactions</b></summary>
|
|
272
389
|
|
|
273
390
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
274
391
|
|
|
@@ -336,6 +453,80 @@ X Y coordinate space, based on the provided screenshot.
|
|
|
336
453
|
|
|
337
454
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
338
455
|
|
|
456
|
+
- **browser_press_key**
|
|
457
|
+
- Title: Press a key
|
|
458
|
+
- Description: Press a key on the keyboard
|
|
459
|
+
- Parameters:
|
|
460
|
+
- `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
|
|
461
|
+
- Read-only: **false**
|
|
462
|
+
|
|
463
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
464
|
+
|
|
465
|
+
- **browser_wait_for**
|
|
466
|
+
- Title: Wait for
|
|
467
|
+
- Description: Wait for text to appear or disappear or a specified time to pass
|
|
468
|
+
- Parameters:
|
|
469
|
+
- `time` (number, optional): The time to wait in seconds
|
|
470
|
+
- `text` (string, optional): The text to wait for
|
|
471
|
+
- `textGone` (string, optional): The text to wait for to disappear
|
|
472
|
+
- Read-only: **true**
|
|
473
|
+
|
|
474
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
475
|
+
|
|
476
|
+
- **browser_file_upload**
|
|
477
|
+
- Title: Upload files
|
|
478
|
+
- Description: Upload one or multiple files
|
|
479
|
+
- Parameters:
|
|
480
|
+
- `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files.
|
|
481
|
+
- Read-only: **false**
|
|
482
|
+
|
|
483
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
484
|
+
|
|
485
|
+
- **browser_handle_dialog**
|
|
486
|
+
- Title: Handle a dialog
|
|
487
|
+
- Description: Handle a dialog
|
|
488
|
+
- Parameters:
|
|
489
|
+
- `accept` (boolean): Whether to accept the dialog.
|
|
490
|
+
- `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
|
|
491
|
+
- Read-only: **false**
|
|
492
|
+
|
|
493
|
+
</details>
|
|
494
|
+
|
|
495
|
+
<details>
|
|
496
|
+
<summary><b>Navigation</b></summary>
|
|
497
|
+
|
|
498
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
499
|
+
|
|
500
|
+
- **browser_navigate**
|
|
501
|
+
- Title: Navigate to a URL
|
|
502
|
+
- Description: Navigate to a URL
|
|
503
|
+
- Parameters:
|
|
504
|
+
- `url` (string): The URL to navigate to
|
|
505
|
+
- Read-only: **false**
|
|
506
|
+
|
|
507
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
508
|
+
|
|
509
|
+
- **browser_navigate_back**
|
|
510
|
+
- Title: Go back
|
|
511
|
+
- Description: Go back to the previous page
|
|
512
|
+
- Parameters: None
|
|
513
|
+
- Read-only: **true**
|
|
514
|
+
|
|
515
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
516
|
+
|
|
517
|
+
- **browser_navigate_forward**
|
|
518
|
+
- Title: Go forward
|
|
519
|
+
- Description: Go forward to the next page
|
|
520
|
+
- Parameters: None
|
|
521
|
+
- Read-only: **true**
|
|
522
|
+
|
|
523
|
+
</details>
|
|
524
|
+
|
|
525
|
+
<details>
|
|
526
|
+
<summary><b>Resources</b></summary>
|
|
527
|
+
|
|
528
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
529
|
+
|
|
339
530
|
- **browser_take_screenshot**
|
|
340
531
|
- Title: Take a screenshot
|
|
341
532
|
- Description: Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
|
|
@@ -346,62 +537,66 @@ X Y coordinate space, based on the provided screenshot.
|
|
|
346
537
|
- `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.
|
|
347
538
|
- Read-only: **true**
|
|
348
539
|
|
|
349
|
-
|
|
540
|
+
<!-- NOTE: This has been generated via update-readme.js -->
|
|
541
|
+
|
|
542
|
+
- **browser_pdf_save**
|
|
543
|
+
- Title: Save as PDF
|
|
544
|
+
- Description: Save page as PDF
|
|
545
|
+
- Parameters:
|
|
546
|
+
- `filename` (string, optional): File name to save the pdf to. Defaults to `page-{timestamp}.pdf` if not specified.
|
|
547
|
+
- Read-only: **true**
|
|
350
548
|
|
|
351
549
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
352
550
|
|
|
353
|
-
- **
|
|
354
|
-
- Title:
|
|
355
|
-
- Description:
|
|
551
|
+
- **browser_network_requests**
|
|
552
|
+
- Title: List network requests
|
|
553
|
+
- Description: Returns all network requests since loading the page
|
|
356
554
|
- Parameters: None
|
|
357
555
|
- Read-only: **true**
|
|
358
556
|
|
|
359
557
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
360
558
|
|
|
361
|
-
- **
|
|
362
|
-
- Title:
|
|
363
|
-
- Description:
|
|
364
|
-
- Parameters:
|
|
365
|
-
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
366
|
-
- `x` (number): X coordinate
|
|
367
|
-
- `y` (number): Y coordinate
|
|
559
|
+
- **browser_console_messages**
|
|
560
|
+
- Title: Get console messages
|
|
561
|
+
- Description: Returns all console messages
|
|
562
|
+
- Parameters: None
|
|
368
563
|
- Read-only: **true**
|
|
369
564
|
|
|
565
|
+
</details>
|
|
566
|
+
|
|
567
|
+
<details>
|
|
568
|
+
<summary><b>Utilities</b></summary>
|
|
569
|
+
|
|
370
570
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
371
571
|
|
|
372
|
-
- **
|
|
373
|
-
- Title:
|
|
374
|
-
- Description:
|
|
375
|
-
- Parameters:
|
|
376
|
-
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
377
|
-
- `x` (number): X coordinate
|
|
378
|
-
- `y` (number): Y coordinate
|
|
572
|
+
- **browser_install**
|
|
573
|
+
- Title: Install the browser specified in the config
|
|
574
|
+
- Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
|
|
575
|
+
- Parameters: None
|
|
379
576
|
- Read-only: **false**
|
|
380
577
|
|
|
381
578
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
382
579
|
|
|
383
|
-
- **
|
|
384
|
-
- Title:
|
|
385
|
-
- Description:
|
|
386
|
-
- Parameters:
|
|
387
|
-
|
|
388
|
-
- `startX` (number): Start X coordinate
|
|
389
|
-
- `startY` (number): Start Y coordinate
|
|
390
|
-
- `endX` (number): End X coordinate
|
|
391
|
-
- `endY` (number): End Y coordinate
|
|
392
|
-
- Read-only: **false**
|
|
580
|
+
- **browser_close**
|
|
581
|
+
- Title: Close browser
|
|
582
|
+
- Description: Close the page
|
|
583
|
+
- Parameters: None
|
|
584
|
+
- Read-only: **true**
|
|
393
585
|
|
|
394
586
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
395
587
|
|
|
396
|
-
- **
|
|
397
|
-
- Title:
|
|
398
|
-
- Description:
|
|
588
|
+
- **browser_resize**
|
|
589
|
+
- Title: Resize browser window
|
|
590
|
+
- Description: Resize the browser window
|
|
399
591
|
- Parameters:
|
|
400
|
-
- `
|
|
401
|
-
- `
|
|
402
|
-
- Read-only: **
|
|
592
|
+
- `width` (number): Width of the browser window
|
|
593
|
+
- `height` (number): Height of the browser window
|
|
594
|
+
- Read-only: **true**
|
|
595
|
+
|
|
596
|
+
</details>
|
|
403
597
|
|
|
404
|
-
|
|
598
|
+
<details>
|
|
599
|
+
<summary><b>Tabs</b></summary>
|
|
405
600
|
|
|
406
601
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
407
602
|
|
|
@@ -438,83 +633,88 @@ X Y coordinate space, based on the provided screenshot.
|
|
|
438
633
|
- `index` (number, optional): The index of the tab to close. Closes current tab if not provided.
|
|
439
634
|
- Read-only: **false**
|
|
440
635
|
|
|
441
|
-
|
|
636
|
+
</details>
|
|
637
|
+
|
|
638
|
+
<details>
|
|
639
|
+
<summary><b>Testing</b></summary>
|
|
442
640
|
|
|
443
641
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
444
642
|
|
|
445
|
-
- **
|
|
446
|
-
- Title:
|
|
447
|
-
- Description:
|
|
643
|
+
- **browser_generate_playwright_test**
|
|
644
|
+
- Title: Generate a Playwright test
|
|
645
|
+
- Description: Generate a Playwright test for given scenario
|
|
448
646
|
- Parameters:
|
|
449
|
-
- `
|
|
450
|
-
|
|
647
|
+
- `name` (string): The name of the test
|
|
648
|
+
- `description` (string): The description of the test
|
|
649
|
+
- `steps` (array): The steps of the test
|
|
650
|
+
- Read-only: **true**
|
|
451
651
|
|
|
452
|
-
|
|
652
|
+
</details>
|
|
453
653
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
- Description: Go back to the previous page
|
|
457
|
-
- Parameters: None
|
|
458
|
-
- Read-only: **true**
|
|
654
|
+
<details>
|
|
655
|
+
<summary><b>Vision mode</b></summary>
|
|
459
656
|
|
|
460
657
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
461
658
|
|
|
462
|
-
- **
|
|
463
|
-
- Title:
|
|
464
|
-
- Description:
|
|
659
|
+
- **browser_screen_capture**
|
|
660
|
+
- Title: Take a screenshot
|
|
661
|
+
- Description: Take a screenshot of the current page
|
|
465
662
|
- Parameters: None
|
|
466
663
|
- Read-only: **true**
|
|
467
664
|
|
|
468
|
-
### Keyboard
|
|
469
|
-
|
|
470
665
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
471
666
|
|
|
472
|
-
- **
|
|
473
|
-
- Title:
|
|
474
|
-
- Description:
|
|
667
|
+
- **browser_screen_move_mouse**
|
|
668
|
+
- Title: Move mouse
|
|
669
|
+
- Description: Move mouse to a given position
|
|
475
670
|
- Parameters:
|
|
476
|
-
- `
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
671
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
672
|
+
- `x` (number): X coordinate
|
|
673
|
+
- `y` (number): Y coordinate
|
|
674
|
+
- Read-only: **true**
|
|
480
675
|
|
|
481
676
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
482
677
|
|
|
483
|
-
- **
|
|
484
|
-
- Title:
|
|
485
|
-
- Description:
|
|
486
|
-
- Parameters:
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
678
|
+
- **browser_screen_click**
|
|
679
|
+
- Title: Click
|
|
680
|
+
- Description: Click left mouse button
|
|
681
|
+
- Parameters:
|
|
682
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
683
|
+
- `x` (number): X coordinate
|
|
684
|
+
- `y` (number): Y coordinate
|
|
685
|
+
- Read-only: **false**
|
|
490
686
|
|
|
491
687
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
492
688
|
|
|
493
|
-
- **
|
|
494
|
-
- Title:
|
|
495
|
-
- Description:
|
|
689
|
+
- **browser_screen_drag**
|
|
690
|
+
- Title: Drag mouse
|
|
691
|
+
- Description: Drag left mouse button
|
|
496
692
|
- Parameters:
|
|
497
|
-
- `
|
|
693
|
+
- `element` (string): Human-readable element description used to obtain permission to interact with the element
|
|
694
|
+
- `startX` (number): Start X coordinate
|
|
695
|
+
- `startY` (number): Start Y coordinate
|
|
696
|
+
- `endX` (number): End X coordinate
|
|
697
|
+
- `endY` (number): End Y coordinate
|
|
498
698
|
- Read-only: **false**
|
|
499
699
|
|
|
500
700
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
501
701
|
|
|
502
|
-
- **
|
|
503
|
-
- Title:
|
|
504
|
-
- Description:
|
|
702
|
+
- **browser_screen_type**
|
|
703
|
+
- Title: Type text
|
|
704
|
+
- Description: Type text
|
|
505
705
|
- Parameters:
|
|
506
|
-
- `
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
### Utilities
|
|
706
|
+
- `text` (string): Text to type into the element
|
|
707
|
+
- `submit` (boolean, optional): Whether to submit entered text (press Enter after)
|
|
708
|
+
- Read-only: **false**
|
|
510
709
|
|
|
511
710
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
512
711
|
|
|
513
|
-
- **
|
|
514
|
-
- Title:
|
|
515
|
-
- Description:
|
|
516
|
-
- Parameters:
|
|
517
|
-
|
|
712
|
+
- **browser_press_key**
|
|
713
|
+
- Title: Press a key
|
|
714
|
+
- Description: Press a key on the keyboard
|
|
715
|
+
- Parameters:
|
|
716
|
+
- `key` (string): Name of the key to press or a character to generate, such as `ArrowLeft` or `a`
|
|
717
|
+
- Read-only: **false**
|
|
518
718
|
|
|
519
719
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
520
720
|
|
|
@@ -529,20 +729,11 @@ X Y coordinate space, based on the provided screenshot.
|
|
|
529
729
|
|
|
530
730
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
531
731
|
|
|
532
|
-
- **
|
|
533
|
-
- Title:
|
|
534
|
-
- Description:
|
|
732
|
+
- **browser_file_upload**
|
|
733
|
+
- Title: Upload files
|
|
734
|
+
- Description: Upload one or multiple files
|
|
535
735
|
- Parameters:
|
|
536
|
-
- `
|
|
537
|
-
- `height` (number): Height of the browser window
|
|
538
|
-
- Read-only: **true**
|
|
539
|
-
|
|
540
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
541
|
-
|
|
542
|
-
- **browser_install**
|
|
543
|
-
- Title: Install the browser specified in the config
|
|
544
|
-
- Description: Install the browser specified in the config. Call this if you get an error about the browser not being installed.
|
|
545
|
-
- Parameters: None
|
|
736
|
+
- `paths` (array): The absolute paths to the files to upload. Can be a single file or multiple files.
|
|
546
737
|
- Read-only: **false**
|
|
547
738
|
|
|
548
739
|
<!-- NOTE: This has been generated via update-readme.js -->
|
|
@@ -555,25 +746,7 @@ X Y coordinate space, based on the provided screenshot.
|
|
|
555
746
|
- `promptText` (string, optional): The text of the prompt in case of a prompt dialog.
|
|
556
747
|
- Read-only: **false**
|
|
557
748
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
- **browser_network_requests**
|
|
561
|
-
- Title: List network requests
|
|
562
|
-
- Description: Returns all network requests since loading the page
|
|
563
|
-
- Parameters: None
|
|
564
|
-
- Read-only: **true**
|
|
565
|
-
|
|
566
|
-
### Testing
|
|
749
|
+
</details>
|
|
567
750
|
|
|
568
|
-
<!-- NOTE: This has been generated via update-readme.js -->
|
|
569
|
-
|
|
570
|
-
- **browser_generate_playwright_test**
|
|
571
|
-
- Title: Generate a Playwright test
|
|
572
|
-
- Description: Generate a Playwright test for given scenario
|
|
573
|
-
- Parameters:
|
|
574
|
-
- `name` (string): The name of the test
|
|
575
|
-
- `description` (string): The description of the test
|
|
576
|
-
- `steps` (array): The steps of the test
|
|
577
|
-
- Read-only: **true**
|
|
578
751
|
|
|
579
|
-
<!--- End of generated section -->
|
|
752
|
+
<!--- End of tools generated section -->
|