chrome-agent 0.4.3 → 0.5.0
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 +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -88,8 +88,8 @@ UIDs are stable across inspects (based on Chrome's `backendNodeId`). The agent i
|
|
|
88
88
|
|
|
89
89
|
| Command | Description |
|
|
90
90
|
|---------|------------|
|
|
91
|
-
| `goto <url> [--inspect] [--max-depth N]` | Navigate to URL |
|
|
92
|
-
| `inspect [--verbose] [--max-depth N] [--uid nN] [--filter "role,role"]` | Accessibility tree with stable uids |
|
|
91
|
+
| `goto <url> [--inspect] [--max-depth N] [--header "K: V"]` | Navigate to URL. `--header` sends extra HTTP headers (repeatable) |
|
|
92
|
+
| `inspect [--verbose] [--max-depth N] [--uid nN] [--filter "role,role"] [--max-chars N] [--offset K]` | Accessibility tree with stable uids. `--max-chars`/`--offset` cap and page the output |
|
|
93
93
|
| `click <uid> [--inspect] [--max-depth N]` | Click by uid (JS fallback if no box model) |
|
|
94
94
|
| `click --selector "css" [--inspect]` | Click by CSS selector |
|
|
95
95
|
| `click --xy 100,200` | Click by coordinates |
|
|
@@ -103,12 +103,15 @@ UIDs are stable across inspects (based on Chrome's `backendNodeId`). The agent i
|
|
|
103
103
|
| `console [--level error] [--clear]` | Show captured console.log/warn/error + JS exceptions |
|
|
104
104
|
| `pipe` | Persistent connection: JSON stdin → JSON stdout |
|
|
105
105
|
| `wait <text\|url\|selector> <pattern>` | Wait for condition |
|
|
106
|
+
| `wait network-idle [--idle-ms N] [--timeout N]` | Wait until the network is quiet (SPA/XHR settle) |
|
|
106
107
|
| `type <text> [--selector "css"]` | Type into focused/selected element |
|
|
107
108
|
| `press <key>` | Press Enter, Tab, Escape, etc. |
|
|
108
109
|
| `scroll <down\|up\|uid>` | Scroll page or element into view |
|
|
109
110
|
| `hover <uid>` | Hover over element |
|
|
110
111
|
| `back` | Navigate back in history |
|
|
111
|
-
| `screenshot [--filename name]` |
|
|
112
|
+
| `screenshot [--filename name] [--format jpeg\|png] [--quality N] [--max-width N] [--uid nN\|--selector "css"]` | Screenshot → file path. JPEG/max-width shrink it; `--uid`/`--selector` clip to one element |
|
|
113
|
+
| `pdf [--out name] [--landscape] [--background]` | Print the current page to a PDF file |
|
|
114
|
+
| `download <url> [--out path] [--timeout N]` | Download a URL fetched in-page (cookies/auth preserved) → `{path,bytes,mime}` |
|
|
112
115
|
| `tabs` | List open browser tabs |
|
|
113
116
|
| `close [--purge]` | Close browser (--purge deletes profile/cookies) |
|
|
114
117
|
| `status` | Show session info |
|
|
@@ -124,10 +127,15 @@ UIDs are stable across inspects (based on Chrome's `backendNodeId`). The agent i
|
|
|
124
127
|
--stealth Bypass bot detection (Cloudflare, Turnstile)
|
|
125
128
|
--timeout <seconds> Command timeout (default: 30)
|
|
126
129
|
--max-depth <N> Limit inspect tree depth (works with --inspect on any command)
|
|
130
|
+
--copy-cookies Use cookies from your real Chrome profile
|
|
131
|
+
--dialog <mode> JS dialog policy: accept (default), dismiss, or manual
|
|
132
|
+
--dialog-text <text> Text submitted for prompt() dialogs under --dialog accept
|
|
127
133
|
--ignore-https-errors Accept self-signed certificates
|
|
128
134
|
--json Structured JSON output for all commands
|
|
129
135
|
```
|
|
130
136
|
|
|
137
|
+
JS dialogs (`alert`/`confirm`/`prompt`/`beforeunload`) are auto-answered by default (`--dialog accept`) so the page never hangs on a blocking dialog.
|
|
138
|
+
|
|
131
139
|
## The Inspect → Act → Inspect Loop
|
|
132
140
|
|
|
133
141
|
```bash
|