Execute UI Action
execute_ui_actionExecute UI actions like tap, type, or scroll on mobile app elements with selector fallback. Automates UI interactions and logs them for test script generation.
Instructions
Dispatch a UI action (tap, type, scroll, etc.) on a target element. Logs the interaction to session memory for later test synthesis. Selector priority: id > accessibilityLabel > text. Scroll/swipe are not supported during a live recording session — use start_flow for complex sequences.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The UI action to perform. "type" taps the element first then types — fails on iOS secure text fields where the tap can drop focus. Use "inputText" instead to type into the already-focused field with no preceding tap (matches Maestro's native `inputText` YAML command, the only reliable path for secure password fields). For inputText, the element field is optional and ignored. | |
| element | No | Target UI element to act on. Required for tap/type/scroll/swipe/etc. Ignored when action is "inputText" (typing happens against whatever field currently holds focus). | |
| sessionId | Yes | Active session ID | |
| textInput | No | Text to type (required when action is "type" or "inputText") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | Human-readable result message | |
| success | Yes | Whether the action was dispatched successfully |