Skip to content

v0.6.0 — iframe support

Choose a tag to compare

@lipex360x lipex360x released this 18 Jun 11:30
5497f34

Iframe support (#11): see and act inside same-origin iframes, plus two new escape-hatch verbs. Three additive, backward-compatible parts.

Added

  • web-view snap recurses into same-origin iframes (library: cdp.aria_snapshot(page, include_frames=True)). Each - iframe leaf is expanded in place: same-origin frames have their accessibility tree inlined under the node, labelled with the frame URL; cross-origin frames are annotated - iframe (cross-origin, not captured). --no-frames (library include_frames=False) keeps the legacy top-frame output.
  • --frame selector for web-view do <verb> — every element-targeting verb (click, fill, check, hover, dblclick, right-click, scroll-into-view, upload, drag) can act on an element inside an iframe. Grammar mirrors --tab: index (--frame 1, 0 is the top frame), URL substring (--frame index_lms), or auto (default). auto cheap-probes with a non-waiting .count(), so it never multiplies --timeout across frames. press is excluded by design (keyboard input is frame-agnostic).
  • web-view eval --js "<expr>" (library: cdp.evaluate(root, expression)) runs JS in a tab or frame and prints the result as JSON; a non-serialisable result exits 1 with a structured error.
  • web-view download --url <u> --out <path> (library: cdp.download_resource(context, source_url, destination)) fetches through the browser context (cookies reused), prints HTTP status + byte count, and exits 1 on a non-2xx status.

cdp.evaluate and cdp.download_resource are exported in web_view.cdp.__all__.

Install / upgrade: uv tool upgrade web-view (or uv tool install --reinstall git+https://github.com/lipex360x/web-view@v0.6.0).

Full changelog: https://github.com/lipex360x/web-view/blob/main/CHANGELOG.md