Document toolboxDocument toolbox

Header

(8.3.1) Work with Object Spy

Object Spy for Internet Explorer

Object Spy supports CRUD operations to manage objects.

Prerequisites

  • Ensure you have Full control rights to the folder and subfolders where Object Spy is getting installed.

  • Ensure that the Active scripting option is set to Enable under Security Settings section. To do so, under Internet Options > Security > Custom Level.  
    By default, this option is set to Disable in the high security zone.

  • Ensure that Enable third-party browser extensions* is enabled from the Advanced section of Internet Options.  



Object and their Attributes

Objects

Internet Explorer Object Spy does not support adding objects for a SFDC application.

Object Attributes

  • Name

  • ID

  • Class

  • Name: Sign in

  • Color: Blue

Selection of Attributes

Static and Dynamic Objects

Static Objects

Dynamic Objects

Locator Priority Settings

Locator Types

  • Link

  • Name

  • ID

  • XPath

  • CSS

  1. On Object Spy toolbar, click the Settings icon.
    The Locator Priority Settings window appears.

    1. Click Up/Down buttons to changes the priorities of the locator type.

    2. Click Restore Default to restore the default priorities.

    3. Click Cancel to discard changes.

    4. Click Ok to apply the changes.

Object Learning Algorithm

When Object Spy overrides the preferred locator type even if the object has Name or ID Attributes

Objects under Frame

Object Identification Failure

  • Object does not exist

  • Object exists but tool failed to identify

Selecting Capture Mode and API

Capture Mode

  • Left Click: In this mode, you can add objects to the repository using the left click of the mouse.

  • Mouse Hover: Using this mode, you can add objects in the repository just by hovering mouse pointers over objects.

  1. Launch Object Spy.

  2. Go to Settings > Inspection.

  3. In Capture mode, select the required option.

  4. Click OK

Capture APIs

  • Browser Mode: In this mode, Qualitia identifies objects using JavaScript events or native events.

  • Accessibility: Selecting this mode, you can utilize Microsoft Active Accessibility API to identify objects from application under test more reliably.

  1. Launch Object Spy.

  2. Go to Settings > Inspection.

  3. In Capture API, select the required option.

  4. Click OK.

Launching Object Spy

If Anti-virus of your computer stops launching Object Spy, you need to whitelist the object spy's extension in the Anti-virus. 

  1. Open the Qualitia Automation Studio client.

  2. From the Expand Menu, click Develop.

  3. Click the Objects tab.

  4. Click the Spy button. as shown in the following figure:

  1. You are prompted with the following confirmation message:

  1. Click Yes if you have administrative privileges. You will not be able to continue with the installation if you do not have administrative privileges.
    The following Windows confirmation message appears:

  1. Click Yes.

  2. Internet Explorer opens, and you will see Object Spy at the bottom as shown in the following figure:

  • Right-click the Test case or Task screen, and select from the context-menu Object Spy.


Object Spy User Interface

  1. Object Spy tab

  2. Tree view

  3. Grid view

  4. HTML tab

  5. Button to change Object Inspection Mode

  1. Object Name

  2. Object Description

  3. Object Class

  4. Locator Type

  5. Locator Value

  6. SmartLocator

  1. Highlight

  2. Clear Highlight

  3. Save

  4. Delete

  5. Reset

  6. Search

  7. Settings

Adding Objects Using Different Modes

  1. From the Objects screen, click Spy.
    The Object Spy window appears.

  2. Navigate to the page from where you want to add objects.

  3. Ensure that Select Object option is disabled. 

  4. Point to an object that needs to be added.
    The object is highlighted with a blue border.

  5. Right-click the object and select Add Object from the context-menu.
    A confirmation message appears after the object is added.
    An object is added to the repository using the precedence set in Locator Priority Settings.

  • While pointing to an object ensure you have pointed to an object with its appropriate Object Class.

  • Objects that are added manually with CSS/DOM Locator Type values cannot be highlighted.

  • When adding new object in the repository, if object already exists, Qualitia notifies displaying the object name that is used while adding this object into the repository.

Left-Click Mode

  1. From the Objects screen, click Spy.
    The Object Spy window appears.

  2. From the Settings > Inspection. 

  3. Select Capture Mode as Left-Click and click OK.


  4. Navigate to the page from where you want to add objects.

  5. Ensure that Select Object option is enabled.

  6. Left-click the object which you want to add into the repository.
    A confirmation message appears after the object is added.

Mouse Hover

  1. From the Objects screen, click Spy.
    The Object Spy window appears.

  2. From the Settings > Inspection. 

  3. Select Capture Mode as Mouse Hover and click OK.


  4. Navigate to the page from where you want to add objects.

  5. Ensure that the Select Object option is enabled.

  6. Hover the mouse pointer over the object which you want to add into the repository.
    A confirmation message appears after the object is added.

