ov.capture.cdp#
The CDP escape-hatch plugin (Chromium-only) – the ~20% Playwright can’t reach.
Per D1, attach a CDP session to the same page and use it for: the full
accessibility tree (Accessibility.getFullAXTree), Server-Sent-Event frames
(Network.eventSourceMessageReceived, which page.route cannot reliably
intercept), runtime counters (Performance.getMetrics), and the TLS
certificate. response.body() eviction recovery via Network.getResponseBody
is also exposed but not relied on by the default network probe.
Critical gotcha encoded here: in an AX node, role/name/value are
AXValue objects, so the accessible name lives at node["name"]["value"];
and getFullAXTree does not cross-origin-recurse, so frames are handled
one at a time. CDP is Chromium-only – an accepted constraint for the capture tail.
Functions
|
Flatten a raw CDP AX node into |
Classes
|
A thin, friendly wrapper over a Playwright |
- class ov.capture.cdp.CdpSession(client)[source]#
Bases:
objectA thin, friendly wrapper over a Playwright
CDPSession(Chromium).- capture_sse(sink)[source]#
Append every SSE frame to
sink(Network.eventSourceMessageReceived).- Return type:
- enable_network()[source]#
Enable the
Networkdomain once (required for SSE + body recovery).- Return type:
- get_certificate(origin)[source]#
Return the TLS certificate info for
origin(Network.getCertificate).
- get_full_ax_tree(*, frame_id=None)[source]#
Return the full AX tree as flattened nodes (recorded as evidence).
getFullAXTreedoes not recurse cross-origin frames; passframe_idto fetch a specific frame’s tree.