Defining a Virtual Object - WinRunner

Using the Virtual Object wizard, you can assign a bitmap to a standard object class, define the coordinates of that object, and assign it a logical name.

To define a virtual object using the Virtual Object wizard:

  1. Choose Tools > Virtual Object Wizard. The Virtual Object wizard opens.
    Click Next.
  2. In the Class list, select a class for the new virtual object.
  3. To define a virtual object using the Virtual Object wizard

    If you select the list class, select the number of visible rows that are displayed in the window. For a table class, select the number of visible rows and columns.

    Click Next.

  4. Click Mark Object. Use the crosshairs pointer to select the area of the virtual object. You can use the arrow keys to make precise adjustments to the area you define with the cross hairs.
  5. Press ENTER or click the right mouse button to display the virtual object’s coordinates in the wizard.

    To define a virtual object using the Virtual Object wizard

    If the object marked is visible on the screen, you can click the Highlight button to view it. Click Next.

  6. Assign a logical name to the virtual object. This is the name that appears in the test script when you record on the virtual object. If the object contains text that WinRunner can read, the wizard suggests using this text for the logical name. Otherwise, WinRunner suggests virtual_object,virtual_push_button, virtual_list, etc.
  7. Virtual object wizard

    You can accept the wizard’s suggestion or type in a different name. WinRunner checks that there are no other objects in the GUI map with the same name before confirming your choice. Click Next.

  8. Finish learning the virtual object:
  • If you want to learn another virtual object, choose Yes and click Next.
  • To close the wizard, choose No and click Finish.

Virtual object wizard

When you exit the wizard, WinRunner adds the object’s logical name and physical description to the GUI map. The next time that you record operations on the virtual object, WinRunner generates TSL statementsinstead of win_mouse_click statements.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics