- Created by Sagar Dubewar, last modified on Apr 18, 2017
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 3 Next »
Object identification is an essential part of software automation testing. This section helps you identifying object properties of native and Web applications with the help of UI Automator Viewer (for Windows) and Appium Inspector (for Mac).
Identifying Native Android Application Objects on Windows
UI Automator Viewer can be used to spy native application objects on Android device. It is a tool provided by Android SDK that provides a user interface to scan and analyze UI components of Android software application. Using UI Automator Viewer, you can inspect the Android app component hierarchy, inspect properties of app components, and use those element's properties to create Xpath of element and use them in automation test scripts.
- Ensure the Android device is connected properly to Windows computer.
- Run uiautomatorviewer.bat file from the Android SDK folder.
- Open the Application under Test (AUT) on the Android phone or emulator.
- Click the Device Screenshot icon ( ) on the UI Automator.
- The current mobile device screenshot is captured.
- After capturing screenshot of device screen, it displays app UI in UI Automator Viewer.
- On the left side, it displays the app's screenshot opened in the Android device.
- Right side top part displays the app's UI element's hierarchy view. It displays node structure to explain elements hierarchy.
- Right side bottom part displays property details of the selected element.
- In the app screenshot (which is displayed in UI Automator Viewer), select any button to view its different properties.
- It displays the different properties of the selected button in right side node detail section which you can use to locate it using different element locating strategy.
This way you can inspect any element of android native app using UI Automator Viewer. You just need to click the element and the properties of the element are displayed in detail. Using these details you can create new objects in Qualitia.
Identifying Web Application Objects on Windows (Chrome Remote Debugging)
In order to identify objects of the Web application, you need to connect Android device to your Windows computer and turn on the USB debugging and Developer options.
- Open Google Chrome on your Android device.
- Open desired Web application.
- Launch Google Chrome on your Windows computer.
- In the Address bar, enter "Chrome://inspect" and press Enter.
- Google Chrome displays the device connected with the computer and all the Web applications opened in the Android device.
- Click Inspect below the desired application from the list.
The Web application is then opened with all the page details on the right side. - Click the desired element from the Web application to get its properties in the right pane.
Qualitia users can then use these elements to create new objects in Qualitia and use these objects in test cases as per the requirements.
For more information on this, click here.
Identifying Native iOS Application Objects on Mac
Appium Inspector is one of the components of Appium Server that can be used to understand the element hierarchy, find xPath, name, and value of the objects, and record manual actions.
- Launch Appium Server on Mac.
- On the Appium GUI, click the Apple icon on the top to view iOS Settings.
- Select the App Path check box and click the Choose button to select the AUT from the local drive.
- Select the Force Device check box and select the desired device in which you want to open the AUT using the drop-down list.
- In the Appium Server window, click Launch.
- Appium then opens the selected application using simulator with selected device specifications in iOS Settings.
- Click the Magnifier icon in the Appium window to start Appium inspector.
A new window appears where you can inspect elements from your iOS device. - On the Appium Inspector window, you can click the app elements in the right side to view its details in the left side.
- Appium gives ready to use xPath in the Details section.
- Select Locator at the end and search locator with different strategies including xPath, ID, class name, and so forth.
This way you can inspect any element of iOS native app using Appium Inspector. You just need to click the element and it displays element properties in the Details section.
Using these details you can create new objects in Qualitia.
Note: Once you have identified objects from native application using Appium Inspector, make sure to close the Appium Inspector window and restart Appium Server before you execute test case from Qualitia.
Identifying Web Application Objects on Mac
In order to identify objects of the Web application, you need to connect iOS device to your Mac with Web Inspector and JavaScript options on. You can spy Web application objects from the iOS hardware device or the simulator.
- Open Safari on your iOS device.
- Open desired Web application.
- Launch Safari on your Mac computer.
- On the Develop menu, click the iOS device name connected to Mac.
- Safari displays the list Web applications open in the iOS device.
- Select the desired application from the list.
- The page details are then displayed on screen.
- When you hover the mouse pointer over the details, Safari highlights respective element on the iOS device screen.
Qualitia users can then use these elements to create new objects in Qualitia and use these objects in test cases as per the requirements.
For more information about this, click here.
- No labels