All you need to know about Object Spy in UFT

As the name suggests Object Spy in UFT is a utility to view runtime test object properties. It also displays what type of operations can be performed on a Test Object. You can also perform various other operations using object spy that I will also discuss in this article.

To open the Object Spy Utility click on the Hat icon in the toolbar. In the Object Spy window and click on the pointing hand button. Hover the mouse over the object or click on it in your application.

Object Spy in UFT

The above image shows the object properties of the “User Name” field of the Mercury Tour Demo application. You can retrieve the required property value by selecting it on the Object Spy window. The selected property will be displayed in the Selection field as shown above.
If you are doing descriptive programming and you are not getting enough properties in the main identification properties in that scenario you can also use native properties to identify the object.
Select the Native radio button to view the native properties of the required test object. The native properties would be displayed.
Object Spy has the following four buttons to perform the following actions.
Buttons Descriptions
ObjSpyButton Pointing hand to point on an object to view its properties
Highlight Highlight the selected object in the Test Application
AddObject-To-Repositor Add the Test Object to the Object Repository
Copy-To-ClipBoard Copy the Test object properties to the Clip Board
Click on the Operations Tab to get the list of supported operations that can be performed on the test object. For example, a Set operation can be used to set a value in a Textbox, SetSecure can be used to set an encrypted password in a textbox.
If you are using the UFT14.01 onwards version, you would be able to copy-paste properties from Object Spy to the UFT editor without closing the Object Spy Dialog box.

The copy to clipboard option is very handy and mostly use by automation tester if they are doing descriptive programming. You can easily paste the identification properties to a text file and quickly create the descriptions to identify the object. It helps you out to expedite the script development. For example, the following are the identification properties of the User Name field of the Mercury Tour Demo application.

Object Identification Properties
User Name “Class Name:=WebEdit”,





“default value:=”,



“html id:=”,

“html tag:=INPUT”,




“max length:=524288”,














“width in characters:=10”,


Recommended Posts

Leave a Reply