Identifying object properties of Android and iOS native or Web applications require the help of external tools such as UI Automator Viewer for Android and Appium Inspector for iOS applications. To identify object properties, follow the steps mentioned below.
Identifying Native Android Application Object Properties Using UI Automator Viewer
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.
To run UI Automator Viewer:
- Ensure Android device is connected properly to Windows Computer.
- Run uiautomatorviewer.bat file from the Android SDK folder.
- Open the Application under Test on the Android phone or emulator.
- Click the 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. Click the element to see the element properties in detail. Using these details you can create new objects in Qualitia.
Identifying Native iOS Application Object Properties Using Appium Inspector
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.
To start the Appium inspector:
- Start Appium Server on Mac.
- 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 Application under Test (AUT) from the local drive.
- Select the Force Device check box and select 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 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 makes object spying easy giving 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.
Identifying Android Web Application Object Properties on Windows
In order to identify objects of the Web application, you need to connect Android device to your Windows computer with and turn on the USB debugging and Developer options.
To identify web objects:
- Open Google Chrome on your Android device.
- Open desired Web application.
- Launch the Google Chrome on your Windows computer.
- In the Address bar, enter "Chrome://inspect" and hit Enter.
Google Chrome displays the device connected with the computer with 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 in 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.
Identifying iOS Web Application Object Properties 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.
To identify web application objects using iOS device (hardware):
- Open Safari on your iOS device.
- Open desired Web application.
- Launch the Safari on your Mac.
- On the Develop menu, click the logged in username.
Safari displays the list Web applications open in the iOS device connected with Mac.
- Select the desired application from the list.
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.