Selectors
Use find to locate elements by semantic attributes instead of raw refs.
Tips:
- Use
find ... wait <timeoutMs>to wait for UI to appear. - Combine with scoped snapshots using
snapshot -s "<label>"for speed. - [Android] If a matched node is not hittable, agent-device will click/focus the nearest hittable ancestor.
Response shape (click)
find "<query>" click --json returns deterministic matched-target metadata derived from the resolved snapshot node:
ref— snapshot ref of the matched (or nearest hittable ancestor) element.locator— find strategy used (any,text,label,value,role,id).query— the search term as provided.x,y— tap coordinates derived from the matched element's rect center.
