Download Locating Android App Elements Using UI Automator Viewer - Software Testing Tutorials graphic type that can be scaled to use with the Silhouette Cameo or Cricut. An SVG's size can be increased or decreased without a loss of quality. All of our downloads include an image, Silhouette file, and SVG file. It should be everything you need for your next project. Our SVG files can be used on adhesive vinyl, heat transfer and t-shirt vinyl, or any other cutting surface
As you knows, We are going to automate native android apps so it is not possible to inspect them using fire-bug and fire-path which we can use to locate elements of software web application as described in THIS POST. So here we need to use some other tool which can locate elements of android app.
What Is UI Automator Viewer?
UI Automator Viewer is a tool provided by android SDK. You can view THIS POST to know how to download and install android SDK in windows. UI Automator Viewer will provide you an user interface to scan and analyse UI components of android software application. Using UI Automator Viewer, We can inspect the android app component hierarchy, Inspect properties of android app components and then we can use those element's properties to create xpath of element and use them in automation test scripts.
You will find uiautomatorviewer.bat file in tools folder of SDK. e.g. E:\SDK\tools.
PREREQUISITES : All PREVIOUS 8 STEPS of android environment configuration should be performed.
Inspecting App's UI Element Using UI Automator Viewer
We will use default and simple calculator app of android phone to learn how to inspect its's UI elements using UI Automator Viewer tool. Follow the steps given bellow.
- Connect your android device with PC (USB debugging mode should be enabled) as described in THIS POST.
- Run command "adb devices" in command prompt to verify device is connected properly with PC.
- Run uiautomatorviewer.bat file from E:\SDK\tools folder. View THIS POST to know more about SDK folder. It will open UI Automator Viewer tool's UI as bellow.
- Open Calculator application in your android phone. You can download Android Calculator App from THIS PAGE if it is not available with you.
- In UI Automator Viewer software tool, Click on Device Screenshot image button as shown in bellow image. (Before clicking on button please make sure Calculator app is open in your android phone and it is in active mode. Means phone is unlocked and you are able to see Calculator app on screen).
- It will process to capture device screenshot.
- After capturing screenshot of android phone screen, It will show your android phone's calculator's UI in UI Automator Viewer as bellow.
- On left site it will show you calculator app's screenshot which is open in android device.
- Right side top part will show calculator app's UI element's hierarchy view. It will display node structure to explain how elements are arranged.
- Right side bottom part will show property detail of selected element.
- In calculator screenshot (which is display in UI Automator Viewer), Select button 5 to view it's different properties as shown in bellow image.
- It is showing different properties of button 5 in right side node detail section which we can use to locate it using different element locating strategy.
Download Locating Android App Elements Using UI Automator Viewer - Software Testing Tutorials All SVG file downloads also come bundled with DXF, PNG, and EPS file formats. All designs come with a small business commercial license. These SVG cut files are great for use with Silhouette Cameo or Cricut and other Machine Tools.