Inspector
Turn elements on the device screen into Astra Scout commands without typing selectors.
The inspector turns what you see on the device into Maestro commands, so you rarely need to type selectors by hand. It works on the connected device in the inspector column.
Generate a command from an element
- Connect a device, open a flow file in the editor and turn on Device → Inspect Elements (
Option+Cmd+I, or the inspect button under the mirror). - Move the pointer over the device screen. The element under the pointer is outlined.
- Right-click the element. A menu opens with a YAML preview of the most common commands:
tapOn,assertVisibleandscrollUntilVisible. - Open a command and pick an action:
| Action | Result |
|---|---|
| Insert into Editor | Adds the command to the open file. |
| Copy | Copies the YAML to the clipboard. |
Insert into Editor is disabled when no file is open in the editor. The menu also has Copy Selector, which copies only the selector.
Choose a different selector
The menu's Change Selector submenu lists every way to target the element, and the previews update when you pick one. Options are grouped as Element (the element itself) and Element Stack (for example childOf). Selector types include text, id, point (percentage or pixels), dimensions and index-based selectors.
More commands
- Selector Commands lists commands that take a selector, such as
assertNotVisible,doubleTapOn,longPressOn,extendedWaitUntilandcopyTextFrom. - All Commands groups the whole command catalog by category (Navigation, Assertions, Text, Timing & Sequences, Screenshots & Recordings, App State, Phone Settings, External Resources). All (Alphabetical) lists them in one sorted list.
Commands that cannot run on your device
Commands that the connected platform does not support are struck through in suggestions. See Supported platforms.
Element Hierarchy
Choose Device → Element Hierarchy (Option+Cmd+E) to show the element tree of the current screen in the navigator. Hover an element on the device screen, click to pick it, and right-click for its commands. Use Refresh to capture the screen again.
Slow inspector on an iPhone?
A locked iPhone makes the inspector very slow, and Astra Scout shows a banner when it sees the lock. Unlock the iPhone and set Auto-Lock to Never while testing. See Devices.