You can teach QuickTest to recognize any area of your
application as an object by defining it as a virtual object. Virtual objects enable you to
record and run tests on objects that are not normally recognized by QuickTest.
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.
About Learning Virtual Objects
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 record a test on 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
record a 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 a
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. A virtual object collection is
a group of virtual objects that is stored in the Virtual Object Manager under a
descriptive name.
No comments:
Post a Comment