Skip to content

Commit f51abc8

Browse files
sanketsudakeclaude
andcommitted
docs: document snap filters, open, list --url/--title, wait --idle
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f8e08e5 commit f51abc8

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ chrome-cdp doctor # check the connection and get the exact fix if it's not re
3535
## Use
3636

3737
```sh
38-
chrome-cdp list # list open tabs (id, title, url)
38+
chrome-cdp list --url outlook # list open tabs (--url/--title filter by substring)
39+
chrome-cdp open https://example.com # new tab, navigate, make it current — returns its id
3940
chrome-cdp use url:github # set the sticky current tab
4041
chrome-cdp snap # accessibility-tree snapshot (see the page)
42+
chrome-cdp snap --role button --grep "[AP]M" # filter the tree server-side (role + name regex)
4143
chrome-cdp nav https://example.com # navigate (waits for load)
4244
chrome-cdp html "#main" # outer HTML of a selector (or the page)
4345
chrome-cdp text ".title" # visible text of a selector
@@ -53,7 +55,7 @@ chrome-cdp grid # read a table/grid as {headers, rows} (a11y
5355
chrome-cdp value --all "input.hr" # values of every match, as a list
5456
chrome-cdp scroll --dy 600 # scroll (or --to <sel> into view, --wheel for lazy grids)
5557
chrome-cdp eval "document.title" # evaluate JS
56-
chrome-cdp wait --url "/dashboard" # wait until the tab's URL settles (or --visible/--gone/--for)
58+
chrome-cdp wait --url "/dashboard" # wait until the tab's URL settles (or --visible/--gone/--text/--stable/--idle/--for)
5759
chrome-cdp screenshot # PNG -> ./screenshot-<timestamp>.png (or -o -)
5860
chrome-cdp raw --list # list the connected Chrome's CDP domains
5961
chrome-cdp raw Network.setCacheDisabled '{"cacheDisabled":true}' # any CDP method
@@ -136,7 +138,7 @@ Shell completion is built in (cobra): `chrome-cdp completion bash|zsh|fish|power
136138
## Status
137139
138140
**Implemented & tested:** the connection ladder + `DevToolsActivePort` reader, target-grammar resolution, the uniform envelope + exit-code contract, selector options (`--by` incl.
139-
`name` = ARIA accessible-name addressing with `--role`/`--nth` (with a DOM accessible-name fallback on a throttled hidden tab), `ref` = snap-issued `e<id>` element refs, `cell` = grid input by `[row|]column` header, `--wait`, `--no-wait`), the connection globals (`--port`, `--profile-dir`, `--no-launch`) and output globals (`--json`, `--no-color`, `-v`, `--no-input`, `--quiet`, `--timeout`), and commands `list`, `use`, `nav`, `snap`, `html`, `text`, `value`, `eval`, `click`, `type`, `fill` (clear-then-set), `select` (prompt/combobox/cascade/native-`<select>`), `grid` (a11y table read), `value --all`, `scroll` (`--dy`/`--to`/`--wheel`), `--wait-text` (act-and-confirm on action verbs), `attr` (get/list/set/rm), `screenshot`, `pdf`, `cookie` (list/set/rm/clear), `headers set`, `emulate` (viewport/geo/reset), `frame list`, `wait` (`--url`/`--visible`/`--gone`/`--for`), `session` (NDJSON batch over one held connection), `--pierce` (shadow-DOM/iframe piercing), `raw` (incl.
141+
`name` = ARIA accessible-name addressing with `--role`/`--nth` (with a DOM accessible-name fallback on a throttled hidden tab), `ref` = snap-issued `e<id>` element refs, `cell` = grid input by `[row|]column` header, `--wait`, `--no-wait`), the connection globals (`--port`, `--profile-dir`, `--no-launch`) and output globals (`--json`, `--no-color`, `-v`, `--no-input`, `--quiet`, `--timeout`), and commands `list` (`--url`/`--title` filters), `open` (new tab → navigate → current), `use`, `nav`, `snap` (`--role`/`--grep`/`--region`/`--dedupe` server-side filters), `html`, `text`, `value`, `eval`, `click`, `type`, `fill` (clear-then-set), `select` (prompt/combobox/cascade/native-`<select>`), `grid` (a11y table read), `value --all`, `scroll` (`--dy`/`--to`/`--wheel`), `--wait-text` (act-and-confirm on action verbs), `attr` (get/list/set/rm), `screenshot`, `pdf`, `cookie` (list/set/rm/clear), `headers set`, `emulate` (viewport/geo/reset), `frame list`, `wait` (`--url`/`--visible`/`--gone`/`--text`/`--stable`/`--idle`/`--for`), `session` (NDJSON batch over one held connection), `--pierce` (shadow-DOM/iframe piercing), `raw` (incl.
140142
`--browser`/`--list`), `doctor`, `daemon` (start/stop/status), `exit-codes`, `version` (and `--version`).
141143
Plus an optional TOML config file (flags > `CHROME_CDP_*` env > config > defaults), shell completion (`completion`), and goreleaser + Homebrew-cask packaging with a CI matrix (Linux/macOS) and a tag-driven release workflow.
142144
Verified with unit tests, a golden output-contract test, an in-process + subprocess command-boundary suite, RPC round-trip tests for the daemon, and an integration test that drives a real headless Chrome.

0 commit comments

Comments
 (0)