Selecting Object Attribute On-The-Fly

  1. From the Objects screen, click Spy.
    The Object Spy window appears.

  2. Navigate to the page from where you want to add objects.

  3. Right-click the object and select Add Object By from the context-menu.

  4. Select the object attribute using which you want to add object into the repository.
    A confirmation message appears after the object is added.



Adding Objects from HTML Code View

Adding Objects from Modal Dialogs

  1. Launch Object Spy.

  2. Go to Settings > Inspection.

  3. Select the Allow Modal Inspection option.

  4. Click OK.
    Now you can add objects from modal dialogs and use them while creating new tasks and test cases.


Searching Object

  • Search by Object Name

  • Advanced Search

Search by Object Name

  1. On the Object Spy window, enter the object name you want to search.

  2. Click Search.
    When you select objects from the search results, immediate parent will be highlighted for easy identification.

Advanced Search

  1. On the Object Spy toolbar, click the Search icon.
    The Object Search window appears.

  2. Select the appropriate filter (Name, Object Class, Locator Type, or Locator Value) to search an object.

  3. Click Search.

Editing Object Details

  • Press F2 key or double-click the cell.

  • Use arrow keys to traverse from one field to another.

  • Use the Enter key to save the data.



Resetting Objects

  • On the Object Spy toolbar, click Reset.
    This will discard any unsaved changes.

Deleting Objects

  1. On the Object Spy grid-view, select the check box(s) corresponding to the objects that you want to remove.
    Select the check box at the top of the column to select all the objects.

  2. On the Object Spy toolbar, click Delete.



Highlighting Objects

Highlight

  1. Navigate to a page from which objects are added earlier.

  2. Select an object from the Object Spy toolbar.

  3. To select all objects, select the check box at the top of the column.

  4. Click Highlight.
    The selected objects get highlighted on the current page with the object name that is used to store in Qualitia.

  5. On the Object Spy toolbar, click Clear Highlight to clear the highlighted object from the current page.

Challenges in Object Identification and Remedies

 

Duplicate Object Properties

There are situations where you may encounter two objects that are identical to each other with respect to their attributes and values. If you have to deal with one of them as part of your workflow, you need to find some mechanism to differentiate them from each other. This can be achieved by using the following techniques:

  • Find out something unique within the hierarchy (either parent or child or sibling)

  • Use numbering/index or location. Location may fail if resolution is changed and Index may fail if there is an additional, similar object that comes in the next version. The entire indexing may require resetting.

Dynamic Object Properties

Please refer to the Object Identification Failure section.

Container Objects

Please refer to the Object Spy for Internet Explorer section.

 

FAQs

 



  • If you try to inspect/add any object and if it is already inspected, an appropriate message appears on the tab bar.

  • Click Highlight All to check if the object is already learned.



  • Click Delete checkbox for deleting that object, if it is used in Test case or Task, an appropriate message appears on the tab bar.

  • Select object for deletion and click Save.

  • Double-click on Object Spy grid cell.



  • Press F2 key to edit the XPath or Class of the already Learnt Object.







 

Qualitia Object Spy

Qualitia Object Spy is used to add the objects of the application that you want to test. You can add Qualitia Object Spy as an extension on Google Chrome and Microsoft Edge.
After adding the required objects, you can use them to create test cases in Qualitia Automation Studio client. 

Add Object Spy as a Browser Extension

 

Download the Qualitia Object Spy extension into your Chrome or Edge browser to then launch  it in the browser.

To add Qualitia Object Spy as an extension to a browser:

  1. You can add Qualitia Object spy as an extension to Chrome or Edge browser:

    • To add the Chrome Object Spy:

      1. Download the ChromeExtension folder from the S3 location to your computer.

      2. Extract the QualitiaChromeExtension-8.3.x zip file in a local folder on your computer.

      3. Launch Google Chrome browser and navigate to chrome://extensions/.

    • To add the Edge Object Spy:

      1. Download the EdgeExtension folder from the S3 location to your computer.

      2. Extract the QualitiaEdgeExtension-8.3.x zip file in a local folder on your computer.

      3. Launch Microsoft Edge browser and navigate to edge://extensions/.

  2. Enable Developer Mode.

  3. Click Load Unpacked.

  4. Select the location of the extracted zip file (QualitiaChromeExtension-8.3.x  or QualitiaEdgeExtension-8.3.x), and click OK.

    You can now launch Qualitia Object Spy on the selected browser. For more detailed instructions, Launching Object Spy from the Browser.





 

Launch Object Spy from Browser

 

You can launch the object spy from the browser type on which you have added the object spy as an extension.

