Document toolboxDocument toolbox

Header

(v9.0) Add Mobile Application Objects

Once you've launched a simulator/emulator or real device and installed the desired application, you can begin adding objects from it for automation testing. All objects you add are immediately incorporated into Qualitia object repository, which you can then utilize when creating automation tasks or test cases for mobile applications.

In mobile applications, there are two types of objects:

  1. Web: These objects are exclusively created for web applications. They are present in the web context of hybrid applications and web applications.

  2. Mobile: These objects are exclusively created for mobile applications. They are present in the native context of hybrid applications.

To add objects to the repository, interact with the live screen by performing tap, swipe, and hold actions using your mouse. If you switch to another application under test, Qualitia automatically adds a new parent page, and all objects are stored under the respective parent page.

Note: Please note, if you launch an application that's 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 sequence of

  1. UiAutomator

  2. ID

  3. Accessibility ID

  4. Class

  5. XPath.

However, you can customize this sequence as per your requirements. Refer to the loctor types section for more clarity.

 

Initiating the Mobile Application Object Addition Process

Upon successfully initiating a simulator/emulator or a real device and installing the desired application, you're primed to start incorporating objects from it for your automation testing. The added benefit of this process is that any objects you add here are immediately included in the Qualitia object repository. This becomes a handy tool when you're in the process of crafting automation tasks/test cases for mobile applications.

Mobile applications are built on two types of objects:

Web Objects: These are exclusive creations for web applications. They make their presence known in the web context of both hybrid applications and solely web applications. An example would be a 'Sign-up' button on a web app.

Mobile Objects: These objects are tailor-made for mobile applications. They are present in the native context of hybrid applications. An example could be a 'Swipe Right' gesture action in a mobile app.

Below, you'll find straightforward procedures to introduce objects into the repository depending on the type of application.

Once you've initiated any application, you're able to interact with the live screen by performing actions such as tapping, swiping, and holding, all with the simple use of a mouse. In addition, you have the capability to initiate other applications directly from the device screen.

If the application was already operational on the device, launching it commences at its current stage. Qualitia maintains the status quo of the application during its initiation.

In case you switch to a different application under test, Qualitia automatically introduces a new parent page and all the objects are stored under that respective parent page. However, there are some limitations with the Mobile Object Spy:

  • Drag and Drop actions are unsupported

  • SmartLocator does not recognize Mobile Objects

  • For UiAutomator, the locator type does not support values associated with complex Element Hierarchy

  • Web objects cannot be captured through iOS Simulator

  • Doesn't highlight web objects located inside a frame

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

Adding a Native Application Object

Native applications are engineered to operate independently on a smartphone with or without internet connectivity. Using the Mobile Object Spy, objects can be added from these native applications.

Here's how to add an object for a native application:

  1. Commence Mobile Object Spy and install or initiate the application under testing.

  2. Activate object spy mode by clicking on the play () icon.

  3. Hover over object you wish to add.

  4. Object Spy will then highlight the object.

  5. Click highlighted object to introduce it into the repository.

  6. This object then appears in the right pane of the Object Repository section.

  7. Following object properties are automatically added for the mobile object, but you have the freedom to modify these:

    1. Name

    2. Object Class

    3. Locator Value

    4. Locator Type

  8. To exit from the object spy mode, click pause () button or end the session by clicking Stop.

 

Incorporating a Hybrid Application Object

A hybrid application, often referred to as a hybrid app, ingeniously combines components of both native and web applications. These hybrid applications function within a native container and utilize the device's browser engine (excluding the browser itself) to render the HTML and other web elements. Qualitia provides you with the capability to introduce objects from such hybrid applications into the object repository for testing mobile applications.

 

Note: It's important to note that Qualitia supports Hybrid applications that have enabled the debug/Developer mode.

 

Steps to Add an Object for a Hybrid Application:

  1. Kick off Mobile Object Spy and install or initiate the application you're testing.

  2. To enable object spy mode, click Play () icon.

  3. By default, application's native view will appear.

  4. If you're looking to add objects from the native context:

    1. Hover over your desired object and the Object Spy will emphasize it by highlighting.

    2. Simply click the highlighted object to introduce it into your repository.

  5. Now, the subsequent object properties are automatically added for the mobile object, though they're open to changes:

    1. Name

    2. Object Class

    3. Locator Value

    4. Locator Type

  6. If you're adding objects from the web context:

    1. In the left pane, click the Webview panel and choose the required Webview from the given list.

    2. Only the objects under the selected web view will be displayed in the live view.

    3. Hover over your preferred object and the Object Spy will highlight it.

    4. Click the highlighted object to incorporate it into your repository.

  7. Your object will then make its appearance in the right pane of the Object Repository section. The following object properties are automatically added for the web object, and you can modify these if necessary:

    1. Name

    2. Object Class

  8. To exit from the object spy mode, click on the pause () button or click the Stop button to terminate the session

