Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Expand
titleTo add objects using UI Automator Viewer
  1. Ensure the Android device is connected properly to Windows computer.
  2. Run uiautomatorviewer.bat file from the Android SDK folder.
  3. Open the Application under Test (AUT) on the Android phone or emulator.
  4. Click the Device Screenshot icon ( Image Removed ) on the UI Automator.
  5. The current mobile device screenshot is captured.
  6. 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.

Expand
titleTo identify web objects and add in Qualitia
  1. Open Google Chrome on your Android device.
  2. Open desired Web application.
  3. Launch Google Chrome on your Windows computer.
  4. In the Address bar, enter "Chrome://inspect" and press Enter.
  5. Google Chrome displays the device connected with the computer and all the Web applications opened in the Android device.
  6. Click Inspect below the desired application from the list.
    The Web application is then opened with all the page details on the right side.
  7. 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.

Tip

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.

Expand
titleTo start the Appium inspector:
  1. Launch Appium Server on Mac.
  2. On the Appium GUI, click the Apple icon on the top to view iOS Settings.
  3. Select the App Path check box and click the Choose button to select the AUT from the local drive.
  4. Select the Force Device check box and select the desired device in which you want to open the AUT using the drop-down list.
  5. In the Appium Server window, click Launch.
  6. Appium then opens the selected application using simulator with selected device specifications in iOS Settings.
  7. 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.
  8. On the Appium Inspector window, you can click the app elements in the right side to view its details in the left side.
  9. Appium gives ready to use xPath in the Details section.
  10. 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

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.

Expand
titleTo identify web application objects using iOS physical device:
  1. Open Safari on your iOS device.
  2. Open desired Web application.
  3. Launch Safari on your Mac computer.
  4. On the Develop menu, click the iOS device name connected to Mac.
  5. Safari displays the list Web applications open in the iOS device.
  6. Select the desired application from the list.
  7. The page details are then displayed on screen.
  8. 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.

Tip

For more information about this, click here.

See also, 

Insert excerpt
Object Identification
Object Identification
nopaneltrue