To launch the Object Spy from the Browser:

  1. Do one of the following:

    1. To launch the Chrome Object Spy, open the Chrome browser.

    2. To launch the Edge object spy, open the Edge browser.

  2. Press F12 to open Developer options and select Qualitia Object Spy.The Qualitia Object Spy login page opens.

  3. Enter the Qualitia Server URL.

  4. Enter the same user id that you use to login to Qualitia Automation Studio (QAS) client ,in User Id.

  5. Click Continue.

  6. Select the associated project on which you want to add and manage objects.

 

 

Add Web Application Objects

 

You can add an object of a web application under test with a single-click and select the locator type of your preference. 

The following is the default sequence to add objects for a web application:

  • Link

  • Name

  • ID

  • XPath

  • CSS

The following is the default sequence to add objects for an SFDC application:

  • SFDC:Label

  • Link

  • Name

  • ID

  • XPath

  • CSS

You can change the locator type sequence as per your requirements. 

To add Web Application Objects:

  1. Launch either Edge or Chrome Object Spy.
    For detailed instructions on how to launch a web object spy, refer to Launching Object Spy from the Browser.

  2. Enter the application under test URL in the address bar.

  3. Enable the Select Mode on.


  4. Hover the mouse pointer over the object and click it once the object details are highlighted.
    The object is added into the list in the Object Spy window.

  5. After adding all the required objects, click Save to Repository.





  6. To add the objects for a child window, do one of the following:

    1. Open the child window, and open its associated Object Spy to add the child window objects to a new child window object repository.

    2. Open the child window. Click the Select Mode button of the Object Spy associated with the parent window to add the child window objects to the parent window object repository. You can switch between parent and child windows to add their objects using the Select Mode button.  





 

Edit an Object using Object Spy

 

You can update the object details and also change their locator type and associated locator value

To edit an object:

  1. Launch the browser (Edge or Chrome) that is enabled with Web Object Spy.
    For detailed instructions on how to launch a web object spy, refer to Launching Object Spy from the Browser.

  2. In the Repository section, select the page under which the object exists which needs to be updated.

  3. Click the edit () icon next to the object that you want to edit.

  4. Modify the object details and then click Save.




 

Highlight the Objects

 

Qualitia Web Object Spy lets you highlight the added objects when you navigate to the associated application under test page. This helps you to understand which objects are added into the repository and which objects are not added yet.

To highlight the objects:

  1. Launch the browser (Edge or Chrome) that is enabled with Web Object Spy.
    For detailed instructions on how to launch a web object spy, refer to Adding Web Application Objects.

  2. In the Repository section, select the page from which you want to highlight the object.

  3. Do one of the following:

    1. To highlight all objects on the page, click the highlight () icon at the page level.

    2. To highlight a specific object, click the object name you want.
      The application page highlights the objects.



 

Remove Objects from Object Repository

 

You can remove the objects that are no longer required. 
To remove an object from the Object Repository:

  1. Launch either Chrome Object Spy or Edge Object Spy.
    For detailed instructions on how to launch a web object spy, refer to Adding Web Application Objects.

  2. In the Repository section, select the page from which you want to remove the object.

  3. Click the Remove icon (

    ) next to the object that you want to remove.




 

Filter Objects List

 

You can filter objects by page or object type, or both. 

To filter the objects list:

  1. Launch the browser (Edge or Chrome) that is enabled with Web Object Spy.
    For detailed instructions on how to launch a web object spy, refer to Adding Web Application Objects.

  2. In the Repository section, use the filter (

    ) option to filter objects.

    1. To filter objects by Web Page, select the desired page from the drop-down list.

    2. To filter objects by Object Class, select the desired object class from the drop-down list.





 

Limitations/Known Issues

 

Limitations of Qualitia Object Spy 

  • Does not identify SVG elements.

  • Does not highlight the objects present inside the frames.

Limitations of SmartLocator Feature

  • Does not update the new locator value of the object in the object repository when executing through offline package.

  • Does not support the Wait actions, such as WaitForExistence, WaitForVisibility, and WaitForClickability.

 

Object Spy for Mobile Applications



The Mobile Object Spy is a powerful tool that allows application testers to access objects from the mobile application under test. These mobile objects then can be used while creating tasks and test cases for mobile test automation into Qualitia Automation Studio. Mobile Object spy allows you to view objects and their properties of all sorts of Native, Web, and Hybrid applications.

In order to add objects from the mobile application under test, you must first install mobile object spy components and configure your systems and mobile devices (real devices or emulators/simulators) accordingly.

Installing the Mobile Components

Qualitia Mobile object spy contains multiple components. You must complete the installation process to you start adding objects from mobile application under test. 

You can install the components mentioned below on the same machine or different machines based on the requirements. After installing Qualitia Mobile Server and Mobile Agent, you can start using Qualitia Mobile Recorder and Mobile Object Spy.

