Get the handler method for an action.
(self, action_name: str)
| 88 | ) |
| 89 | |
| 90 | def _get_handler(self, action_name: str) -> Callable | None: |
| 91 | """Get the handler method for an action.""" |
| 92 | handlers = { |
| 93 | "Launch": self._handle_launch, |
| 94 | "Tap": self._handle_tap, |
| 95 | "Type": self._handle_type, |
| 96 | "Type_Name": self._handle_type, |
| 97 | "Swipe": self._handle_swipe, |
| 98 | "Back": self._handle_back, |
| 99 | "Home": self._handle_home, |
| 100 | "Double Tap": self._handle_double_tap, |
| 101 | "Long Press": self._handle_long_press, |
| 102 | "Wait": self._handle_wait, |
| 103 | "Take_over": self._handle_takeover, |
| 104 | "Note": self._handle_note, |
| 105 | "Call_API": self._handle_call_api, |
| 106 | "Interact": self._handle_interact, |
| 107 | } |
| 108 | return handlers.get(action_name) |
| 109 | |
| 110 | def _convert_relative_to_absolute( |
| 111 | self, element: list[int], screen_width: int, screen_height: int |