feat(driver): add W3C actions helper and Driver.swipe_path
This commit is contained in:
@@ -129,6 +129,17 @@ class AndroidDriver(Driver):
|
||||
except Exception as exc:
|
||||
raise DriverError("text input failed") from exc
|
||||
|
||||
def swipe_path(
|
||||
self, waypoints: list[tuple[float, float]], duration_ms: int
|
||||
) -> None:
|
||||
from driver._w3c_actions import build_swipe_actions, perform_actions
|
||||
|
||||
client = self._require_client()
|
||||
try:
|
||||
perform_actions(client, build_swipe_actions(waypoints, duration_ms))
|
||||
except Exception as exc:
|
||||
raise DriverError("swipe_path failed") from exc
|
||||
|
||||
def launch(self, app_id: str) -> None:
|
||||
client = self._require_client()
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user