Pre-Requisites

Before you start installing Mobile Agent or Mobile Server, you must first configure the Mac or Windows machine to work with real devices, emulators, or simulators. 

On Mac, you must have

On your Windows machine, you must have

For more information on the same, please to the (8.3.0) Prerequisites & Configurations section.  

Installing the Mobile Server

You must first install Qualitia Mobile server on any machine in the network. This can be any Windows or Mac system. 

All the Qualitia clients should have access to port 4001 from the machine where you are installing Qualitia Mobile server.

To install Mobile Server:

  1. Navigate to the folder where you have downloaded Qualitia Installables.

  2. Open Mobile Server Folder.

  3. Do one of the following:

    1. If you are installing it on Mac, copy the Qualitia Mobile Server.pkg file to any temporary location.

    2. If you are installing it on Windows, copy the Setup.exe file to any temporary location.

  4. Follow the onscreen instructions and complete the installation procedure.

  5. To confirm the installation, do one of the following:

    1. Go to services console and check whether the Qualitia.Mobile.Service is running (for Windows only).

    2. You can try accessing Mobile Server using Server URL in any browser.
      Server URL is a combination of hostname/IP of the machine where Qualitia Object Spy server is installed along with the port 4001.
      Sample URL may look like: http://192.168.25.77:4001 or http://localhost:4001.

Installing a Mobile Agent

After you install Qualitia Mobile server, you can install Mobile agent and connect mobile devices or simulators/emulators to identify and add objects from mobile applications.

This can be any Windows or Mac system with all the prerequisites installed for mobile application testing.

All Qualitia clients should have access to port 4001 from the machine where you are installing Qualitia Mobile server.

You can install multiple mobile agents (on different machines in the same network) connecting to single mobile server.

Installing a Mobile Agent on Windows

  1. Navigate to the folder where you have downloaded Qualitia Installables.

  2. Open Mobile Agent Folder.

  3. Copy the setup.exe file to any temporary location.

  4. Double-click the setup.exe to install.

  5. Follow the onscreen instructions and complete the installation procedure. 

  6. To confirm the installation, you can double-click the Mobile agent icon from the desktop and you will find the agent icon  in notification area.
    You can right-click the agent icon from the notification area and proceed for the configurations.

Installing a Mobile Agent on Mac

  1. Navigate to the folder where you have downloaded Qualitia Installables.

  2. Open Mobile Agent Folder.

  3. Copy the Qualitia Mobile Agent.pkg file to any temporary location on the machine where you want to install this agent.

  4. Double-click the Qualitia Mobile Agent.pkg to install.

  5. Follow the onscreen instructions and complete the installation procedure.

  6. Post installation, you can access the agent using icon from the top menu bar (notification area).
    You can right-click the agent icon from the notification area and proceed for the configurations.
    You must enable the camera access on the Mac machine where the agent is installed while launching a mobile application under test on an iOS real device from mobile object spy for the first time.

Configuring a Mobile Agent

After you install the Mobile agents that you want, you must configure them to connect to the Mobile server. 

While registering agents to Mobile server, you can see the list of dependencies required for mobile application testing through Qualitia. You can add the missing dependencies from there itself. 

For more information on adding these dependencies, you may refer to the (8.3.0) Prerequisites & Configurations section.

Configuring a Mobile Agent on Windows

After you install the Mobile agent, you must configure it to connect to the mobile server.

Post this configuration, all the existing Android emulators and real devices get connected to this agent automatically.

To configure iOS devices, to connect to the agent, refer to the Preparing Mobile Devices for Automation Testing section.

 ADB commands should not be executed on external terminal while Mobile agent is running.

To Configure a Mobile agent on Windows:

  1. From the notification area, right-click the  Mobile Agent() icon to select Open Configuration.

     View image

    You will get the following information from system/IT administrator.

  2. Enter Mobile Server URL and click Open Settings.
    Mobile server URL is a combination of Hostname/IP of the machine where Mobile Server is installed along with with the port 4001.
    Sample URL may look like: http://192.168.25.44:4001 or http://localhost:4001.

  3. Enter Keychain Path.
    It is a path to the private development key exported from the system keychain.

  4. Enter Keychain Password for authenticating to Keychain Path mentioned above.

  5. Enter Keystore Password.
    For more information about these properties, you may refer to Appium documentation.

  6. Enter the absolute path to chromedriver executable file which will be used while test case executions on mobile devices.

  7. Enter the path to the directory where you have stored the chromedriver to be used test case executions on mobile devices.

  8. Click Save.

  9. On the subsequent screen, enter Mobile Server URL.
    Server URL is a combination of hostname/IP of the machine where Qualitia Mobile server is installed along with the port 4001.
    Sample URL may look like: http://192.168.25.66:4001 or http://localhost:4001 (if the mobile server is installed locally).

