Skip to content

v0.2.0 — `web-view do <verb>` element interaction

Choose a tag to compare

@lipex360x lipex360x released this 28 May 11:42
a9e36b3

Phase B of #4 ships. Adds the web-view do <verb> element-interaction CLI family per ADR 0001.

What's new

web-view do click       --role button   --name "Next slide"
web-view do fill        --role textbox  --name "Email"  --value "x@y.com"
web-view do fill        --role textbox  --name "Body"   < message.txt
web-view do check       --role checkbox --name "Remember me"
web-view do press       --keys "Control+a,Backspace"
web-view do hover       --role button   --name "Tooltip"
web-view do dblclick    --role link     --name "Open"
web-view do right-click --role cell     --name "A1"
web-view do scroll-into-view --role region --name "Footer"
web-view do upload      --role button   --name "Choose file" --file ./report.pdf
web-view do drag        --from "button:Item" --to "region:Trash"

Every verb accepts the same options: --port/--tab for instance + tab targeting (same semantics as web-view navigate), --timeout for the upper bound on element waits (default 15s), --quiet/-q to silence the one-line success ack. CSS-first workflows use --selector <css> as a mutually exclusive alternative to --role/--name.

Why this matters

Closes the read-yaml → act loop:

web-view snap login                                       # produces 01-login.aria.yaml
# YAML shows: `- button "Sign in"`, `- textbox "Email"`
web-view do fill --role textbox --name "Email" --value "alice@example.com"
web-view do click --role button --name "Sign in"
web-view snap after-login                                 # captures the new state

No Python REPL escape needed for the common "click this thing" path.

Surface

  • Root web-view -h stays terse: 6 commands (start | list | stop | navigate | snap | do).
  • Discovery for the interaction verbs: web-view do -h.
  • Per-verb help: web-view do <verb> -h carries Examples + addressing + port/tab notes.

Install

uv tool install --reinstall git+https://github.com/lipex360x/web-view@v0.2.0

Or upgrade an existing install:

uv tool upgrade web-view

Out of scope (deferred)

  • evaluate — needs library work in cdp.py first plus its own design pass for JSON-serialisation and JS-input encoding. Will land as a follow-up issue.