Android sdk comes with few very useful tools. One of them is uiautomatorviewer that can be used to inspect your android app and to find properties of the app elements like id,text,etc
The android uiautomatorviewer is located at
$> $ANDROID_HOME/tools/bin/uiautomatorviewer
How to use uiautomatorviewer:
- Open the app in your mobile device
- Open uiautomatorviewer in your terminal with the above command
- Click on the device screenshot button
- You should now be able to see your mobile screen and app in uiautomatorviewer, and all the android elements on the right side window