cdp-driver 0.3.0

Chrome DevTools Protocol client for AI agent browser control
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! This domain facilitates obtaining document snapshots with DOM, layout, and
//! style information.
//!
//! Method names for the `DOMSnapshot` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.

/// Disables DOM snapshot agent for the given page.
pub const DISABLE: &str = "DOMSnapshot.disable";

/// Enables DOM snapshot agent for the given page.
pub const ENABLE: &str = "DOMSnapshot.enable";

/// Returns a document snapshot, including the full DOM tree of the root node
/// (including iframes, template contents, and imported documents) in a
/// flattened array, as well as layout and white-listed computed style
/// information for the nodes. Shadow DOM in the returned DOM tree is
/// flattened.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `computedStyleWhitelist`: array
/// - `includeEventListeners`: boolean (optional)
/// - `includePaintOrder`: boolean (optional)
/// - `includeUserAgentShadowTree`: boolean (optional)
///
/// Returns: `domNodes`, `layoutTreeNodes`, `computedStyles`
pub const GET_SNAPSHOT: &str = "DOMSnapshot.getSnapshot";

/// Returns a document snapshot, including the full DOM tree of the root node
/// (including iframes, template contents, and imported documents) in a
/// flattened array, as well as layout and white-listed computed style
/// information for the nodes. Shadow DOM in the returned DOM tree is
/// flattened.
///
/// Parameters:
/// - `computedStyles`: array
/// - `includePaintOrder`: boolean (optional)
/// - `includeDOMRects`: boolean (optional)
/// - `includeBlendedBackgroundColors`: boolean (optional)
/// - `includeTextColorOpacities`: boolean (optional)
///
/// Returns: `documents`, `strings`
pub const CAPTURE_SNAPSHOT: &str = "DOMSnapshot.captureSnapshot";