For Web Objects, the SmartLocator feature is automatically enabled. This results in the automatic selection of the locator value and locator type. If you wish to alter these values, you'll have to edit the object in QAS, and this involves disabling the SmartLocator option.

 

Incorporating a Mobile Web Application Object

You also have the ability to introduce objects from applications that are accessed over a network connection and function within a web browser.

Please note: Qualitia strongly advises maintaining the size of the browser at 100%. Zooming in or out could distort the UI, making it challenging to identify objects.

 

Steps to Add an Object for a Mobile Web Application

  1. Begin the Mobile Object Spy and choose the device you'll be using while spying objects.

  2. Input the web application URL and click 'Launch'.

  3. Depending on your platform, if it's

    1. Android, it'll launch in Google Chrome.

    2. iOS, it'll launch in the Safari browser.

  4. Click the play () icon to activate the object spy mode.

  5. To incorporate objects from a specific web context:

    1. Click the Webview panel in the left pane and select the necessary Webview from the list.

    2. Only the objects under the chosen webview will be shown in the live view.

    3. Hover over your chosen object and the Object Spy will highlight it.

    4. Click the highlighted object to include it into your repository.

  6. The object will then be displayed in the right pane of the Object Repository Section. The following object properties are automatically included for the web object, and these are subject to change if necessary:

    1. Name

    2. Object Class

  7. Click on the pause () button to stop the object spy mode or click the Stop button to wrap up the session.

Similar to the previous process, for Web Objects, the SmartLocator is automatically turned on, hence the automatic selection of the locator value and locator type. If you wish to modify these values, you need to perform an object edit in QAS, which requires disabling the SmartLocator option.

Incorporating an Object from a Page Source for a Native Application

Some objects may not be visible on the screen, but they are essential for automating the test cases for Mobile applications. Qualitia offers you the feature to add objects from the native context from the page source.

 

Steps to Add an Object from a Page Source for a Native Application:

 

  1. Launch Mobile Object Spy and install or initiate the application you're testing.

  2. From the right pane, click Page Source.

  3. A new section pops up, displaying the page source.

  4. Hover over the object in the page source you wish to add and click the icon.

  5. The object then shows up in the right pane of the Object Repository section. The following object properties are automatically included for a mobile object, but you have the option to modify them:

    1. Name

    2. Object Class

    3. Locator Value

    4. Locator Type

  6. To terminate the session, click the Stop button.

 

After launching the Mobile Object Spy, you can filter the devices based on factors like device type (emulator/simulator, real), OS version, connected agent, etc. You can then select or connect to the desired mobile device and start adding new objects from the application under test.

Updating Mobile Application Objects

You have the capability to update the details of the objects you've previously added to the repository.

Once an object is added into the repository, you can update it from either the Qualitia Automation Studio (Objects screen) or from Mobile Object Spy.

To update mobile application objects from the Mobile Object Spy:

  1. Launch Mobile Object Spy and start the application under test.

  2. A list of objects previously added from selected application will appear in Object Repository section.

  3. Update object details like

    1. Name

    2. Class

    3. Locator type/value, according to the requirements. For example, if the object is a button and its id has changed in the new version of the app, you can update the locator value to reflect this change.

  4. Note that for an empty object, only the locator type and value can be updated. Other properties can be updated after adding the locator type/value.

  5. Press TAB or ENTER to save the changes.

 

To edit object details from Qualitia Automation Studio:

  1. Log in to Qualitia Automation Studio.

  2. Navigate to Develop > Objects.

  3. All objects will be listed on the left panel.

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

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

 

Filtering Mobile Objects

As your project progresses, you may accumulate hundreds of objects. Searching for specific objects can become a daunting task.

Qualitia allows you to filter objects while working with the Object Spy. You can filter objects by page and by object type as well.

Here's how to filter mobile objects:

  1. Launch Mobile Object Spy and start application under test.

  2. All previously added objects from this application will appear in the object repository section.

  3. Click filter icon.

  4. Select object class(es) based on which you want to filter the objects. For example, if you're looking for all the "Button" objects, you can select Button class from filter options.

  5. Select object type, Mobile or Web.

  6. Click Reset to remove all filters.

 

Switching to Another QAS Project

If you need to switch to a different Qualitia project, you must first sign out from Mobile Object Spy. Then, while signing back in, you can select the desired Qualitia project to add objects into.

  1. Here are the steps to switch to another QAS project:

  2. From top right corner, click on your username and select Sign Out.

  3. Click Sign In again.

  4. Enter your sign in details and click Sign In.

  5. Select your desired project and start working on it. For example, if you were previously working on a Banking project and now want to switch to an E-commerce project, select the latter from the available projects during sign-in.

Footer