Appium with C #: Session 8: Locate Android Elements Using UIAutomatorviewer

Use of UIAutomatorviewer

  1. After installation of Android SDK. Navigate to Android tools folder and scroll down UIAutomatorviewer. bat file should be present.
  2. UIAutomatorviewer tool offers an user interface to find the elements detail .So that it will help to locate the element from UI.
  3. UIAutomatorviewer provides  screen cast with emulator as well as Device cast with real devices.
  4. By using UIAutomatorviewer ,user can inspect the element like webpage .

Setup: In Real Device:

  1. Connect your real device with system by using USB(USB Debugging mode should enable).
         Go to command prompt and write "adb devices".
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:



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)"














Copyright © 2017 qatoolsguide.blogspot.com || ALL RIGHTS RESERVED