Relevant for: GUI tests and components
Note: If you are working with Web applications running in Safari on a remote Mac computer, see Use the Remote Object Spy.
Open your application to the page containing the object on which you want to spy.
In the Object Spy, click the pointing hand button and then mouse over or click an object in your application. In most environments, as you mouse over objects in your application, the Object Spy highlights the object it identifies and displays the relevant information in the Object Spy, according to the options you selected in the Object Spy dialog box.
Note: If UFT does not recognize your objects in the correct location, check to see that you are viewing the page at 100%, and are not zooming in or out of the page.
For example, if you view the page at 90% or 120%, you may be required to click or select an area to the left or the right of the actual object in order to recognize it.
When you click an object in your application, the Object Spy captures its information, and you can:
Change the selected radio button or tab in the Object Spy to view additional details.
View properties, values, or operations of other test objects currently displayed in the Object hierarchy tree, by selecting that test object in the tree.
Highlight the object in the application, by clicking the Highlight in Application button .
Note: The Object Spy does not support Insight test objects.
After clicking an object you can add it (or any other object in the Object hierarchy tree) to the object repository using the Add to Repository button .
If an object in the Object hierarchy tree 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.
After spying on a specific object, you can add the object (or any of its parent objects) directly to a test or component. From the object hierarchy in the Object Spy dialog box, drag the object to the relevant step in your test.
This option is available only for the Editor.
Note: You cannot add an object to a test or component via the Object Spy when recording.
UFT automatically creates a step with the appropriate object hierarchy and adds the test object to the local object repository if it is not already present in the object repository.
Note: You may still need to modify the test object method, as UFT adds the default method for the object when dragging from the Object Spy.