Wednesday, March 2, 2011

Virtual Objects

Virtual Object:
Virtual object enable you to create and run tests on objects that are not normally recognized by QuickTest.
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.
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. A virtual object collection is a group of virtual objects that is stored in the Virtual Object Manager under a descriptive name.

1. QuickTest does not support virtual objects for analog or low-level recording.
2. During a run session, make sure that the application window is the same size and in the same location as it was during recording, otherwise the coordinates of the virtual object relative to its parent object may be different, and this may affect the success of the run session.
3. You can use virtual objects only when recording and running a test. You cannot insert any type of checkpoint on a virtual object, or use the Object Spy to view its properties.
4. To perform an operation in the Active Screen on a marked virtual object, you must first record it, so that its properties are saved in the test object description in the object repository. If you perform an operation in the Active Screen on a virtual object that has not yet been recorded, QuickTest treats it as a standard object.

Virtual Object Wizard:

Welcome Screen:
QTP Virtual Object Wizard
Virtual Object Wizard in QTP

Map to standard class screen:
QTP Virtual Objects mapping to standard class
Virtual Objects - Map to a Standard Class in QTP

Mark virtual object screen
QTP Mark Virtual Object
QTP - Mark Virtual Object

Object configuration screen:
QTP Virtual Object Configuration
Virtual Object - Object Configuration

Save virtual object screen:
QTP Saving Virtual Objects
Saving Virtual Object in QTP

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.
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.

Disable Vitual object recognition
Disabling recognition of Virtual objects in QTP.

No comments:

Post a Comment

Please leave your comment here...