browser_commander/puppeteer/api/
touch_handle.rs1#![allow(clippy::all, missing_docs, unused_imports, non_snake_case)]
5
6use serde_json::Value;
7
8use super::*;
9use crate::puppeteer::bridge::{binary, remote_type, BridgeError, JsFunction, Remote};
10
11remote_type!(
12 TouchHandle
15);
16
17impl TouchHandle {
18 pub async fn r#move(&self, x: f64, y: f64) -> Result<(), BridgeError> {
24 self.remote.call("move", vec![Some(Value::from(x)), Some(Value::from(y))]).await
25 }
26
27 pub async fn end(&self) -> Result<(), BridgeError> {
33 self.remote.call("end", vec![]).await
34 }
35}