cdp-driver 0.5.0

Chrome DevTools Protocol (CDP) client for Rust: every command, event and type generated from the schema, with sessions, for browser automation and AI agents
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! This domain provides various functionality related to drawing atop the
//! inspected page.
//!
//! Method names for the `Overlay` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.

/// Disables domain notifications.
pub const DISABLE: &str = "Overlay.disable";

/// Enables domain notifications.
pub const ENABLE: &str = "Overlay.enable";

/// For testing.
///
/// Parameters:
/// - `nodeId`: DOM.NodeId
/// - `includeDistance`: boolean (optional)
/// - `includeStyle`: boolean (optional)
/// - `colorFormat`: ColorFormat (optional)
/// - `showAccessibilityInfo`: boolean (optional)
///
/// Returns: `highlight`
pub const GET_HIGHLIGHT_OBJECT_FOR_TEST: &str = "Overlay.getHighlightObjectForTest";

/// For Persistent Grid testing.
///
/// Parameters:
/// - `nodeIds`: array
///
/// Returns: `highlights`
pub const GET_GRID_HIGHLIGHT_OBJECTS_FOR_TEST: &str = "Overlay.getGridHighlightObjectsForTest";

/// For Source Order Viewer testing.
///
/// Parameters:
/// - `nodeId`: DOM.NodeId
///
/// Returns: `highlight`
pub const GET_SOURCE_ORDER_HIGHLIGHT_OBJECT_FOR_TEST: &str =
    "Overlay.getSourceOrderHighlightObjectForTest";

/// Hides any highlight.
pub const HIDE_HIGHLIGHT: &str = "Overlay.hideHighlight";

/// Highlights owner element of the frame with given id. Deprecated: Doesn't
/// work reliably and cannot be fixed due to process separation (the owner
/// node might be in a different process). Determine the owner node in the
/// client and use highlightNode.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `frameId`: Page.FrameId
/// - `contentColor`: DOM.RGBA (optional)
/// - `contentOutlineColor`: DOM.RGBA (optional)
pub const HIGHLIGHT_FRAME: &str = "Overlay.highlightFrame";

/// Highlights DOM node with given id or with the given JavaScript object
/// wrapper. Either nodeId or objectId must be specified.
///
/// Parameters:
/// - `highlightConfig`: HighlightConfig
/// - `nodeId`: DOM.NodeId (optional)
/// - `backendNodeId`: DOM.BackendNodeId (optional)
/// - `objectId`: Runtime.RemoteObjectId (optional)
/// - `selector`: string (optional)
pub const HIGHLIGHT_NODE: &str = "Overlay.highlightNode";

/// Highlights given quad. Coordinates are absolute with respect to the main
/// frame viewport.
///
/// Parameters:
/// - `quad`: DOM.Quad
/// - `color`: DOM.RGBA (optional)
/// - `outlineColor`: DOM.RGBA (optional)
pub const HIGHLIGHT_QUAD: &str = "Overlay.highlightQuad";

/// Highlights given rectangle. Coordinates are absolute with respect to the
/// main frame viewport. Issue: the method does not handle device pixel ratio
/// (DPR) correctly. The coordinates currently have to be adjusted by the
/// client if DPR is not 1 (see crbug.com/437807128).
///
/// Parameters:
/// - `x`: integer
/// - `y`: integer
/// - `width`: integer
/// - `height`: integer
/// - `color`: DOM.RGBA (optional)
/// - `outlineColor`: DOM.RGBA (optional)
pub const HIGHLIGHT_RECT: &str = "Overlay.highlightRect";

/// Highlights the source order of the children of the DOM node with given id
/// or with the given JavaScript object wrapper. Either nodeId or objectId
/// must be specified.
///
/// Parameters:
/// - `sourceOrderConfig`: SourceOrderConfig
/// - `nodeId`: DOM.NodeId (optional)
/// - `backendNodeId`: DOM.BackendNodeId (optional)
/// - `objectId`: Runtime.RemoteObjectId (optional)
pub const HIGHLIGHT_SOURCE_ORDER: &str = "Overlay.highlightSourceOrder";

/// Enters the 'inspect' mode. In this mode, elements that user is hovering
/// over are highlighted. Backend then generates 'inspectNodeRequested' event
/// upon element selection.
///
/// Parameters:
/// - `mode`: InspectMode
/// - `highlightConfig`: HighlightConfig (optional)
pub const SET_INSPECT_MODE: &str = "Overlay.setInspectMode";