Configuring a Mobile Agent on Mac

After you install the Mobile agent, you must configure it to connect to the mobile server. After this configuration, all the existing Android and iOS virtual and real devices get connected to this agent automatically.

To configure iOS devices, to connect to the agent, refer to the Preparing Mobile Devices for Automation Testing section.

To Configure Mobile agent:

  1. From the notification area, right-click the and select Open Configuration.
    You will get the following information from system/IT administrator.

  2. Enter Mobile Server URL and click Open Settings.
    Mobile server URL is a combination of Hostname/IP of the machine where Mobile Server is installed along with with the port 4001.
    Sample URL may look like: http://192.168.25.44:4001 or http://localhost:4001.

  3. Enter Keychain Path.
    It is a path to the private development key exported from the system keychain.

  4. Enter Keychain Password for authenticating to Keychain Path mentioned above.

  5. Enter the Keystore Password.
    For more information about these properties, you may refer to Appium documentation.

  6. Enter the absolute path to the chromedriver executable which will be used test case executions on mobile devices. 

  7. Enter the path to the directory where you have stored the chromedriver to be used test case executions on mobile devices.

  8. Enter XCODE Signing ID.

  9. Enter XCODE Organization Team ID.

  10. Click Save.

  11. On a subsequent screen, enter Mobile Server URL.
    Server URL is a combination of hostname/IP of the machine where Qualitia Mobile server is installed along with the port 4001.
    Sample URL may look like: http://192.168.25.66:4001 or http://localhost:4001 (if the mobile server is installed locally).


Important Note:

Information about Keychain Path and Keychain/keystore password is only required if you have Android Studio for emulators on this Mac machine.

Creating Emulators and Simulators

Creating an Emulator

You need to download Android Studio to create virtual devices/emulators and test the mobile applications using Qualitia.

You can view the detailed procedure about creating and managing Android virtual devices, click here.

To create an Emulator:

  1. Download Android Studio.

  2. Once downloaded, double-click android-studio-bundle-windows.exe.
    This will start installation of Android Studio.

  3. Follow the on-screen instructions and complete the studio installation.

  4. Select Standard Installation.View Image

Android Studio is developed for Android application development. In order to get started with application testing using virtual devices, users need to have at least one project created. Once project is created, users can create and start emulators and download required platform images from the Android Studio

  1. Once the installation is complete, launch Android Studio.

  2. Create a dummy project.

  3. From the File menu, click Settings.

  4. Under Appearance & Behavior,  expand System Settings and select Android SDK.

  5. In the right pane, select SDK Platforms.

  6. Select required packages to install and click Apply.

    View Image

    Google system images are required to create and start virtual devices (emulators). Generally, emulators created with Google APIs Intel x86 Atom System Image serve all the testing requirements, however, users can download and install any system image depending on the testing requirements.

    If you want Google Chrome in the Nougat emulator,  please select Google API as system image. Google Chrome comes as a default browser for Nougat and not for other Android operating systems. 

    System displays the list of components selected to be installed.

    1. Go to SDK Tools and ensure that Android SDK Build-Tools is installed. If not, then download it.

       View Image

    2. Click OK

    3. Once all the required components are installed, click Finish.
      Now you can start creating virtual devices.

Creating a Simulator

You need to download the required simulators if you want to execute test cases on simulators. 

To create a simulator:

  1. Launch Xcode and navigate to Xcode > Preferences.

  2. Select Components from the top. 
    All the available simulators are listed here.

  3. Select one or more simulators from the list to download.
    A pop-up appears asking password.

  4. Enter Password and then click Install Software.

Working with Mobile Object Spy

After you install Mobile Object Spy server and agents and you have created required simulators/emulators using Android Studio or XCode, you can start adding objects from the mobile application under test.

You can either install the application under test using .app/.ipa file on iOS devices or you can use the .app file to install on Android devices to add objects from them for automation test cases.

Launching the Mobile Object Spy

After you complete the Mobile Object Spy server and agent installation, you can easily launch Mobile Object Spy using any available browser on any machine in the network.

Just use the Mobile Object Spy Server URL and you will be able to access Mobile Object Spy. Mobile Object Spy URL is a combination of Hostname/IP of the server where you have installed Mobile Object Spy server along with the port 4001.

Sample URL may look like: http://192.168.25.33:4001 or http://localhost:4001 (if mobile object Spy server is installed locally).

To launch Mobile Object Spy:

  1. Launch any browser.

  2. Enter Mobile Object Spy URL

  3. Enter Qualitia Server URL.
    Qualitia Server URL is a combination of Hostname/IP of the server where you have installed Qualitia server along with the port 8887.
    Sample URL may look like: http://192.168.25.33:8887 or http://localhost:8887 (if mobile object Spy server is installed locally).

  4. Enter Qualitia Username and Password.

  5. Click Sign in

  6. Select Qualitia project under which you want to add newly inspected objects and then click Sign in.

