QTP Virtual Objects

About Learning Virtual Objects:

  Some other posts that can be very useful on the Virtual Objects In QTP :

Removing-virtual-object-definition In QTP
Virtual-objects-configuration-option In QTP
Understanding-virtual-objects In QTP
Qtp-virtual-objects In QTP



              Your application may contain objects that behave like standard objects but are not recognized by QuickTest. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. QuickTest emulates the user's action on the virtual object during the run session. In the test results, the virtual object is displayed as though it is a standard class object.

For example, suppose you want to test a Web page containing a bitmap that the user clicks. The bitmap contains several different hyperlink areas, and each area opens a different destination page. When you create the test, the Web site matches the coordinates of the click on the bitmap and opens the destination page.

To enable QuickTest to click at the required coordinates during a run session, you can define a virtual object for an area of the bitmap, which includes those coordinates, and map it to the button class. When you run the test, QuickTest clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.


You define a virtual object using the Virtual Object Wizard (Tools > Virtual Objects > New Virtual Object). 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. For more information, see Defining a Virtual Object.


Virtual object collections are groups of virtual objects that are stored in the Virtual Object Manager under a descriptive name. For more information, see Understanding the Virtual Object Manager.


The virtual object collections displayed in the Virtual Object Manager are stored on your computer and not with the tests that contain virtual object steps. This means that if you use a virtual object in a test step, the object will be recognized during the run session only if it is run on a computer containing the appropriate virtual object definition. To copy your virtual object collection definitions to another computer, copy the contents of your \dat\VoTemplate folder (or individual .vot collection files within this folder) to the same folder on the destination computer.


Note: QuickTest does not support virtual objects for analog or low-level recording. For more information on low-level recording, see Creating Tests. 


The below stuff is very important and very frequently used by any QTP programmer in Object identification using QTP.



2 comments:

  1. How to find the coordinate of object.

    ReplyDelete
  2. 1. Descriptive programing is possible for virtual objects, but it require Coordinates of the object.

    ReplyDelete