(
client: &mut CdpClient,
session_id: &str,
event_type: &str,
x: f64,
y: f64,
button: &str,
click_count: u32,
)
| 54 | } |
| 55 | |
| 56 | async 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. |
| 82 | pub async fn click( |
no test coverage detected