Skip to content

device_find

Find a UI element by visible text and optionally interact with it. Use action=“click” to tap, omit for find-only. Returns element ref for use with device_press/device_fill. Requires an open session (call device_snapshot action=open first). If AMBIGUOUS_MATCH error occurs (common text like “Next”, “Done”), use device_snapshot to get the accessibility tree and device_press with the specific @ref instead.

NameTypeRequiredDefaultConstraintsDescription
textstringYesVisible text, accessibility label, or identifier to find
actionstringNoAction to perform: “click” to tap, omit for search-only
device_find(text: <string>)