Virtual Objects

Relevant for: GUI tests and scripted GUI components

Your application may contain objects that behave like standard objects but are not recognized by UFT. You can define these objects as virtual objects and map them to standard classes, such as a button or a check box. UFT emulates the user's action on the virtual object during the run session. In the run 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 or scripted component, the Web site matches the coordinates of the click on the bitmap and opens the destination page.

To enable UFT 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 or scripted component, UFT clicks the bitmap in the area defined as a virtual object so that the Web site opens the correct destination page.

Virtual object collections are groups of virtual objects that are stored in the Virtual Object Manager under a descriptive name. For details, see Virtual Object Manager Dialog Box.

The virtual object collections displayed in the Virtual Object Manager are stored on your computer and not with the tests or scripted components that contain virtual object steps. This means that if you use a virtual object in a step, the object is 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 <UFT installation folder>\dat\VoTemplate folder (or individual .vot collection files within this folder) to the same folder on the destination computer.

Note: UFT does not support virtual objects for analog or low-level recording. For details on low-level recording, see Creating tests or components.