What is a Virtual Object and it helps in solving Object Recognition Problem in QTP ?

Virtual Objects comes into picture if QTP is unable to recognize an object and we often see errors as Object not found. This is because even thought you have recorded the actions during playback time QTP is unable to recognize an object and because of which the script fails.


Virtual Objects in QTP are created to resolve the object recognition problems in QTP. When an area of an application is not recognized by QTP we use the Virtual Object Wizard to map the area to a standard Class. These virtual objects are generally used to resolve the object recognition problems. All the Virtual Objects created are stored in the Virtual Object Manager. After we have learned an object as a Virtual Object we can record on that object successfully. You can create a Virtual Object by navigating to Tools, Virtual Objects, New Virtual Object.

Points to Note:

1. We cannot use object spy on a Virtual Object.
2. We can only record on Virtual Objects.
3. Scroll Bars and Labels cannot be treated as Virtual Objects.

In order to disable the Virtual Objects Navigate to Tools, Options, General, Check the check box for "Disable Recognition of Virtual Objects While Recording"

When Object recognition Problem occurs in QTP during playback on the Application Under test there are ways to handle this Object Recognition Problem. It depends solely on the user as to what they want to use.

The different ways to handle Object Recognition Problem are:

1. By Creating Virtual Objects.
2. Using Low Level Recording.
3. Using Analog Recording.

10 comments:

RP Singh said...

Very good article and easy to understand........

Kanikaram Kiranpaul said...
This comment has been removed by the author.
Kanikaram Kiranpaul said...
This comment has been removed by the author.
Anonymous said...

very good one, lot of unknown info for me

Anonymous said...

good one..

John Max Van said...

very good info on VO.

Software Testing Expert said...

Good Post about Virtual Object

Anonymous said...

thanks so much, good article, helped alot

QTP Selenium- Prasad said...

Good Post....but we wont use it in realtime..interview point of wise very important...correct me if m wrong..!

Kanikaram Kiranpaul said...

@ Selenium Prasad - You are right in real time we won't really use Virtual Objects much but from an interview perspective this is very important. I really wonder why in interview people would ask...

Post a Comment

/* Tynt Insight tracker ----------------------------------------------- */