MCPcopy Create free account
hub / github.com/aeroxy/chrome-devtools-cli / dispatch_mouse

Function dispatch_mouse

src/commands/input.rs:56–79  ·  view source on GitHub ↗
(
    client: &mut CdpClient,
    session_id: &str,
    event_type: &str,
    x: f64,
    y: f64,
    button: &str,
    click_count: u32,
)

Source from the content-addressed store, hash-verified

54}
55
56async fn dispatch_mouse(
57 client: &mut CdpClient,
58 session_id: &str,
59 event_type: &str,
60 x: f64,
61 y: f64,
62 button: &str,
63 click_count: u32,
64) -> Result<()> {
65 client
66 .send_to_target(
67 session_id,
68 "Input.dispatchMouseEvent",
69 json!({
70 "type": event_type,
71 "x": x,
72 "y": y,
73 "button": button,
74 "clickCount": click_count,
75 }),
76 )
77 .await?;
78 Ok(())
79}
80
81/// Click an element identified by CSS selector.
82pub async fn click(

Callers 2

click_atFunction · 0.85
hoverFunction · 0.85

Calls 1

send_to_targetMethod · 0.80

Tested by

no test coverage detected