Perform the following steps to use UIAutomatorViewer for capturing the locator:
- Download Android SDK from https://android-sdk.en.lo4d.com/.
- Once downloaded, go to Andriodsdk/tools and double-click uiautomatorviewer.bat.
- Click on the device screenshot button, second from the left. The device image gets displayed in the left pane.
- Click on any element and the corresponding information is displayed in the right pane.