Handle long press action.
(self, action: dict, width: int, height: int)
| 211 | return ActionResult(True, False) |
| 212 | |
| 213 | def _handle_long_press(self, action: dict, width: int, height: int) -> ActionResult: |
| 214 | """Handle long press action.""" |
| 215 | element = action.get("element") |
| 216 | if not element: |
| 217 | return ActionResult(False, False, "No element coordinates") |
| 218 | |
| 219 | x, y = self._convert_relative_to_absolute(element, width, height) |
| 220 | device_factory = get_device_factory() |
| 221 | device_factory.long_press(x, y, device_id=self.device_id) |
| 222 | return ActionResult(True, False) |
| 223 | |
| 224 | def _handle_wait(self, action: dict, width: int, height: int) -> ActionResult: |
| 225 | """Handle wait action.""" |
nothing calls this directly
no test coverage detected