Ui Automator Viewer

Nov 15, 2020 Hashes View Filename, size uiautomator-1.0.2.tar.gz (5.7 MB) File type Source Python version None Upload date Nov 16, 2020 Hashes. UI Automator is more “black box” oriented: you can test any application (even without knowing the code) or even access Android systems settings (like the configuration panel). Espresso is more “white box” oriented: it requires having the code of the application you want to test, you can conduct finer assertions (for instance on activity.

注:1、在Android Studio中可以通过Android Device Monitor 调用UI Automator Viewer。 2、点击uiautomatorviewer后会出现一个console黑窗口,使用时不要关掉。 三、uiautomatorviewer界面. 界面一共有四个区域: 1)上方区域. What is 'Ui Automator Viewer'? Uiautomatorviewer is a GUI tool to scan and analyze the UI components of an Android application. Using this tool, you can take a snapshot of the foreground UI screen on any Android device that is connected to your development machine. Offers online courses for QA Training with Quality Center / ALM training, Selenium, Selendroid, Appium, SeeTest Aut.

Ui Automator Viewer

What is UiAutomatorViewer?

'UIautomatorviewer' is a GUI tool to scan and analyze the UI components of an Android application.To automate any android application using Appium, a user needs to identify the objects in AUT (Application under test). With 'UIautomatorviewer' you can inspect the UI of an android application to find out the hierarchy and view different properties (id, text…) of the element.

Ui Automator Viewer In Android

While executing automation scripts, Appium uses 'Uiautomatorviewer' to identify different properties of the object and use the properties to identify the required object.

In this tutorial, you will learn-

How to Download & Install UIAutomator

'Uiautomatorviewer' is a part of the Android SDK manager and will be accessible once you install the SDK manager. Download and install Android SDK manager from here

Once Android SDK installed, navigate to link You'll notice a batch file with name . Double click on it to launch 'Uiautomatorviewer' GUI

Ui Automator Viewer

How to use Uiautomatorviewer to find objects in my application

  1. Enable 'developer' options on your device. Click here to know how to enable developer options on Android devices
  2. Connect your android device to PC via USB cable
  3. Select 'Guru99' app from applications
  1. Click the 'Device screenshot' button to refresh the 'Uiautomatorviewer' and to load the guru99 application GUI on 'Uiautomatorviewer'
  1. After refresh is completed, a screenshot of Guru99 application opens
  1. As you see in the above image, on the right side of the window there are 2 panels.

Ui Automator Viewer Ubuntu

Upper panel contains node hierarchy the way the UI components are arranged and contained, clicking on each node gives properties of UI elements in the lower panel

  1. Select 'Quiz' button in the above image to view different properties (text, resource-id...)

How to use these properties to identify elements for automation

Well, you cannot use the properties directly, each property has other names. Let's see how to use those properties values to work. Following attributes can be used to identify 'Quiz' button in Guru99 app.

  • text attribute can be used as 'name'
  • resource-id attribute can be used as 'id'
  • class attribute can be used as 'className'
  • content-desc attribute can be used as 'AccessibilityId'

    Along with above attributes, we can write xpaths for object identification

Error one might encounter while using Uiautomatorviewer

Ui Automator ViewerAutomator
  • I see the error- 'No Android devices were detected by adb' as shown in below screenshot how I can resolve this

Solution: Make sure your device is connected to PC