device_locators_for
Generate ranked locator strategies for a UI element on Android. Pass either coordinates (x, y — picks the smallest containing element) OR a text/contentDesc/resourceId to look up. Returns the same priority-ordered list the UI inspector shows: id, text, content-desc, accessibility selector, XPath. Use these to fill page-object selectors when generating test scripts so you do not have to re-derive them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Physical x coordinate of the element (use with y) | |
| y | No | Physical y coordinate of the element (use with x) | |
| text | No | Lookup by visible text (matches text or content-desc) | |
| udid | Yes | Device serial number (UDID) | |
| resourceId | No | Lookup by resource-id | |
| contentDesc | No | Lookup by content-desc / accessibility label |