Inspect and find locators
Native Inspector allows you to look at your app’s elements, and get basic information about them. It supports native inspectors for Android and iOS just from your browser.
To start inspecting your application:
- Take the device you need.
- Open the Native panel in Pane.
- Select the Native Inspector tab on the side panel.
In the middle of the Inspector window is your app’s hierarchy, represented as XML. You can navigate this tree by clicking through it or moving on elements in the device view. They will then be highlighted.
When an element is highlighted, its information will appear in the detail view on the right side of the Inspector. This detailed view consists of a table of the element’s properties. These properties are valuable in determining how the element might be accessed using a particular Appium locator strategy.
The top of the Inspector window contains a small toolbar with icons representing the ability to take specific actions in the Inspector:
- Crosshairs: Select an element in the device screen to inspect it.
- Refresh: Refresh the source.
- Expand all: Expand all the elements in the tree.
- Collapse all: Collapse all the elements in the tree.
- XPath: Configure XPath expression.