find_element
Locate UI elements by text, resource ID, or type without interacting, returning center, size, and state details for assertions and verifications on Android and iOS devices.
Instructions
Find UI elements by text, resource_id, or type without interacting. Returns matching element details (center, size, state flags). Useful for assertions and verifications.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "find_element"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | No | Target platform. Inferred if omitted. | |
| device_id | No | Device ID. Omit for the connected device. | |
| text_exact | No | Find element whose text matches exactly | |
| max_results | No | Maximum number of matching elements to return. Default: 10 | |
| max_scrolls | No | Maximum number of scrolls when scroll_to_find is true. Default: 5 | |
| resource_id | No | Find element whose resource_id contains this substring (case-insensitive) | |
| text_contains | No | Find element whose text contains this substring (case-insensitive) | |
| type_contains | No | Filter by element type containing this substring (case-insensitive) | |
| scroll_to_find | No | If true, scroll iteratively to find the element. Default: false | |
| scroll_direction | No | Direction to scroll the content when scroll_to_find is true. Default: down |