There is an alternate way of just seeing locators using uiautomatorviewer, bundled by Android SDK. If you have set up the Android SDK path, open the Terminal (Command Prompt in Windows) and type in the uiautomatorviewer command. This will launch a blank window with a couple of icons on top, as illustrated in the following screenshot. It is present under the tools folder in Android SDK:
We use this tool to find out the application UI hierarchy and show the details of the elements present in the UI. We can inspect the attributes of an element by clicking on the element.
Steps to use UI Automator Viewer:
- Prerequisites: Emulator ...