feat: add selector-based browser actions
This commit is contained in:
@@ -112,4 +112,4 @@ git commit -m "Add Clawd workspace"
|
||||
- Canvas UI runs full-screen with native overlays. Avoid placing critical controls in the top-left/top-right/bottom edges; add explicit gutters in the layout and don’t rely on safe-area insets.
|
||||
- For browser-driven verification, use `clawdis browser` (tabs/status/screenshot) with the clawd-managed Chrome profile.
|
||||
- For DOM inspection, use `clawdis browser eval|query|dom|snapshot` (and `--json`/`--out` when you need machine output).
|
||||
- For interactions, use `clawdis browser click|type|hover|drag|select|upload|press|wait|navigate|back|evaluate|run`.
|
||||
- For interactions, use `clawdis browser click|type|hover|drag|select|upload|press|wait|navigate|back|evaluate|run` (click/type accept `--selector`).
|
||||
|
||||
@@ -174,7 +174,9 @@ Actions:
|
||||
- `clawdis browser navigate https://example.com`
|
||||
- `clawdis browser resize 1280 720`
|
||||
- `clawdis browser click 12 --double`
|
||||
- `clawdis browser click --selector 'button.save'`
|
||||
- `clawdis browser type 23 "hello" --submit`
|
||||
- `clawdis browser type --selector "input[name=q]" "hello"`
|
||||
- `clawdis browser press Enter`
|
||||
- `clawdis browser hover 44`
|
||||
- `clawdis browser drag 10 11`
|
||||
@@ -191,6 +193,7 @@ Notes:
|
||||
- `upload` and `dialog` are **arming** calls; run them before the click/press that triggers the chooser/dialog.
|
||||
- The arm default timeout is **2 minutes** (clamped to max 2 minutes); pass `timeoutMs` if you need shorter.
|
||||
- `snapshot --format ai` returns AI snapshot markup used for ref-based actions.
|
||||
- `click`/`type` accept `--selector` to target CSS selectors instead of AI refs.
|
||||
|
||||
## Security & privacy notes
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ Core actions:
|
||||
Notes:
|
||||
- Requires `browser.enabled=true` in `~/.clawdis/clawdis.json`.
|
||||
- Uses `browser.controlUrl` unless `controlUrl` is passed explicitly.
|
||||
- `act` supports CSS selectors for `click`/`type` via `selector` (use `ref` for AI snapshot targets).
|
||||
|
||||
### `clawdis_canvas`
|
||||
Drive the node Canvas (present, eval, snapshot, A2UI).
|
||||
|
||||
Reference in New Issue
Block a user