pub struct InputClient { /* private fields */ }Expand description
Client for Input domain commands.
Implementations§
Source§impl InputClient
impl InputClient
Sourcepub async fn dispatch_drag_event(
&self,
params: DispatchDragEventParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn dispatch_drag_event( &self, params: DispatchDragEventParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Dispatches a drag event into the page.
Sourcepub async fn dispatch_key_event(
&self,
params: DispatchKeyEventParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn dispatch_key_event( &self, params: DispatchKeyEventParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Dispatches a key event to the page.
Sourcepub async fn insert_text(
&self,
params: InsertTextParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn insert_text( &self, params: InsertTextParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
This method emulates inserting text that doesn’t come from a key press, for example an emoji keyboard or an IME.
Sourcepub async fn ime_set_composition(
&self,
params: ImeSetCompositionParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn ime_set_composition( &self, params: ImeSetCompositionParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
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.
Sourcepub async fn dispatch_mouse_event(
&self,
params: DispatchMouseEventParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn dispatch_mouse_event( &self, params: DispatchMouseEventParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Dispatches a mouse event to the page.
Sourcepub async fn dispatch_touch_event(
&self,
params: DispatchTouchEventParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn dispatch_touch_event( &self, params: DispatchTouchEventParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Dispatches a touch event to the page.
Sourcepub async fn cancel_dragging(
&self,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn cancel_dragging( &self, session_id: Option<&str>, ) -> Result<Value, CdpError>
Cancels any active dragging in the page.
Sourcepub async fn emulate_touch_from_mouse_event(
&self,
params: EmulateTouchFromMouseEventParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn emulate_touch_from_mouse_event( &self, params: EmulateTouchFromMouseEventParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Emulates touch event from the mouse event parameters.
Sourcepub async fn set_ignore_input_events(
&self,
params: SetIgnoreInputEventsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_ignore_input_events( &self, params: SetIgnoreInputEventsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Ignores input events (useful while auditing page).
Sourcepub async fn set_intercept_drags(
&self,
params: SetInterceptDragsParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn set_intercept_drags( &self, params: SetInterceptDragsParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Prevents default drag and drop behavior and instead emits Input.dragIntercepted events.
Drag and drop behavior can be directly controlled via Input.dispatchDragEvent.
Sourcepub async fn synthesize_pinch_gesture(
&self,
params: SynthesizePinchGestureParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn synthesize_pinch_gesture( &self, params: SynthesizePinchGestureParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Synthesizes a pinch gesture over a time period by issuing appropriate touch events.
Sourcepub async fn synthesize_scroll_gesture(
&self,
params: SynthesizeScrollGestureParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn synthesize_scroll_gesture( &self, params: SynthesizeScrollGestureParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Synthesizes a scroll gesture over a time period by issuing appropriate touch events.
Sourcepub async fn synthesize_tap_gesture(
&self,
params: SynthesizeTapGestureParams,
session_id: Option<&str>,
) -> Result<Value, CdpError>
pub async fn synthesize_tap_gesture( &self, params: SynthesizeTapGestureParams, session_id: Option<&str>, ) -> Result<Value, CdpError>
Synthesizes a tap gesture over a time period by issuing appropriate touch events.