Object Spy Dialog Box

Relevant for: GUI tests and components

This dialog box enables you to view the native properties and operations of any object in an open application, as well as the test object hierarchy, description properties, and operations of the test object that UFT uses to represent that object.

You can also check if an object exists in a repository associated with your action or in a component's application area, add the selected object to the local object repository (or to a shared object repository if you are using the Object Spy from the Object Repository Manager), and highlight an object in the application.

Note: To view and add Web objects running in Safari on a Remote Mac computer, use the Remote Object Spy (Tools > Remote Object Spy).

Most of the information below is relevant for the Remote Object Spy as well, as it displays the same information about the objects and provides similar capabilities. However, enabling the Remote Object Spy to capture the object information is a bit different. For details, see Use the Remote Object Spy.

To access
  1. Do one of the following:

    • Ensure that a GUI test or action is in focus in the document pane.
    • In the Solution Explorer, select a GUI test or action node.
  2. Use one of the following:

    • Select Tools > Object Spy.
    • Click the Object Spy toolbar button .
    • In the Record toolbar, click the Object Spy button during a recording session.
Important Information For some technologies, when spying on an combobox or tree-type object, you need to open or expand the object to view the correct properties for the object.
Relevant tasks
See also

Properties and operations for test objects and run-time objects

User interface elements are described below:

Option

Description

Pointing Hand. Turns the mouse pointer into a pointing hand. Use the pointing hand to highlight or click the object whose properties and/or operations you want to view.

  • As you move the pointing hand over the objects in the application, the objects are highlighted in the application (in some environments), and their details are displayed in the Object Spy dialog box.
  • To capture information about a particular object and its parent objects in the Object Spy, click on the object in the application.

Keep on Top. Keeps the Object Spy dialog box in view while spying on an object in your application. (Not relevant for the Remote Object Spy.)

When the Keep on Top button is not pressed, the Object Spy dialog box may be hidden on your screen behind your application. To view the Object Spy dialog box, press the left CTRL key and arrange the windows as needed.

When working with Windows Runtime applications, if you switch to your Windows Runtime application using the SHIFT + Windows key, this option does not work.

Highlight in Application. Highlights the object in the application that corresponds to the test object currently selected in the Object Spy.

Make sure that the application is visible on your screen before you click this button.

Add Object to Repository. Adds the test Object selected in the Spy hierarchy tree to the object repository.

  • If the object is successfully added to the object repository, the repository icon is added to the bottom of the test object icon.
  • When the Object Spy dialog box is opened from UFT or the Object Repository Window, the object is added to the local object repository of the active action or component.
  • When the Object Spy dialog box is opened from the Object Repository Manager, the object is added to the active object repository. This option is disabled when there is no open repository.

Copy description properties to Clipboard. Copies all of the properties and values for the object currently selected in the Object hierarchy tree. You can paste the copied data from the Clipboard into any document.

Enabled only when the Identification radio button is selected in the Properties tab.

The copied properties and values are formatted in standard programmatic description syntax with line breaks between each property-value pair. For example:

                                "Class Name:=Image",
"abs_x:=585",
"abs_y:=573",
"alt:=Specials",
....

This option is useful if you want to:

  • Compare the properties and values of two objects in your application.
  • Copy the relevant strings when creating programmatic descriptions.

For more details on programmatic descriptions, see Programmatic descriptions.

Object hierarchy

Displays the hierarchy of test objects that are related to the object you selected in your application.

  • If an object in the hierarchy already exists in a repository associated with the active action or component, a repository icon is displayed in the lower-right corner of the object's icon.
  • To view properties, values, or operations for another test object in the Object hierarchy tree, select that test object in the tree.
  • While an object is highlighted in the application, test object classes are displayed in the Object hierarchy tree, but test object names are not. Test object names (such as Atlanta to Las Vegas and Specials in the image shown above) are displayed only after clicking the object to capture the information in the Object Spy.
Properties tab

Select the Native or Identification radio button to display the native properties and their values, or the test object description properties and values of the run-time object associated with the selected test object in the Object hierarchy tree.

  • Properties. Displays the identification or native property names for the test object that is currently selected in the Object hierarchy tree.
  • Values. Displays the identification or native property values of the relevant object in the application.
Operations tab

Select the Native or Test Object radio button to display the native operations or test object operations, and their corresponding syntax, for the test object that is currently selected in the Object Spy test Object hierarchy tree, or the run-time object associated with it.

Selection

The content in this box differs depending on which tab is displayed above it.

Properties tab: Displays the property name or value that was most recently clicked.

Operations tab: Displays the syntax of the most recently clicked operation.

To copy the text that is displayed in this box to the Clipboard, highlight the text and press Ctrl+C or right-click the highlighted text and select Copy.

Description

Provides a description of the most recently clicked operation, when available.