33 Shares 6063 Views

Virtual Objects – When Nothing works

Sep 19, 2012
33 Shares 6,063 Views

When Nothing Works Virtual Objects is the weapon to achieve your goal. Many of the times you will find that QTP is not able to recognize an object, even if the object behaves like a standard object. Virtual objects helps in such situation, to be able to identify and run tests.

Virtual object feature in QTP enables us to create and run tests on objects that are not normally recognized by QTP. we can define such objects as virtual objects and map them to standard classes like button, checkbox etc.QuickTest emulates the actions on virtual object during the run session. A virtual object can be defined using the virtual Object Wizard. The wizard prompts you to select the standard object class to which you want to map the virtual object. You then mark the boundaries of the virtual object using a crosshairs pointer. Next, you select a test object as the parent of the virtual object. Finally, you specify a name and a collection for the virtual object. A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name. Virrtual Object Manager feature enables us to create and manage virtual objects.

Virtual Object Wizard

Launch Virtual Object Wizard by selecting Tools > Virtual Objects > New Virtual Object

Select Next at Welcome screen

figure 1 : Virtual Object Wizard Welcome screen

Select the class which most resembles your virtual object.

figure 2 : Map to a Standard Class

Click on Mark object button and mark the area in application (around the object you want to create virtual)
Click Next

figure 3 : Mark Virtual Object

Select one of the following options

  • Entire Parent hierarchy – if you want to add the whole hierarchy.
  • Parent only – if you want to add only the parent.

Click Next

figure 4 : Object Configuration

Specify the desired object name and the collection name.
Click Finish.

figure 5 : Save Virtual Object

Virtual Object Manager
Select Tools > Virtual Objects > Virtual Object Manager to open Virtual Object Manager.Virtual object manager list all of available virtual object collections. We can delete the virtual object from virtual object collections.

figure 6 : Virtual Object Manager

 

To disable recognition of virtual objects while recording select Tools > Options and click General tab, and select the Disable recognition of virtual objects while recording check box.

 

Tips

  • Object Spy cannot be used on virtual objects
  • Scroll bars and Labels cannot be treated as Virtual objects
  • QTP does not support virtual objects for analog or low level recording.

You may be interested

UFT Patch Updates – UFT 14.03
Unified Functional Testing
1179 views1
Unified Functional Testing
1179 views1

UFT Patch Updates – UFT 14.03

Saket - Mar 11, 2018

Post the launch of UFT 14.0, there are three patch updates has been released including a number of features and enhancement. Recently Micro Focus unveiled third patch…

Setting up Web Service Automation Project
Katalon Studio
1230 views
Katalon Studio
1230 views

Setting up Web Service Automation Project

Saket - Oct 24, 2017

Web services are specific services that can be published and called over the Internet by client applications. Katalon Studio supports functional testing of web services. This topic…

Setting up Mobile Automation Project in MacOS
Katalon Studio
1042 views1
Katalon Studio
1042 views1

Setting up Mobile Automation Project in MacOS

Saket - Oct 09, 2017

Using Katalon Studio, mobile tester can design automation test for both Android and iOS to run on physical devices, cloud services and emulators. This tutorial explains how…

Leave a Comment

Your email address will not be published.

Most from this category

Join The Growing Group of 15000+ Test Automation Engineers

Signup for our newsletter and get access to free downloads, as well as tips, tricks and techniques and various test automation resources.
Name
Email Address
Secure and Spam free...