/// Highlights owner element of all frames detected to be ads.
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_AD_HIGHLIGHTS: &str = "Overlay.setShowAdHighlights";

/// `Overlay.setPausedInDebuggerMessage`
///
/// Parameters:
/// - `message`: string (optional)
pub const SET_PAUSED_IN_DEBUGGER_MESSAGE: &str = "Overlay.setPausedInDebuggerMessage";

/// Requests that backend shows debug borders on layers
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_DEBUG_BORDERS: &str = "Overlay.setShowDebugBorders";

/// Requests that backend shows the FPS counter
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_FPS_COUNTER: &str = "Overlay.setShowFPSCounter";

/// Highlight multiple elements with the CSS Grid overlay.
///
/// Parameters:
/// - `gridNodeHighlightConfigs`: array
pub const SET_SHOW_GRID_OVERLAYS: &str = "Overlay.setShowGridOverlays";

/// `Overlay.setShowFlexOverlays`
///
/// Parameters:
/// - `flexNodeHighlightConfigs`: array
pub const SET_SHOW_FLEX_OVERLAYS: &str = "Overlay.setShowFlexOverlays";

/// `Overlay.setShowScrollSnapOverlays`
///
/// Parameters:
/// - `scrollSnapHighlightConfigs`: array
pub const SET_SHOW_SCROLL_SNAP_OVERLAYS: &str = "Overlay.setShowScrollSnapOverlays";

/// `Overlay.setShowContainerQueryOverlays`
///
/// Parameters:
/// - `containerQueryHighlightConfigs`: array
pub const SET_SHOW_CONTAINER_QUERY_OVERLAYS: &str = "Overlay.setShowContainerQueryOverlays";

/// `Overlay.setShowInspectedElementAnchor`
///
/// Parameters:
/// - `inspectedElementAnchorConfig`: InspectedElementAnchorConfig
pub const SET_SHOW_INSPECTED_ELEMENT_ANCHOR: &str = "Overlay.setShowInspectedElementAnchor";

/// Requests that backend shows paint rectangles
///
/// Parameters:
/// - `result`: boolean
pub const SET_SHOW_PAINT_RECTS: &str = "Overlay.setShowPaintRects";

/// Requests that backend shows layout shift regions
///
/// Parameters:
/// - `result`: boolean
pub const SET_SHOW_LAYOUT_SHIFT_REGIONS: &str = "Overlay.setShowLayoutShiftRegions";

/// Requests that backend shows scroll bottleneck rects
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_SCROLL_BOTTLENECK_RECTS: &str = "Overlay.setShowScrollBottleneckRects";

/// Deprecated, no longer has any effect.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_HIT_TEST_BORDERS: &str = "Overlay.setShowHitTestBorders";

/// Deprecated, no longer has any effect.
///
/// Deprecated in the protocol.
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_WEB_VITALS: &str = "Overlay.setShowWebVitals";

/// Paints viewport size upon main frame resize.
///
/// Parameters:
/// - `show`: boolean
pub const SET_SHOW_VIEWPORT_SIZE_ON_RESIZE: &str = "Overlay.setShowViewportSizeOnResize";

/// Add a dual screen device hinge
///
/// Parameters:
/// - `hingeConfig`: HingeConfig (optional)
pub const SET_SHOW_HINGE: &str = "Overlay.setShowHinge";

/// Add a display cutout overlay.
///
/// Parameters:
/// - `displayCutoutConfig`: DisplayCutoutConfig (optional)
pub const SET_SHOW_DISPLAY_CUTOUT: &str = "Overlay.setShowDisplayCutout";

/// Show elements in isolation mode with overlays.
///
/// Parameters:
/// - `isolatedElementHighlightConfigs`: array
pub const SET_SHOW_ISOLATED_ELEMENTS: &str = "Overlay.setShowIsolatedElements";

/// Show Window Controls Overlay for PWA
///
/// Parameters:
/// - `windowControlsOverlayConfig`: WindowControlsOverlayConfig (optional)
pub const SET_SHOW_WINDOW_CONTROLS_OVERLAY: &str = "Overlay.setShowWindowControlsOverlay";