Once you have launched the Mobile Object Spy, you can filter the devices based on the device type (emulator/simulator, real), OS version, connected agent, and so forth.

You can select or connect to the desired mobile device and start adding new objects from application under test.

Locator Priority Settings for Mobile Object Spy

The default sequence for Mobile Object Spy for a native application is as follows:

  • UiAutomator

  • ID

  • Accessibility ID

  • Class

  • XPath

The default sequence for Mobile Object Spy for a web application is as follows:

  • Link

  • Name

  • ID

  • XPath

  • CSS

You may change the sequence as per your requirements. 

Launching a Mobile Device and Application Under Test

Launching Devices

After you sign in to Mobile Object Spy, you can select the device from the available list of devices and use them to launch and add objects from the application under test.

Mobile Object Spy displays all the devices connected to all the agents. This connected list of devices includes real devices, emulators and simulators.

It is recommended to use single simulator/emulator per agent while working with mobile object spy. You can seamlessly use multiple real devices at a single time.

To launch a mobile device:

  1. Launch Mobile Object Spy on any browser using Mobile Object Spy URL.
    Mobile Object Spy URL is a combination of hostname/IP of the machine where Mobile Object Spy server is installed along with the port 4001.
    Sample URL may look like: http://192.168.25.77:4001 or http://localhost:4001.

  2. Enter Qualitia Server URL, User id and Password.
    Qualitia Server URL is a combination of Hostname/IP of the server where you have installed Qualitia server along with the port 8887.
    Sample URL may look like: http://192.168.25.77:8887 or http://localhost:8887.

  3. Select the Qualitia project under which you want to add new objects.
    Here you will see all the real devices connected to the agent Mobile Object Spy agents along with the emulators or simulators.
    For more information on creating emulators/simulators using Android Studio or XCode, click here. 

  4. Click Boot and Connect to boot the device and launch it to spy the objects.
    This option is available for emulators/simulators only.

  5. Click Connect to launch the real device connected to Mobile Object Spy agent or already started emulator/simulator.

     For the device to be visible and usable the device needs to allow unauthorized access on the connected device for Mobile Object Spy to work

    Ensure you have set the default browser as Google Chrome in the real device.

One mobile device can be accessed by one user only. If the device is being accessed by some other user, you will see the device state as Busy.

Launching or Installing an Application Under Test

After you launch mobile object spy and connect to the desired real device or emulator/simulator, you can start adding objects by from the application under test.

You must first launch or install the application under test on the mobile device from which you want to add new objects. Qualitia gives you a provision to install the application under test from Mobile Object Spy itself.

In order to launch application under test on the desired device, you must first create desired emulator/simulator on the Mobile Object Spy agent. For more information about creating and managing emulators, refer to (8.3.0) Prerequisites & Configurations section.

To launch an application under test:

  1. On Mobile Object Spy, connect to the desired device.

  2. You can launch an application in 3 different ways:

    1. To launch the already installed application, select the application under test using from the drop-down list.

    2. To freshly install the application, select the .app, .ipa or .apk file from the local directory and click Install.

    3. To add objects from the web application, enter Web URL.
       When you provide application path and web application URL at the same time, Web URL overrides the application path.

  3. Click Launch to launch the application.
    Once you have launched any application using this method, you can interact with live screen by performing tap, swipe and tap and hold actions. Drag and drop action is not supported. You can launch other applications from the device screen itself.
    Also, if you are launching the application which was already running on the device, the application is launched at its current stage. Qualitia does not reset the application when launching it. 

Adding the Mobile Application Objects

Once you launch a simulator/emulator or real device and installed the desired application, you can start adding objects from it for the automation testing. All the objects you add from here are immediately added to Qualitia object repository which you can use while creating automation tasks/test cases for mobile applications.

In Mobile applications, there are two types of objects:

  • Web: The objects which are solely created for web applications. They are present in web context of the hybrid applications and web applications.

  • Mobile: The objects which are solely created for mobile applications. They are present in native and native context of the hybrid applications.

Follow the simple procedures mentioned below to add objects into the repository based on the type of application

  • Once you have launched any application, you can interact with live screen by performing tap, swipe, and tap and hold actions by using mouse. 

  • You can launch other applications from the device screen itself.

  • If you are launching the application which was already running on the device, the application is launched at its current stage. Qualitia does not reset the application when launching it.

  • By default, Mobile Object Spy prefers the locator type as per the following sequence:

    • UiAutomator

    • ID

    • Accessibility ID

    • Class

    • XPath

  • If you switch to another application under test, Qualitia adds a new parent page automatically and all the objects are stored under the respective parent page. 

