Viewing GUI Object Properties - WinRunner

When WinRunner learns the description of a GUI object, it looks at the object’s physical properties. Each GUI object has many properties, such as “class,” “label,” “width,” “height”, “handle,” and “enabled”. WinRunner, however, learns only a selected set of these properties in order to uniquely distinguish the object from all other objects in the application.

Before you create the GUI map for an application, or before adding a GUI object to the GUI map, you may want to view the properties of the GUI object. Using the GUI Spy, you can view the properties of any GUI object on your desktop. You use the Spy pointer to point to an object, and the GUI Spy displays the properties and their values in the GUI Spy dialog box.

You can choose to view all the properties of an object, or only the selected set of properties that WinRunner learns.

In the following example, pointing to the Agent Name edit box in the Login window of the sample flight application displays the All Standard tab in the GUI Spy as follows:

Viewing GUI Object Properties
To spy on a GUI object:

  1. Choose Tools > GUI Spy to open the GUI Spy dialog box.
  2. To spy on a GUI object

    By default, the GUI Spy displays the Recorded tab, which enables you to view the properties of standard GUI objects that WinRunner records.

    • To view all properties of standard windows and objects, click the All Standard tab.
    • To view all properties and methods of ActiveX controls, click the ActiveX tab (only if the ActiveX Add-in is installed and loaded).
  3. Select Hide WinRunner if you want to hide the WinRunner screen (but not the GUI Spy) while you spy on objects.
  4. Click Spy and point to an object on the screen. The object is highlighted and the active window name, object name, and object description (properties and their values) appear in the appropriate fields.
  5. Note that as you move the pointer over other objects, each one is highlighted in turn and its description appears in the Description pane.

    In the following example, pointing to the Agent Name edit box in the Login window of the sample flight application displays the Recorded tab in the GUI Spy as follows:

    GUI Spy

  6. To capture an object description in the GUI Spy dialog box, point to the desired object and press the STOP softkey. (The default softkey combination is CTRL LEFT + F3.)
  7. If you selected Hide WinRunner before you began spying on objects, the WinRunner screen is displayed again when you press the STOP softkey.

    • In the Recorded and All Standard tabs, you can click the Copy button to copy the physical description of the object to the Clipboard. Clicking Copy in the previous example pastes the following physical description to the Clipboard:

    {class: "edit", attached_text: "Agent Name:"}

    • When you highlight a property in the ActiveX tab, then if a description has been included for this property, it is displayed in the gray pane at the bottom. If a help file has been installed for this ActiveX control, then clicking Item Help displays it.

    In the following example, pointing to the “Flights Table” in the Visual Basic sample flight application, pressing the STOP softkey and highlighting the FixedAlignment property, displays the ActiveX tab in
    the GUI Spy as follows:

    GUI Spy

  8. Click Close to close the GUI Spy.

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

WinRunner Topics