-
-
Notifications
You must be signed in to change notification settings - Fork 178
UI Automator Viewer: What Is It And How To Use It
UI Automator Viewer is a program from Android SDK tools. Unfortunately, the easiest way to get SDK tools is to download and install Android Studio from the official site. It won't be necessary to use Android Studio itself though.
UI Automator Viewer lets us make special Android screenshots, that contain not only a picture of the screen, but also a layout hierarchy. Simply speaking, it lets us understand how Instagram is built and how we can interact with Instagram interface with our bot.
Make sure that you've connected your Android device and adb
sees it (adb devices
prints your device ID). If it's not, follow instructions on the main page. If you've successfully installed Android Studio, then uiautomatorviewer
can be usually found in
-
C:\Users\<username>\AppData\Local\Android\sdk\tools\bin
for Windows -
~/Library/Android/sdk/tools/bin
for macOS (press Shift+command+. in Finder to see hidden folders) -
~/Android/sdk/tools/bin
for Ubuntu
It can be launched simply by double-clicking. You will see something like this:
Now all you have to do is to press 1. Device Screenshot and 2. Save. You'll get two files: *.png and *.uix, describing what there's currently on your Android device's screen.