Header
(8.6.X) Work with Object Spy
Watch the video tutorial about working with object spy here:
Objects are integral part of test automation. Any functional test automation tool simulates user actions required to test a particular case. This simulation has to be accurate.
Consider the simple Login test case. A user wants to test validate login functionality by entering valid user credentials and verifying expected results or application behavior. To simulate this accurately, automation tool has to enter Username in the username field and Password in the password field. The success of the test automation will depend upon the automation tool correctly identifying the 'username' and 'password' fields which has to be done using one of the methods explained above. Test automation will fail in the case of incorrect object identification.
You have to be careful about the objects that are generated dynamically. Consider the following example:
The Online Railway Reservation System allows you to reserve tickets between two stations. After successful completion, it creates a PNR number and displays in the table as shown below along with a checkbox.
During development of your test case, you will perform one reservation, the system will generate a new PNR (e.g. 123459), and the respective checkbox will be added as an object to select the corresponding PNR row.Each time you execute this test case, a new PNR is generated along with a new checkbox. This checkbox is generated dynamically and hence its properties are also be dynamic.
For an object which is being generated dynamically for every new reservation, if you fail to specify the correct attribute of the checkbox, your automation tool will refer to the checkbox from the earlier reservation. This is more dangerous from testing point of view as the test case will run successfully after following an incorrect flow.
The procedures described in these sections enable you to add and view objects in repository to be used when developing test cases.
Object Spy for Internet Explorer
Qualitia Object Spy is an Internet Explorer plug-in embedded within IE window at the bottom of the page. It allows you to add objects in the repository for developing test cases or tasks. You can edit the objects if there are any changes to the document structure and at the same time validate changes to objects.
Object Spy supports CRUD operations to manage objects.
It is expected from an Automation tool that it should simulate the manual user actions required to test a case. For the simulation to be accurate, the automation tool needs to perform actions on objects. Objects are thus the first entry points in functional test automation.
The topics in this section explain what an object is, types of objects used in Web-based applications, what you should know to identify objects correctly, and various situations where object identification can become challenging.
Prerequisites
Before getting started with the object spy tool, ensure you meet the following requirements.
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 are keys for understanding Test Automation. Objects are nothing but the controls used in the application.
In the figure shown below, you can see 'Username'. It is an object called 'Label'. Text box below 'Username' is another object called as 'TextBox' or 'WebEdit'. Similarly you can also see other objects like 'check box' as well as 'button' (Sign in).
Internet Explorer Object Spy does not support adding objects for a SFDC application. |
Every object type has a unique functionality and is classified in different categories based on this. The following are the commonly used objects:
Every object type has a unique functionality and is classified in different categories based on this. The following are the commonly used objects:
Object Attributes
In general, an attribute is a property or characteristic. Color, for example, is an attribute of your hair. In the application under test, an attribute is a changeable property or characteristic of the control, which can be set to different values.
In the real world, you will find many examples of objects: Car, computer, mobile phone, or bicycle. Real-world objects also share characteristics. Car has color, model, company name, horsepower (HP).
Similarly, objects in software applications also have attributes. It is important to know the attributes of an object and its role in test automation.
The following are a few of the commonly referred attributes in functional test automation.
Name
ID
Class
Let us take an example: Here 'Sign in' is an object of type button and it has the following attributes with associated values of the attributes:
Here 'Sign in' is an object of type button and it has the following attributes with associated values of the attributes:
Name: Sign in
Color: Blue
Selection of Attributes
Object may have multiple attributes and identifying a unique set of attributes and its associated value is the fundamental success criteria for your test automation tool to identify a particular object uniquely every time during test automation.
For example, consider the following HTML page.
The above page has two identical text boxes. If you need to use only the first text box in your test automation, you should use a particular attribute such that its value is unique and your automation tool is able to point to this particular object.
In this example, the first text box has value attribute = val1. You may make use of value attribute in this case. However, it may not be as simple as it appears above if the value attributes changes for some reason during the next iteration of testing.
Static and Dynamic Objects
Static Objects
Static object is one for which the value of attribute does not change. For example, value of colors property of Indian National Flag will never change.
Best practices in identifying Static Object:
Out of all the attributes, the most static attribute known is the 'name' attribute. Next is the 'id' attribute as IDs can change, since there are few development frameworks that dynamically generate values for id attribute. For all such applications, 'id' attribute becomes the most dynamic.
Dynamic Objects
Dynamic object is one for which the value of attribute is prone to change. For example, value of size property of Indian National Flag can change.
Best practices in identifying Dynamic Object:
To identify an object, never select an attribute that has a dynamic value. Look for any other attribute(s), which are expected to remain static and points to the desired object uniquely. If there are no such attributes, try to use 'regular expression' to avoid dynamism. This is possible if the attribute value has some static and some dynamic portion. You can even parameterize the value to take complete control of predictable dynamism.
There are cases where dynamism of attribute value is not predictable. Do not use such attributes.
Locator Priority Settings
Locator Types
Link
Name
ID
XPath
CSS
This is the default sequence. You may change the sequence as per your requirements.
Locator Priority Settings
The built-in algorithm helps to choose best suitable locator type while finding the best suitable locator to HTML element being inspected.
Qualitia does not use ID attribute when inspecting objects by XPath.
To change the locator priorities:
On Object Spy toolbar, click the Settings icon.
The Locator Priority Settings window appears.Click Up/Down buttons to changes the priorities of the locator type.
Click Restore Default to restore the default priorities.
Click Cancel to discard changes.
Click Ok to apply the changes.
Object Learning Algorithm
Based on the preferred locator types, Object Spy looks for name property of the desired object. If it is not found it looks for the next preferred locator type which is for example ID. If it is not found, it then derives Xpath by referring to other native properties of the object or even of a parent if required. This is typically required in a case of duplicate objects. For more information on duplicate objects refer to the Rules for Duplicate Objects section.
When Object Spy overrides the preferred locator type even if the object has Name or ID Attributes
Assume you have set preference of locator type as Name, ID, Xpath, and Link. The object which you want to add has name property. Object Spy reads the value of name property and checks whether there is another object that has same value of the name property. If a duplicate is found then Object Spy overrides preference and looks for ID or Xpath.
Once Object Spy is sure about the locator type and value being unique for the object, the object will get added. You can further edit the logical name of the object and rename it.
Once the objects are added and saved from Object Spy, you can select objects from the object drop-down without any need to refresh or relaunch Qualitia.
Objects under Frame
This is a typical method that Selenium operates with objects. Selenium searches the object within the scope of the HTML page. Frame element also can hold 'HTML' tag enclosed within. If Selenium is supposed to act on any object under frame, it has to first decide the scope of searching the object in the HTML within the frame and not outside HTML. This is typically done by selecting a frame during development of a test case.
Object Identification Failure
Object identification failure can be categorized by the following cases:
Object does not exist
Object identification failure may occur due to network latency. This may happen when designated page is heavy to load in expected time or connectivity failure. This can be handled by changing synchronization time.
Object exists but tool failed to identify
A tool may fail to identify an object when object identification is based on incorrect attributes. Selected attributes might not have a static value. At times, there are properties, which are supposed to be static but contain dynamic values.
For example, ID attribute is supposed to be static but there are frameworks that generate values of ID attribute dynamically. In such cases, your ID values are supposed to change every time you refresh a page. On the other hand, there can be situation where a window is identified by title. If title contains time stamp as a part of the title, it is prone to change repeatedly after each login. In all such cases, it is advisable to look for another property that is static and uniquely points to the desired object. If there is none and you have to deal with dynamism of the attribute value, check whether the dynamic portion of attribute value is predictable or not.
For example, when user1 logs in, the Login window has a title 'welcome user1'. If you change the login credential to user2, welcome will remain the same and the dynamic portion 'user2' is predictable that is 'welcome user2'.
Dynamic portion in this case is the same as the user credential used. The same user credential can be passed as part of attribute value.
If dynamic portion is not predictable, then the common practice is using regular expression to get rid of the dynamic portion. In the same example of login title, title property can hold a regular expression as 'welcome.*'. You can ignore the dynamic portion and rely on static portion if it uniquely points to the desired object.
Selecting Capture Mode and API
Qualitia gives you provision to select appropriate modes and API based on the application type when adding objects using the objects spy. You can select the appropriate object inspection mode from the object spy settings.
Capture Mode
Qualitia provides two mode for capturing objects for using in tasks and test cases.
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.
To select capture mode:
Launch Object Spy.
Go to Settings > Inspection.
In Capture mode, select the required option.
Click OK
Capture APIs
Qualitia provides mainly 2 APIs while capturing objects.
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.
To select Capture API:
Launch Object Spy.
Go to Settings > Inspection.
In Capture API, select the required option.
Click OK.
Launching Object Spy
You can launch Object Spy to add new objects or to view the objects added earlier.
If Anti-virus of your computer stops launching Object Spy, you need to whitelist the object spy's extension in the Anti-virus. |
To launch Object Spy from Object screen:
Open the Qualitia Automation Studio client.
From the Expand Menu, click Develop.
Click the Objects tab.
Click the Spy button. as shown in the following figure:
You are prompted with the following confirmation message:
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:
Click Yes.
Internet Explorer opens, and you will see Object Spy at the bottom as shown in the following figure:
You can now start using IE Object Spy.
Plug-in can be observed in the bottom screen of IE with functionalities like Object Spy tab and HTML source tab on left bottom. A toolbar has Highlight, Highlight All, Clear Highlights, Save, Delete, Reset functionalities, existing on the right-bottom pane.
If you do not see the plug-in embedded, please refer to the troubleshooting section.
To launch Object Spy from Test case and Task screen:
Right-click the Test case or Task screen, and select from the context-menu Object Spy.
Object Spy User Interface
Object Spy plug-in contains a Tab bar, Gridview and Object Spy toolbar.
Tab Bar Includes:
Object Spy tab
Tree view
Grid view
HTML tab
Button to change Object Inspection Mode
Gridview Includes:
Object Name
Object Description
Object Class
Locator Type
Locator Value
SmartLocator
Object Spy Toolbar Includes:
Highlight
Clear Highlight
Save
Delete
Reset
Search
Settings
Adding Objects Using Different Modes
In Qualitia you can use multiple modes to add objects from the application under test into Qualitia's object repository.
Right-Click Mode
You can right-click the object which you want to add from the application under test and select Add Objects from the context-menu options.
To add object using the right-click mode:
From the Objects screen, click Spy.
The Object Spy window appears.Navigate to the page from where you want to add objects.
Ensure that Select Object option is disabled.
Point to an object that needs to be added.
The object is highlighted with a blue border.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.
|
Left-Click Mode
Many a times, due to some security measurements, Web applications do not allow right-clicking UI elements. You can use the left-click mode to add objects from such applications.
To add object using the left-click mode:
From the Objects screen, click Spy.
The Object Spy window appears.From the Settings > Inspection.
Select Capture Mode as Left-Click and click OK.
Navigate to the page from where you want to add objects.
Ensure that Select Object option is enabled.
Left-click the object which you want to add into the repository.
A confirmation message appears after the object is added.
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. |
Mouse Hover
In this mode, you can add objects into the repository just by hovering mouse over the required object.
To add object using the mouse hover mode:
From the Objects screen, click Spy.
The Object Spy window appears.From the Settings > Inspection.
Select Capture Mode as Mouse Hover and click OK.
Navigate to the page from where you want to add objects.
Ensure that the Select Object option is enabled.
Hover the mouse pointer over the object which you want to add into the repository.
A confirmation message appears after the object is added.
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. |
Selecting Object Attribute On-The-Fly
Qualitia gives you ability to select object attribute on-the-fly when adding objects in the Right-Click Mode.
To select object attribute on-the-fly:
From the Objects screen, click Spy.
The Object Spy window appears.Navigate to the page from where you want to add objects.
Right-click the object and select Add Object By from the context-menu.
Select the object attribute using which you want to add object into the repository.A confirmation message appears after the object is added.
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.
Adding Objects from HTML Code View
This option is recommended to learn WebList (<Select>) objects which could not be learnt from the application HTML.
To do this, hover the mouse on an object close to the WebList to be learnt, click 'View HTML Source', (shortcut Ctrl+F11) this will highlight HTML for the hovered object.
Find the HTML for the WebList and then learn the WebList. This can be done for other objects as well.
Adding Objects from Modal Dialogs
A modal dialog window is a child of the main application window. This child window blocks all the inputs and actions provided to the main application window unless it is closed. While adding objects from the application under test in the object repository, you can add objects from such modal dialogs (child windows). In order to do so, you must first enable an option from the Object Spy settings.
To enable Inspecting from Modal dialog:
Launch Object Spy.
Go to Settings > Inspection.
Select the Allow Modal Inspection option.
Click OK.
Now you can add objects from modal dialogs and use them while creating new tasks and test cases.
Searching Object
You can search the objects added earlier in two ways.
Search by Object Name
Advanced Search
Search by Object Name
On the Object Spy window, enter the object name you want to search.
Click Search.When you select objects from the search results, immediate parent will be highlighted for easy identification.
Advanced Search
On the Object Spy toolbar, click the Search icon.
The Object Search window appears.Select the appropriate filter (Name, Object Class, Locator Type, or Locator Value) to search an object.
Click Search.
The search result displays a list of objects that match the search criteria with name, class, and description of objects.
Editing Object Details
You can edit the objects added earlier. Object Name, Object Description, Locator Type and Locator Value can be edited.
To edit an object
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.
Objects not used in Test cases or Tasks can be edited. If objects that are used in Test cases or Tasks are edited, then Qualitia notifies for confirmation before allowing any edits. |
Resetting Objects
You can reset the objects added earlier.
To reset an object
On the Object Spy toolbar, click Reset.
This will discard any unsaved changes.
Deleting Objects
You can delete the objects that are obsolete and no longer required.
To delete an object:
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.On the Object Spy toolbar, click Delete.
|
Highlighting Objects
Objects already present in the repository can be viewed using the Highlight functionality.
Highlight
This functionality allows you to view an object, which is already present in the repository.
To view an object already present in the repository:
Navigate to a page from which objects are added earlier.
Select an object from the Object Spy toolbar.
To select all objects, select the check box at the top of the column.
Click Highlight.
The selected objects get highlighted on the current page with the object name that is used to store in Qualitia.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
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.
Qualitia Object Spy does not support Mozilla Firefox.
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:
You can add Qualitia Object spy as an extension to Chrome or Edge browser:
To add the Chrome Object Spy:
Download the ChromeExtension folder from the S3 location to your computer.
Extract the QualitiaChromeExtension-8.6.x zip file in a local folder on your computer.
Launch Google Chrome browser and navigate to chrome://extensions/.
To add the Edge Object Spy:
Download the EdgeExtension folder from the S3 location to your computer.
Extract the QualitiaEdgeExtension-8.6.x zip file in a local folder on your computer.
Launch Microsoft Edge browser and navigate to edge://extensions/.
Enable Developer Mode.
Click Load Unpacked.
Select the location of the extracted zip file (QualitiaChromeExtension-8.6.x or QualitiaEdgeExtension-8.6.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:
Do one of the following:
To launch the Chrome Object Spy, open the Chrome browser.
To launch the Edge object spy, open the Edge browser.
Press F12 to open Developer options and select Qualitia Object Spy. The Qualitia Object Spy login page opens.
Enter the Qualitia Server URL.
Enter the same user id that you use to login to Qualitia Automation Studio (QAS) client ,in User Id.
Click Continue.
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. Qualitia also allows you to add objects as an image object.
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
For image objects, locator type is Image only.
You can change the locator type sequence as per your requirements.
Ensure that you have installed Object Spy on the browser of your choice and your computer is connected to Qualitia Server.
Ensure that you have selected a Salesforce project when adding objects of a Salesforce application.
For adding objects of a Salesforce application, Qualitia recommends using Chrome Object Spy only as Salesforce does not support viewing their applications on Edge.
To add web application objects (excluding image objects):
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.Enter the application under test URL in the address bar.
Click the Hover mode, as shown in the following screenshot:
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.
After adding all the required objects, click Save to Repository.
To add the objects for a child window, do one of the following:
Open the child window, and open its associated Object Spy to add the child window objects to a new child window object repository.
Open the child window. Click the Hover 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 Hover button.
To add the image objects:
Launch Chrome Object Spy.
For detailed instructions on how to launch a web object spy, refer to Launching Object Spy from the Browser.Enter the application under test URL in the address bar.
Click the Image mode, as shown in the following screenshot:
Select the image you want to add by drag and drop method and set the position of pointer by clicking on the image:
The image object is added into the list in the Object Spy window:
After adding all the required objects, click Save to Repository.
The objects will be saved to the repository, as shown in the following screenshot:
It is recommended to use Web Object Spy in left dock mode or right dock mode. If you want to use it in any other dock mode, click the Hover/Image button to start using it.
You can also detach Object Spy UI with the application under the test page and also add the child window objects as shown in the above-mentioned step. However, if you are adding objects for multiple application pages in the detach mode, the Web Object Spy adds the objects of all the pages in the same object repository.
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 learnt by the Hover mode:
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.In the Repository section, select the page under which the object exists which needs to be updated.
Click the edit () icon next to the object that you want to edit. For detailed instructions on how to edit an object learnt by the Hover mode, refer to Editing an Object
Note: SmartLocator mode does not support the HTML tag/structure change.Modify the object details and then click Save.
To edit an object learnt by the Image mode:
Launch the browser (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.In the Repository section, select the page under which the object exists which needs to be updated.
Click the edit () icon next to the object that you want to edit. For detailed instructions on how to edit an object learnt by the Image mode, refer to Editing an Image Object
Note: SmartLocator mode does not support the Image mode.Modify the object details and then click Save. You cannot modify the locator type of the image object.
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:
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.In the Repository section, select the page from which you want to highlight the object.
Do one of the following:
To highlight all objects on the page, click the highlight () icon at the page level.
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:
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.In the Repository section, select the page from which you want to remove the object.
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:
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.In the Repository section, use the filter (
) option to filter objects.
To filter objects by Web Page, select the desired page from the drop-down list.
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
XCode
Appium Dependencies
Java 8 (64-bit)- Oracle Java 8 : 1.8.0_261/ Open JDK / Azul Java: 8.48.0.53
On your Windows machine, you must have
Android Studio (for emulators only)
Intel® HAXM (for emulators only)
Java 8 (64-bit)- Oracle Java 8 : 1.8.0_261/ Open JDK / Azul Java: 8.48.0.53
For more information on the same, please to the 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:
Navigate to the folder where you have downloaded Qualitia Installables.
Open Mobile Server Folder.
Do one of the following:
If you are installing it on Mac, copy the Qualitia Mobile Server.pkg file to any temporary location.
If you are installing it on Windows, copy the Setup.exe file to any temporary location.
Follow the onscreen instructions and complete the installation procedure.
To confirm the installation, do one of the following:
Go to services console and check whether the Qualitia.Mobile.Service is running (for Windows only).
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
Navigate to the folder where you have downloaded Qualitia Installables.
Open Mobile Agent Folder.
Copy the setup.exe file to any temporary location.
Double-click the setup.exe to install.
Follow the onscreen instructions and complete the installation procedure.
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
Navigate to the folder where you have downloaded Qualitia Installables.
Open Mobile Agent Folder.
Copy the Qualitia Mobile Agent.pkg file to any temporary location on the machine where you want to install this agent.
Double-click the Qualitia Mobile Agent.pkg to install.
Follow the onscreen instructions and complete the installation procedure.
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 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:
From the notification area, right-click the Mobile Agent(
) icon to select Open Configuration.
You will get the following information from system/IT administrator.
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.Enter Keychain Path.
It is a path to the private development key exported from the system keychain.Enter Keychain Password for authenticating to Keychain Path mentioned above.
Enter Keystore Password.
For more information about these properties, you may refer to Appium documentation.Enter the absolute path to chromedriver executable file which will be used while test case executions on mobile devices.
Enter the path to the directory where you have stored the chromedriver to be used test case executions on mobile devices.
Click Save.
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:
From the notification area, right-click the
and select Open Configuration.
You will get the following information from system/IT administrator.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.Enter Keychain Path.
It is a path to the private development key exported from the system keychain.Enter Keychain Password for authenticating to Keychain Path mentioned above.
Enter the Keystore Password.
For more information about these properties, you may refer to Appium documentation.Enter the absolute path to the chromedriver executable which will be used test case executions on mobile devices.
Enter the path to the directory where you have stored the chromedriver to be used test case executions on mobile devices.
Enter XCODE Signing ID.
Enter XCODE Organization Team ID.
Click Save.
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).
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:
Once downloaded, double-click android-studio-bundle-windows.exe.
This will start installation of Android Studio.Follow the on-screen instructions and complete the studio installation.
Select Standard Installation.
Once the installation is complete, launch Android Studio.
Create a dummy project.
From the File menu, click Settings.
Under Appearance & Behavior, expand System Settings and select Android SDK.
In the right pane, select SDK Platforms.
Select required packages to install and click Apply.
System displays the list of components selected to be installed.
Go to SDK Tools and ensure that Android SDK Build-Tools is installed. If not, then download it.
Click OK.
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:
Launch Xcode and navigate to Xcode > Preferences.
Select Components from the top.
All the available simulators are listed here.Select one or more simulators from the list to download.
A pop-up appears asking password.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:
Launch any browser.
Enter Mobile Object Spy URL.
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).Enter Qualitia Username and Password.
Click Sign in.
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:
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.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.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.Click Boot and Connect to boot the device and launch it to spy the objects.
This option is available for emulators/simulators only.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 Prerequisites & Configurations section.
To launch an application under test:
On Mobile Object Spy, connect to the desired device.
You can launch an application in 3 different ways:
To launch the already installed application, select the application under test using from the drop-down list.
To freshly install the application, select the .app, .ipa or .apk file from the local directory and click Install.
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.
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:
Launch Mobile Object Spy and install or launch the application under test.
Click the play (
) icon to enable the object spy mode.
Hover over the object you want to add and Object spy will highlight the object.
Click the highlighted object to add it in the repository.
Object appears in the right pane of the Object Repository section.The following object properties are automatically added for the mobile object, which you can change:
Name
Object Class
Locator Value
Locator Type
Click the pause (
) button to exit from the object spy mode or click the button to end the session.
Adding a Hybrid Application Object
A 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:
Launch Mobile Object Spy and install or launch the application under test.
Click the play (
) icon to enable the object spy mode.
By default, the native view of the application appears.
To add objects from the native context:
Hover over the object you want to add and Object spy will highlight the object.
Click the highlighted object to add it in the repository.
The following object properties are automatically added for the mobile object, which you can change:
Name
Object Class
Locator Value
Locator Type
To add objects from web context:
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.Hover over the object you want to add and Object spy will highlight the object.
Click the highlighted object to add it in the repository.
The object appears in the right pane of the Object Repository section.The following object properties are automatically added for the web object, which you can change:
Name
Object Class
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:
Launch Mobile Object Spy and select the device which you want to use while spying objects.
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.Click the play (
) icon to enable the object spy mode.
To add objects from specific web context:
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.Hover over the object you want to add, Object spy highlights the object.
Click the highlighted object to add it in the repository.
The object appears in the right pane in the Object Repository section.The following object properties are automatically added for the web object, which you can change:
Name
Object Class
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:
Launch Mobile Object Spy and install or launch the application under test.
From the right pane, click Page Source.
A new section appears displaying the page source.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.The following object properties are automatically added for a mobile object, which you can change:
Name
Object Class
Locator Value
Locator Type
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 |
---|---|---|
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:
Launch Mobile Object Spy and select the application under test to launch.
Click Advanced options.
Select the capability from the drop-down options and enter the value for corresponding capability.
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:
Launch Mobile Object Spy and install or launch the application under test.
From the right pane, click Page Source.
A new section appears displaying the page source.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.To launch the object properties section, from the right pane, click Object Properties.
A new section appears below page source.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:
Launch any browser.
Enter Mobile Object Spy URL.
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).Enter Qualitia Username and Password.
Click Sign in.
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:
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.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.Press TAB or ENTER to save the changes.
To edit object details from Qualitia Automation Studio:
Log on to Qualitia Automation Studio.
Navigate to Develop > Objects.
All the objects are listed in the left pane.Select the object you want to update and click Edit.
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:
Launch Mobile Object Spy and launch the application under test.
All the objects added earlier from this application appear in the object repository section.Click the filter (
) icon.
Select the object class(es) based on which you want to filter the objects.
Select the object type, Mobile or Web.
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:
From the top right corner, click username and select Sign Out.
Click Sign In again.
Enter sign in details and click Sign In.
Select the desired project and start working on it.
Footer