feat(driver): add W3C actions helper and Driver.swipe_path

This commit is contained in:
2026-07-15 19:04:57 +08:00
parent ff91bd4f70
commit c25ccb491d
10 changed files with 189 additions and 0 deletions
+11
View File
@@ -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: