Double tap at the specified coordinates. Args: x: X coordinate. y: Y coordinate. device_id: Optional HDC device ID. delay: Delay in seconds after double tap. If None, uses configured default.
(
x: int, y: int, device_id: str | None = None, delay: float | None = None
)
| 103 | |
| 104 | |
| 105 | def double_tap( |
| 106 | x: int, y: int, device_id: str | None = None, delay: float | None = None |
| 107 | ) -> None: |
| 108 | """ |
| 109 | Double tap at the specified coordinates. |
| 110 | |
| 111 | Args: |
| 112 | x: X coordinate. |
| 113 | y: Y coordinate. |
| 114 | device_id: Optional HDC device ID. |
| 115 | delay: Delay in seconds after double tap. If None, uses configured default. |
| 116 | """ |
| 117 | if delay is None: |
| 118 | delay = TIMING_CONFIG.device.default_double_tap_delay |
| 119 | |
| 120 | hdc_prefix = _get_hdc_prefix(device_id) |
| 121 | |
| 122 | # HarmonyOS uses uitest uiInput doubleClick |
| 123 | _run_hdc_command( |
| 124 | hdc_prefix + ["shell", "uitest", "uiInput", "doubleClick", str(x), str(y)], |
| 125 | capture_output=True |
| 126 | ) |
| 127 | time.sleep(delay) |
| 128 | |
| 129 | |
| 130 | def long_press( |
nothing calls this directly
no test coverage detected