pub struct Page { /* private fields */ }Expand description
A page (tab) in a browser.
Implementations§
Source§impl Page
impl Page
pub fn browser(&self) -> Browser
pub fn target_id(&self) -> &str
pub fn is_closed(&self) -> bool
Sourcepub fn set_default_timeout(&self, ms: u64)
pub fn set_default_timeout(&self, ms: u64)
Set the default timeout (ms) for all actions on this page, mirroring
Playwright’s page.setDefaultTimeout. The value is stored on the page
([PageInner::default_timeout_ms]) and propagated to the underlying
CDP session’s command timeout.
Sourcepub async fn goto(
&self,
url: &str,
opts: Option<GotoOptions>,
) -> Result<Option<Response>>
pub async fn goto( &self, url: &str, opts: Option<GotoOptions>, ) -> Result<Option<Response>>
Navigate to url.
Sourcepub async fn reload(
&self,
opts: Option<GotoOptions>,
) -> Result<Option<Response>>
pub async fn reload( &self, opts: Option<GotoOptions>, ) -> Result<Option<Response>>
Reload the page.
Sourcepub async fn wait_for_load_state(&self, state: Option<WaitUntil>) -> Result<()>
pub async fn wait_for_load_state(&self, state: Option<WaitUntil>) -> Result<()>
Wait for a given document lifecycle state.
Sourcepub async fn go_back(
&self,
opts: Option<GotoOptions>,
) -> Result<Option<Response>>
pub async fn go_back( &self, opts: Option<GotoOptions>, ) -> Result<Option<Response>>
Navigate one entry back in history (best-effort; returns no response).
Sourcepub async fn go_forward(
&self,
opts: Option<GotoOptions>,
) -> Result<Option<Response>>
pub async fn go_forward( &self, opts: Option<GotoOptions>, ) -> Result<Option<Response>>
Navigate one entry forward in history (best-effort; returns no response).
Sourcepub async fn wait_for_url(
&self,
url: &str,
opts: Option<GotoOptions>,
) -> Result<()>
pub async fn wait_for_url( &self, url: &str, opts: Option<GotoOptions>, ) -> Result<()>
Wait until the page URL matches url (exact, or * glob), then optionally
wait for a lifecycle state.
Set the default navigation timeout (ms), separate from action timeout.
Sourcepub async fn emulate_media(
&self,
opts: Option<EmulateMediaOptions>,
) -> Result<()>
pub async fn emulate_media( &self, opts: Option<EmulateMediaOptions>, ) -> Result<()>
Emulate CSS media (media / color-scheme / reduced-motion).
Sourcepub async fn set_offline(&self, offline: bool) -> Result<()>
pub async fn set_offline(&self, offline: bool) -> Result<()>
Toggle network offline emulation.
Sourcepub async fn drag_and_drop(
&self,
source: &str,
target: &str,
options: Option<DragToOptions>,
) -> Result<()>
pub async fn drag_and_drop( &self, source: &str, target: &str, options: Option<DragToOptions>, ) -> Result<()>
Drag the element matched by source onto the element matched by target.
pub async fn url(&self) -> Result<String>
pub async fn title(&self) -> Result<String>
pub async fn content(&self) -> Result<String>
pub async fn set_content(&self, html: &str) -> Result<()>
Sourcepub async fn evaluate<R: DeserializeOwned>(&self, expression: &str) -> Result<R>
pub async fn evaluate<R: DeserializeOwned>(&self, expression: &str) -> Result<R>
Evaluate a JS expression in the main world, returning a typed result.
expression is wrapped as (arg) => { return (<expression>); }.
Sourcepub async fn evaluate_handle(&self, expression: &str) -> Result<JSHandle>
pub async fn evaluate_handle(&self, expression: &str) -> Result<JSHandle>
Evaluate a JS expression in the main world, returning a JSHandle to
the result (returned by reference, not by value). Mirrors Playwright’s
page.evaluateHandle.
Like evaluate, expression is wrapped as
(arg) => { return (<expression>); } and run against the page’s main
world. The returned Runtime.RemoteObjectId is captured and wrapped in
a JSHandle. Returns an error if the evaluation yields null/
undefined (no remote object to reference).
Sourcepub async fn evaluate_with_arg<R: DeserializeOwned, T: Serialize>(
&self,
expression: &str,
arg: &T,
) -> Result<R>
pub async fn evaluate_with_arg<R: DeserializeOwned, T: Serialize>( &self, expression: &str, arg: &T, ) -> Result<R>
Evaluate a JS expression with a JSON-serializable argument.
Sourcepub async fn wait_for_function<R: DeserializeOwned>(
&self,
expression: &str,
arg: Option<Value>,
options: Option<WaitForFunctionOptions>,
) -> Result<R>
pub async fn wait_for_function<R: DeserializeOwned>( &self, expression: &str, arg: Option<Value>, options: Option<WaitForFunctionOptions>, ) -> Result<R>
Poll expression until it evaluates to a truthy value, then return the
deserialized result. Mirrors Playwright’s page.waitForFunction.
expression is wrapped as (arg) => { return (<expression>); } (the
same form as Page::evaluate). A value is considered truthy unless it
is null, false, 0, or "". On timeout (default 30s) this returns
Error::Timeout. Polls every polling_interval ms (default 100).
Sourcepub async fn eval_on_selector<R: DeserializeOwned>(
&self,
selector: &str,
expression: &str,
) -> Result<R>
pub async fn eval_on_selector<R: DeserializeOwned>( &self, selector: &str, expression: &str, ) -> Result<R>
Evaluate expression against the first element matching selector.
Sourcepub async fn eval_on_selector_all<R: DeserializeOwned>(
&self,
selector: &str,
expression: &str,
) -> Result<Vec<R>>
pub async fn eval_on_selector_all<R: DeserializeOwned>( &self, selector: &str, expression: &str, ) -> Result<Vec<R>>
Evaluate expression against all elements matching selector.
pub async fn set_viewport_size(&self, viewport: Viewport) -> Result<()>
pub async fn screenshot( &self, opts: Option<ScreenshotOptions>, ) -> Result<Vec<u8>>
Sourcepub async fn add_script_tag(
&self,
content: Option<&str>,
url: Option<&str>,
) -> Result<()>
pub async fn add_script_tag( &self, content: Option<&str>, url: Option<&str>, ) -> Result<()>
Inject a <script> tag into the page (inline content and/or url).
Sourcepub async fn add_style_tag(&self, content: &str) -> Result<()>
pub async fn add_style_tag(&self, content: &str) -> Result<()>
Inject a <style> tag into the page.
Sourcepub async fn set_cache_disabled(&self, disabled: bool) -> Result<()>
pub async fn set_cache_disabled(&self, disabled: bool) -> Result<()>
Enable/disable the HTTP cache for this page.
Sourcepub async fn bring_to_front(&self) -> Result<()>
pub async fn bring_to_front(&self) -> Result<()>
Bring the page to the front (focus).
Sourcepub async fn set_geolocation(
&self,
geolocation: Option<(f64, f64)>,
) -> Result<()>
pub async fn set_geolocation( &self, geolocation: Option<(f64, f64)>, ) -> Result<()>
Override geolocation (latitude, longitude) (or clear with None).
Requires a granted geolocation permission.
Sourcepub fn request(&self) -> APIRequestContext
pub fn request(&self) -> APIRequestContext
Return a standalone HTTP client (APIRequestContext) tied to this
page. The client shares no state with the browser tab — it is a direct
HTTP client useful for API testing.
Note: the page does not retain its extra_http_headers in Rust (they
are applied directly to CDP), so the returned context starts with an
empty default header set. Use [BrowserContext::request] to seed
defaults from the context.
pub async fn set_extra_http_headers(&self, headers: Headers) -> Result<()>
pub async fn add_init_script(&self, script: &str) -> Result<()>
Sourcepub async fn expose_function<F, Fut>(
&self,
name: &str,
callback: F,
) -> Result<()>
pub async fn expose_function<F, Fut>( &self, name: &str, callback: F, ) -> Result<()>
Expose a Rust function to the page as window[name].
After this returns, page JS can call await window.<name>(...args) and
receive the Rust callback’s return value (serialized as JSON). Mirrors
Playwright’s page.exposeFunction.
The callback receives the JS arguments as a Vec<serde_json::Value>
and returns a serde_json::Value. If the callback panics or its result
fails to serialize, the JS promise resolves with
{ "__error": "<message>" } rather than rejecting.
§Mechanism
A CDP binding is registered under the internal name __pwcdpInvoke_<name>
via Runtime.addBinding. A JS wrapper turns window[name] into a
Promise-returning function that forwards { id, args } to that binding
(as a JSON string). A per-registration listener handles
Runtime.bindingCalled, invokes the callback on its own task, and
resolves the Promise by evaluating against the pending-callback map.
The wrapper is installed for future documents via
Page.addScriptToEvaluateOnNewDocument and once in the current context.
Bindings are per-execution-context and reset on navigation: the wrapper
is re-installed on every new document, but Runtime.addBinding is only
re-asserted lazily if needed (it persists across same-origin navigations
on a live page session; call expose_function again after a cross-origin
navigation if the binding goes missing).
pub fn locator(&self, selector: impl Into<String>) -> Locator
Sourcepub fn frame_locator(&self, selector: impl Into<String>) -> FrameLocator
pub fn frame_locator(&self, selector: impl Into<String>) -> FrameLocator
Return a FrameLocator scoped to the same-origin <iframe> matched
by selector. Element queries on the returned locator resolve inside
the iframe’s contentDocument.
Same-origin only. Cross-origin iframes cannot be reached from the
page’s main world; their contentDocument reads as null, and queries
against them will report zero matches. srcdoc iframes and same-origin
src iframes are supported.
pub fn get_by_text(&self, text: &str, _exact: bool) -> Locator
pub fn get_by_label(&self, text: &str) -> Locator
pub fn get_by_placeholder(&self, text: &str) -> Locator
pub fn get_by_alt_text(&self, text: &str) -> Locator
pub fn get_by_title(&self, text: &str) -> Locator
pub fn get_by_test_id(&self, text: &str) -> Locator
pub fn get_by_role( &self, role: AriaRole, opts: Option<GetByRoleOptions>, ) -> Locator
Sourcepub async fn query_selector(
&self,
selector: &str,
) -> Result<Option<ElementHandle>>
pub async fn query_selector( &self, selector: &str, ) -> Result<Option<ElementHandle>>
The first element matching selector, if any.
Sourcepub async fn query_selector_all(
&self,
selector: &str,
) -> Result<Vec<ElementHandle>>
pub async fn query_selector_all( &self, selector: &str, ) -> Result<Vec<ElementHandle>>
All elements matching selector.
pub fn keyboard(&self) -> Keyboard
pub fn mouse(&self) -> Mouse
pub fn touchscreen(&self) -> Touchscreen
Sourcepub fn video(&self) -> Video
pub fn video(&self) -> Video
The page video capture handle, mirroring Playwright’s page.video().
If a video output path was configured for the page, it is pre-recorded on
the handle (via Video::with_path); otherwise the handle starts with
no path and one can be supplied at Video::start.
Sourcepub fn accessibility(&self) -> Accessibility
pub fn accessibility(&self) -> Accessibility
The page accessibility-tree handle, mirroring Playwright’s
page.accessibility().
Sourcepub fn coverage(&self) -> Coverage
pub fn coverage(&self) -> Coverage
The page code-coverage handle, mirroring Playwright’s
page.coverage().
Sourcepub async fn web_storage(&self) -> WebStorage
pub async fn web_storage(&self) -> WebStorage
The page’s localStorage for its current security origin, mirroring
Playwright’s page.evaluate(() => localStorage)-backed access but
speaking CDP’s DOMStorage domain directly.
The origin is derived from the current location.href (scheme://host
with port). Returns a best-effort handle; if the URL has no parseable
origin (e.g. about:blank), the empty string is used as the origin.
Sourcepub async fn local_storage(&self) -> WebStorage
pub async fn local_storage(&self) -> WebStorage
The page’s localStorage for its current security origin.
Sourcepub async fn session_storage(&self) -> WebStorage
pub async fn session_storage(&self) -> WebStorage
The page’s sessionStorage for its current security origin.
pub fn main_frame(&self) -> Frame
Sourcepub async fn frames(&self) -> Result<Vec<Frame>>
pub async fn frames(&self) -> Result<Vec<Frame>>
All frames in the page (refreshed from the browser).
pub fn on_console<F, Fut>(&self, handler: F)
Sourcepub fn on_load<F, Fut>(&self, handler: F)
pub fn on_load<F, Fut>(&self, handler: F)
Register a handler invoked when the page fires its load event
(Page.loadEventFired), mirroring Playwright’s page.on('load').
Sourcepub fn on_crash<F, Fut>(&self, handler: F)
pub fn on_crash<F, Fut>(&self, handler: F)
Register a handler invoked when the page crashes (Inspector.targetCrashed),
mirroring Playwright’s page.on('crash').
Sourcepub fn on_frameattached<F, Fut>(&self, handler: F)
pub fn on_frameattached<F, Fut>(&self, handler: F)
Register a handler invoked when a frame is attached to the page
(Page.frameAttached), mirroring Playwright’s page.on('frameattached').
Sourcepub fn on_framedetached<F, Fut>(&self, handler: F)
pub fn on_framedetached<F, Fut>(&self, handler: F)
Register a handler invoked when a frame is detached from the page
(Page.frameDetached), mirroring Playwright’s page.on('framedetached').
Register a handler invoked when a frame is navigated to a new URL
(Page.frameNavigated), mirroring Playwright’s page.on('framenavigated').
pub fn on_dialog<F, Fut>(&self, handler: F)
Sourcepub fn on_request<F, Fut>(&self, handler: F)
pub fn on_request<F, Fut>(&self, handler: F)
Register a handler invoked for each network request sent.
Sourcepub async fn expect_request(
&self,
url_predicate: &str,
timeout: Option<Duration>,
) -> Result<Request>
pub async fn expect_request( &self, url_predicate: &str, timeout: Option<Duration>, ) -> Result<Request>
Wait for a network request whose URL contains url_predicate, returning
it. Times out after timeout (default 30s) with Error::Timeout.
The matcher is a plain substring test against the request URL
(str::contains), not a regex or glob — keep predicates literal.
A one-shot handler is registered with on_request;
it sends the first matching event over a tokio::sync::oneshot channel
and then drains its sender to None, so subsequent events are no-ops.
The handler is not removed from the handler list after it fires — it
simply has nothing to send — so it is idempotent and harmless to leave
in place (one extra closure in a Vec, no side effects).
Typical use races the wait against the action that triggers the request:
let button = page.locator("button#submit");
let (req, _) = tokio::join!(
page.expect_request("/api/login", Some(Duration::from_secs(5))),
button.click(None),
);
let req = req.unwrap();
assert!(req.url().contains("/api/login"));Sourcepub fn on_response<F, Fut>(&self, handler: F)
pub fn on_response<F, Fut>(&self, handler: F)
Register a handler invoked for each network response received.
Sourcepub async fn expect_response(
&self,
url_predicate: &str,
timeout: Option<Duration>,
) -> Result<Response>
pub async fn expect_response( &self, url_predicate: &str, timeout: Option<Duration>, ) -> Result<Response>
Wait for a network response whose URL contains url_predicate, returning
it. Times out after timeout (default 30s) with Error::Timeout.
The matcher is a plain substring test against the response URL
(str::contains), not a regex or glob — keep predicates literal.
A one-shot handler is registered with on_response;
it sends the first matching event over a tokio::sync::oneshot channel
and then drains its sender to None, so subsequent events are no-ops.
The handler is not removed from the handler list after it fires — it
simply has nothing to send — so it is idempotent and harmless to leave
in place (one extra closure in a Vec, no side effects).
Typical use races the wait against the navigation that triggers it:
let (resp, _) = tokio::join!(
page.expect_response("127.0.0.1", Some(Duration::from_secs(5))),
page.goto(url, None),
);
assert_eq!(resp.unwrap().status(), 200);Sourcepub async fn expect_event(
&self,
event_name: &str,
timeout: Option<Duration>,
) -> Result<Value>
pub async fn expect_event( &self, event_name: &str, timeout: Option<Duration>, ) -> Result<Value>
Wait for the next CDP event whose method equals event_name, returning
its params. Times out after timeout (default 30s) with
Error::Timeout.
Subscribes to the page session’s event stream, so it only sees events
emitted after this call — race it against the triggering action with
tokio::join!.
Example: wait for the page’s load event during navigation.
let (params, _) = tokio::join!(
page.expect_event("Page.loadEventFired", Some(Duration::from_secs(5))),
page.goto(url, None),
);
let _params = params.unwrap();Sourcepub fn on_requestfailed<F, Fut>(&self, handler: F)
pub fn on_requestfailed<F, Fut>(&self, handler: F)
Register a handler invoked when a network request fails.
Sourcepub fn on_pageerror<F, Fut>(&self, handler: F)
pub fn on_pageerror<F, Fut>(&self, handler: F)
Register a handler invoked when an uncaught page error occurs.
Sourcepub fn on_websocket<F, Fut>(&self, handler: F)
pub fn on_websocket<F, Fut>(&self, handler: F)
Register a handler invoked for each new WebSocket connection, mirroring
Playwright’s page.on('websocket').
Capture is always on: the page’s WebSocketRegistry subscribes to the
session in Page::attach (before Network.enable), so every
Network.webSocket* event is already being accumulated into a
WebSocket handle. This method registers against the registry’s
created-connection bus and invokes handler for each newly-created
connection. Connections created before this call are not replayed —
register the handler early (before the page opens the socket) to observe
every one.
Sourcepub fn on_requestfinished<F, Fut>(&self, handler: F)
pub fn on_requestfinished<F, Fut>(&self, handler: F)
Register a handler invoked when a network request finishes loading.
Sourcepub fn on_download<F, Fut>(&self, handler: F)
pub fn on_download<F, Fut>(&self, handler: F)
Register a handler invoked for each file download (Page.downloadWillBegin).
On first registration, downloads are routed to a per-page temp directory
via Page.setDownloadBehavior allow. Progress events update the
download’s shared state so Download::path / Download::save_as
can await completion.
Sourcepub async fn expect_download(
&self,
url_predicate: &str,
timeout: Option<Duration>,
) -> Result<Download>
pub async fn expect_download( &self, url_predicate: &str, timeout: Option<Duration>, ) -> Result<Download>
Wait for a download whose URL contains url_predicate, returning it.
Times out after timeout (default 30s) with Error::Timeout.
The matcher is a plain substring test against the download URL
(str::contains), not a regex or glob — keep predicates literal.
A one-shot handler is registered with on_download;
it sends the first matching event over a tokio::sync::oneshot channel
and then drains its sender to None, so subsequent events are no-ops.
The handler is not removed from the handler list after it fires — it
simply has nothing to send — so it is idempotent and harmless to leave
in place (one extra closure in a Vec, no side effects).
Note that the first on_download registration on a page lazily wires up
Page.setDownloadBehavior, so this call implicitly opts the page into
download routing to a temp dir.
Typical use races the wait against the click that triggers the download:
let link = page.locator("a#download");
let (dl, _) = tokio::join!(
page.expect_download("/report.pdf", Some(Duration::from_secs(5))),
link.click(None),
);
let dl = dl.unwrap();
assert!(dl.url().contains("/report.pdf"));Sourcepub async fn expect_console_message(
&self,
text_predicate: &str,
timeout: Option<Duration>,
) -> Result<ConsoleMessage>
pub async fn expect_console_message( &self, text_predicate: &str, timeout: Option<Duration>, ) -> Result<ConsoleMessage>
Wait for a console message whose text contains text_predicate,
returning it. Times out after timeout (default 30s) with
Error::Timeout.
The matcher is a plain substring test against the console message text
(ConsoleMessage::text, str::contains), not a regex or glob — keep
predicates literal.
A one-shot handler is registered with on_console;
it sends the first matching event over a tokio::sync::oneshot channel
and then drains its sender to None, so subsequent events are no-ops.
The handler task keeps running for the life of the page (one extra
spawned task, no side effects), mirroring the oneshot pattern used by
the other expect_* helpers.
Typical use races the wait against the script that logs the message:
let (msg, _) = tokio::join!(
page.expect_console_message("hello", Some(Duration::from_secs(5))),
page.evaluate::<()>("console.log('hello world')"),
);
assert!(msg.unwrap().text().contains("hello"));Sourcepub async fn expect_popup(&self, timeout: Option<Duration>) -> Result<Page>
pub async fn expect_popup(&self, timeout: Option<Duration>) -> Result<Page>
Wait for a popup (window.open) opened by this page, returning it as a
new Page. Times out after timeout (default 30s) with
Error::Timeout.
§Implementation (polling-based)
A popup (window.open) is a new top-level page target rather than a
child of this page’s target, so child-target auto-attach does not surface
it (and Target.targetCreated does not fire for popups on stock Chrome
in this setup, while Target.getTargets omits openerId). This helper
therefore registers a one-shot handler with
on_popup, which polls Target.getTargets and treats
the first new type == "page" target in this page’s browser context as
the popup. See on_popup for the full limitations.
The popup Page is built with an empty init-script set and this
page’s default timeout; per-context defaults (extra headers, user
agent, viewport) are not re-applied, since Page does not expose them
as raw values. This is sufficient for typical popup-driving flows
(interact with the popup, then close it).
Typical use races the wait against the script that opens the popup:
let (popup, _) = tokio::join!(
page.expect_popup(Some(Duration::from_secs(5))),
page.evaluate::<()>("window.open('about:blank')"),
);
let _popup = popup.unwrap();Sourcepub async fn on_popup<F, Fut>(&self, handler: F)
pub async fn on_popup<F, Fut>(&self, handler: F)
Register a handler invoked when this page opens a popup (window.open),
mirroring Playwright’s page.on('popup').
§Implementation (polling, not event-driven)
A popup is a brand-new top-level page target, not a child of this
page’s target, so this page session’s Target.setAutoAttach does not
surface it (and, empirically, Target.setDiscoverTargets /
Target.targetCreated do not fire for window.open popups on stock
Chrome in this setup). Target.getTargets also omits openerId, so
strict opener attribution is not available.
Instead, on first registration a background task polls Target.getTargets
on a short interval. Any type == "page" target that shares this page’s
browserContextId, is not this page itself, and has not already been
delivered is treated as the popup: the task attaches to it
(Target.attachToTarget { flatten }), builds a full Page via
Page::attach, and hands it to every registered handler. A delivered
set (rather than a registration-time baseline) is used because a baseline
diff races with the trigger under tokio::join! — the popup can appear
before the snapshot completes.
Limitations (documented honestly): attribution is “any page target in this browser context that isn’t this page,” not opener-precise, so it can misattribute if another page already exists or is opened concurrently in the same context. Each distinct popup target fires the handlers once.
The popup Page is built with an empty init-scripts set and this
page’s default timeout; context-level defaults (extra headers, user
agent, viewport) are not re-applied (see expect_popup).
Sourcepub async fn on_filechooser<F, Fut>(&self, handler: F)
pub async fn on_filechooser<F, Fut>(&self, handler: F)
Register a handler invoked when a file-chooser dialog opens
(Page.fileChooserOpened), mirroring Playwright’s page.on('filechooser').
On first registration, chooser interception is enabled once via
Page.setInterceptFileChooserDialog { enabled: true } (must be in place
before the action that opens the chooser). The handler may inspect the
FileChooser and call FileChooser::set_files to accept it.
Sourcepub async fn on_worker<F, Fut>(&self, handler: F)
pub async fn on_worker<F, Fut>(&self, handler: F)
Register a handler invoked when a web/service/shared worker is created,
mirroring Playwright’s page.on('worker').
On first registration, flattened auto-attach is enabled on the page
session (Target.setAutoAttach { flatten: true }) so workers show up as
child sessions on the same connection. Each child target of type
worker/service_worker/shared_worker surfaces via
Target.attachedToTarget and is wrapped in a Worker.
Subscribe before enabling so the first attachedToTarget is never missed.
pub async fn close(&self) -> Result<()>
Sourcepub async fn route<F, Fut>(&self, pattern: &str, handler: F) -> Result<()>
pub async fn route<F, Fut>(&self, pattern: &str, handler: F) -> Result<()>
Intercept requests matching pattern (a URL glob, *-wildcarded) and
route them to handler. The handler must continue/fulfill/abort the
Route (an unhandled route stalls the request).
Sourcepub async fn unroute(&self, pattern: &str) -> Result<()>
pub async fn unroute(&self, pattern: &str) -> Result<()>
Remove the first route registered with exactly pattern.
Sourcepub async fn unroute_all(&self) -> Result<()>
pub async fn unroute_all(&self) -> Result<()>
Remove all routes.
pub async fn pdf(&self, opts: Option<PdfOptions>) -> Result<Vec<u8>>
Sourcepub async fn aria_snapshot(&self) -> Result<String>
pub async fn aria_snapshot(&self) -> Result<String>
Capture an aria-snapshot (Playwright’s YAML-ish accessibility-tree format) of the whole page.
Fetches the full accessibility tree via Accessibility.getFullAXTree
and serializes it with [crate::aria_snapshot]. The Accessibility
domain is enabled best-effort first (some Chrome builds require it).