Limitations of Mobile Object Spy:

  • Drag and Drop action is not supported

  • SmartLocator does not support Mobile Objects

  • For UiAutomator, the locator type does not support values related to complex Element Hierarchy

  • Cannot capture web objects through iOS Simulator

  • Does not highlight web objects that are inside a frame

  • Adding web objects from the page source for web applications and web context of hybrid applications is not supported.

Adding a Native Application Object

This type of applications are developed to run independently on a smartphone with or without internet connectivity. You can add objects from the native applications using mobile object spy.

To add an object for a native application:

  1. Launch Mobile Object Spy and install or launch the application under test.

  2. Click the play () icon to enable the object spy mode.

  3. Hover over the object you want to add and Object spy will highlight the object.

  4. Click the highlighted object to add it in the repository.
    Object appears in the right pane of the Object Repository section. 

  5. The following object properties are automatically added for the mobile object, which you can change:

    1. Name

    2. Object Class

    3. Locator Value

    4. Locator Type

  6. Click the pause () button to exit from the object spy mode or click the  button to end the session.

Adding a Hybrid Application Object

hybrid application (hybrid app) is one that combines elements of both native and Web applications. Hybrid applications run inside a native container and leverage the device's browser engine (but not the browser) to render the web elements like HTML and so forth. Qualitia allows you to add objects from the hybrid application into the object repository for mobile application testing.

Qualitia supports Hybrid application with debug enabled/Developer mode build only.

To add an object for a hybrid application:

  1. Launch Mobile Object Spy and install or launch the application under test.

  2. Click the play () icon to enable the object spy mode.

  3. By default, the native view of the application appears.

  4. To add objects from the native context:

    1. Hover over the object you want to add and Object spy will highlight the object.

    2. Click the highlighted object to add it in the repository.

    3. The following object properties are automatically added for the mobile object, which you can change:

      1. Name

      2. Object Class

      3. Locator Value

      4. Locator Type

  5. To add objects from web context:

    1. Click the Webview panel in the left pane and select the required Webview from the list.
      Only the objects falling under the selected web view appear in the live view.

    2. Hover over the object you want to add and Object spy will highlight the object.

    3. Click the highlighted object to add it in the repository. 
      The object appears in the right pane of the Object Repository section. 

    4. The following object properties are automatically added for the web object, which you can change:

      1. Name

      2. Object Class

  6. Click the pause () button to exit from the object spy mode or click the  button to end the session. 

For Web Objects, the SmartLocator is automatically enabled due to which locator value and locator type are automatically selected. If you want to change the values, you need to edit object in QAS, where you need to disable the Smart Locator option.

Adding a Mobile Web Application Object

You can add objects from applications which are accessed over a network connection and run in a web browser.

Note: Qualitia recommends to keep the size of the browser as 100%. If you Zoom In or Zoom Out the browser, the UI may distort, which makes it difficult to identify the objects.

To add an object for a mobile web application:

  1. Launch Mobile Object Spy and select the device which you want to use while spying objects. 

  2. Enter the web application URL and click Launch.
    If the platform is Android,  then it is launched in Google Chrome browser. If the platform is iOS, then it is launched in the Safari browser.

  3. Click the play () icon to enable the object spy mode.

  4. To add objects from specific web context:

    1. Click the Webview panel in the left pane and select the required Webview from the list.
      Only the objects falling under the selected webview appear in the live view.

    2. Hover over the object you want to add, Object spy highlights the object.

    3. Click the highlighted object to add it in the repository. 
      The object appears in the right pane in the Object Repository section. 

    4. The following object properties are automatically added for the web object, which you can change:

      1. Name

      2. Object Class

  5. Click the pause () button to exit from the object spy mode or click the  button to end the session.

For Web Objects, the SmartLocator is automatically enabled due to which locator value and locator type are automatically selected. If you want to change the values, you need to edit object in QAS, where you need to disable the SmartLocator option.

Adding an Object from a Page Source for a Native Application

Some objects are not visible on screen but they are required for automating the test cases for Mobile applications. Qualitia gives you the provision to add objects from the native context from the page source. 

To add an object from a page source for a native application:

  1. Launch Mobile Object Spy and install or launch the application under test.

  2. From the right pane, click Page Source.
    A new section appears displaying the page source.

  3. Hover over the object in the page source which you want to add, and click  icon.
    The object appears in the right pane of the Object Repository section. 

  4. The following object properties are automatically added for a mobile object, which you can change:

    1. Name

    2. Object Class

    3. Locator Value

    4. Locator Type

  5. To end the session, click the  button.

Using the Advanced Options while Launching an Application

Qualitia gives you the provision to set few capabilities while you launch the application under test. These are the Appium capabilities which you can set to configure the application session based on the requirements.

