UI Automator Viewer

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:

  1. Prerequisites: Emulator ...

Get Mobile Test Automation with Appium now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.