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.

//! The `Input` domain.
//!
//! Method names for the `Input` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).

/// Dispatches a drag event into the page.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `type`: string
/// - `x`: number
/// - `y`: number
/// - `data`: DragData
/// - `modifiers`: integer (optional)
pub const DISPATCH_DRAG_EVENT: &str = "Input.dispatchDragEvent";

/// Dispatches a key event to the page.
///
/// Parameters:
/// - `type`: string
/// - `modifiers`: integer (optional)
/// - `timestamp`: TimeSinceEpoch (optional)
/// - `text`: string (optional)
/// - `unmodifiedText`: string (optional)
/// - `keyIdentifier`: string (optional)
/// - `code`: string (optional)
/// - `key`: string (optional)
/// - `windowsVirtualKeyCode`: integer (optional)
/// - `nativeVirtualKeyCode`: integer (optional)
/// - `autoRepeat`: boolean (optional)
/// - `isKeypad`: boolean (optional)
/// - `isSystemKey`: boolean (optional)
/// - `location`: integer (optional)
/// - `commands`: array (optional)
pub const DISPATCH_KEY_EVENT: &str = "Input.dispatchKeyEvent";

/// This method emulates inserting text that doesn't come from a key press,
/// for example an emoji keyboard or an IME.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `text`: string
pub const INSERT_TEXT: &str = "Input.insertText";

/// This method sets the current candidate text for IME. Use
/// imeCommitComposition to commit the final text. Use imeSetComposition with
/// empty string as text to cancel composition.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `text`: string
/// - `selectionStart`: integer
/// - `selectionEnd`: integer
/// - `replacementStart`: integer (optional)
/// - `replacementEnd`: integer (optional)
pub const IME_SET_COMPOSITION: &str = "Input.imeSetComposition";

/// Dispatches a mouse event to the page.
///
/// Parameters:
/// - `type`: string
/// - `x`: number
/// - `y`: number
/// - `modifiers`: integer (optional)
/// - `timestamp`: TimeSinceEpoch (optional)
/// - `button`: MouseButton (optional)
/// - `buttons`: integer (optional)
/// - `clickCount`: integer (optional)
/// - `force`: number (optional)
/// - `tangentialPressure`: number (optional)
/// - `tiltX`: number (optional)
/// - `tiltY`: number (optional)
/// - `twist`: integer (optional)
/// - `deltaX`: number (optional)
/// - `deltaY`: number (optional)
/// - `pointerType`: string (optional)
pub const DISPATCH_MOUSE_EVENT: &str = "Input.dispatchMouseEvent";

/// Dispatches a touch event to the page.
///
/// Parameters:
/// - `type`: string
/// - `touchPoints`: array
/// - `modifiers`: integer (optional)
/// - `timestamp`: TimeSinceEpoch (optional)
pub const DISPATCH_TOUCH_EVENT: &str = "Input.dispatchTouchEvent";

/// Cancels any active dragging in the page.
pub const CANCEL_DRAGGING: &str = "Input.cancelDragging";

/// Emulates touch event from the mouse event parameters.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `type`: string
/// - `x`: integer
/// - `y`: integer
/// - `button`: MouseButton
/// - `timestamp`: TimeSinceEpoch (optional)
/// - `deltaX`: number (optional)
/// - `deltaY`: number (optional)
/// - `modifiers`: integer (optional)
/// - `clickCount`: integer (optional)
pub const EMULATE_TOUCH_FROM_MOUSE_EVENT: &str = "Input.emulateTouchFromMouseEvent";

/// Ignores input events (useful while auditing page).
///
/// Parameters:
/// - `ignore`: boolean
pub const SET_IGNORE_INPUT_EVENTS: &str = "Input.setIgnoreInputEvents";

/// Prevents default drag and drop behavior and instead emits
/// `Input.dragIntercepted` events. Drag and drop behavior can be directly
/// controlled via `Input.dispatchDragEvent`.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `enabled`: boolean
pub const SET_INTERCEPT_DRAGS: &str = "Input.setInterceptDrags";

/// Synthesizes a pinch gesture over a time period by issuing appropriate
/// touch events.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `x`: number
/// - `y`: number
/// - `scaleFactor`: number
/// - `relativeSpeed`: integer (optional)
/// - `gestureSourceType`: GestureSourceType (optional)
pub const SYNTHESIZE_PINCH_GESTURE: &str = "Input.synthesizePinchGesture";

/// Synthesizes a scroll gesture over a time period by issuing appropriate
/// touch events.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `x`: number
/// - `y`: number
/// - `xDistance`: number (optional)
/// - `yDistance`: number (optional)
/// - `xOverscroll`: number (optional)
/// - `yOverscroll`: number (optional)
/// - `preventFling`: boolean (optional)
/// - `speed`: integer (optional)
/// - `gestureSourceType`: GestureSourceType (optional)
/// - `repeatCount`: integer (optional)
/// - `repeatDelayMs`: integer (optional)
/// - `interactionMarkerName`: string (optional)
pub const SYNTHESIZE_SCROLL_GESTURE: &str = "Input.synthesizeScrollGesture";

/// Synthesizes a tap gesture over a time period by issuing appropriate touch
/// events.
///
/// Experimental: may change without notice.
///
/// Parameters:
/// - `x`: number
/// - `y`: number
/// - `duration`: integer (optional)
/// - `tapCount`: integer (optional)
/// - `gestureSourceType`: GestureSourceType (optional)
pub const SYNTHESIZE_TAP_GESTURE: &str = "Input.synthesizeTapGesture";