You can use the following advanced capabilities while launching the application.



Capabilities

Description

Values/Example

Capabilities

Description

Values/Example

noReset

Helps you reset the application before starting the session.

Boolean (true/false)

intentAction

Intent action to use to start an activity. Applications can have their own intentAction. You will get this information by the app developer.

android.intent.action.VIEW

intentCategory

Intent category to use to start an activity. You will get this information by the app developer.

android.intent.category.LAUNCHER

chromeOptions

This capability allows you to customize and configure a ChromeDriver session. For the complete list of ChromeDriver supported capabilities and how to use them, see the chromeOptions documentation.

args=–-headless



To use the advanced options while launching an application:

  1. Launch Mobile Object Spy and select the application under test to launch.

  2. Click Advanced options.

  3. Select the capability from the drop-down options and enter the value for corresponding capability.

  4. Click  to add the capability. 



Viewing the Page Source and Object Properties

Qualitia allows you to view the page source of the application under test for understanding the object hierarchy in better way. This helps in forming the better flow while automating test cases for application under test.

Qualitia also gives you provision to add the objects from the application under test from the page source view. You can also view the object properties selecting the corresponding object in the page source.

To view the page source and object properties:

  1. Launch Mobile Object Spy and install or launch the application under test.

  2. From the right pane, click Page Source.
    A new section appears displaying the page source.




  3. Hover over the object in the page source which you want to add and click  icon.
    Object will then appear in the right pane in the Object Repository section. 

  4. To launch the object properties section, from the right pane, click Object Properties
    A new section appears below page source.




  5. To view the object properties of any object, click the desired object in the page source and its properties appear in the Object Properties section.

Highlighting the Mobile Application Objects

After you complete the Mobile Object Spy server and agent installation, you can easily launch Mobile Object Spy using any available browser on any machine in the network.

Just use the Mobile Object Spy Server URL and you will be able to access Mobile Object Spy. Mobile Object Spy URL is a combination of Hostname/IP of the server where you have installed Mobile Object Spy server along with the port 4001.

Sample URL may look like: http://192.168.25.33:4001 or http://localhost:4001 (if mobile object Spy server is installed locally).

To launch Mobile Object Spy:

  1. Launch any browser.

  2. Enter Mobile Object Spy URL

  3. Enter Qualitia Server URL.
    Qualitia Server URL is a combination of Hostname/IP of the server where you have installed Qualitia server along with the port 8887.
    Sample URL may look like: http://192.168.25.33:8887 or http://localhost:8887 (if mobile object Spy server is installed locally).

  4. Enter Qualitia Username and Password.

  5. Click Sign in

  6. Select Qualitia project under which you want to add newly inspected objects and then click Sign in.

Once you have launched the Mobile Object Spy, you can filter the devices based on the device type (emulator/simulator, real), OS version, connected agent, and so forth.

You can select or connect to the desired mobile device and start adding new objects from application under test.

Updating the Mobile Application Objects

You can update the object details which you have added in the repository earlier.

Once added into the repository, you can update objects from Qualitia Automation Studio (Objects screen) and from Mobile Object Spy as well.

To update the mobile application objects from the Mobile Object Spy:

  1. Launch Mobile Object Spy and launch the application under test.
    The list of objects added earlier from the selected application appears in the object repository section.

  2. Update the object details like name, class, locator type/value, based on the requirements.
    You can update only locator type and value for an empty object. You can update other properties only adding the locator type/value.

  3. Press TAB or ENTER to save the changes.

To edit object details from Qualitia Automation Studio:

  1. Log on to Qualitia Automation Studio.

  2. Navigate to Develop Objects.
    All the objects are listed in the left pane.

  3. Select the object you want to update and click Edit.

  4. Edit the required fields and click Save to save the changes.

Filtering the Mobile Objects

Over the course of the project, the project might contain hundreds of objects. Searching specific type objects at such times can be challenge.

Qualitia gives you privilege to filter objects while working with the Object Spy.

You can filter objects by page and by object type as well. 

To filter the mobile objects:

  1. Launch Mobile Object Spy and launch the application under test.
    All the objects added earlier from this application appear in the object repository section.

  2. Click the filter () icon. 

  3. Select the object class(es) based on which you want to filter the objects.

  4. Select the object type, Mobile or Web.

  5. Click Reset to remove all the filters.

Switching to Another QAS Project

In order to switch Qualitia project you are working on, you must sign out from Mobile Object Spy. While signing in to Mobile Object Spy, you can select desired Qualitia project to add objects into.

To switch to another QAS project:

  1. From the top right corner, click username and select Sign Out.




  2. Click Sign In again.




  3. Enter sign in details and click Sign In.




  4. Select the desired project and start working on it.

Footer