Use of UIAutomatorviewer
- After installation of Android SDK. Navigate to Android tools folder and scroll down UIAutomatorviewer. bat file should be present.
- UIAutomatorviewer tool offers an user interface to find the elements detail .So that it will help to locate the element from UI.
- UIAutomatorviewer provides screen cast with emulator as well as Device cast with real devices.
- By using UIAutomatorviewer ,user can inspect the element like webpage .
Setup: In Real Device:
- Connect your real device with system by using USB(USB Debugging mode should enable).
Make sure your device is connected properly with system.Some times no device is connected will display.That case in command prompt enter the path of your android SDK where tools & platform tools is present. like "C:\Users\105798\AppData\Local\Android\sdk ".Then enter "adb devices" ,this time it will display properly.
Setup: In Emulator:
- how to setup emulator follow this link
then same process .
Now go to "Android\\sdk\\tools" and lunch UIAutomatorviewer.
Now let's take an native app example:
Let's take native app " Contacts "
Now open the Add new contact page in Android mobile
Now Open UIAutomatorviewer by clciking "Device screen shot(uiautomator dump)"



