App Inspection
App Inspection allows you to find element locators directly during a live testing session. This is useful when building automated tests — you can identify the exact locators (XPath, Accessibility ID, etc.) for any element on the screen.
Accessing App Inspection
To open App Inspection during a live session:
- Click the DevTools icon in the toolbar
- Select the Inspector tab
Click to Inspect
Click on any element on the live device screen to immediately see its locators. The inspection panel will display all available locator strategies for the selected element.
Search the Element Tree
Use the search bar at the top of the inspection panel to find elements by text content or attribute value. This is helpful when you need to locate elements that are off-screen or deeply nested in the view hierarchy.
Available Locators
When you select an element, the following locator strategies are displayed:
| Locator | Description |
|---|---|
| XPath | Full XPath expression to uniquely identify the element in the view hierarchy. |
| Accessibility ID | The accessibility identifier set by the app developer. Preferred locator for stable tests. |
| Class Name | The UI element class (e.g., android.widget.Button, XCUIElementTypeButton). |
| ID | The resource ID of the element (Android) or the element name (iOS). |
Copy Locators
Click the copy icon next to any locator to copy it to your clipboard. You can then paste it directly into your automated test code.