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.
Buttons | Descriptions |
Pointing hand to point on an object to view its properties | |
Highlight the selected object in the Test Application | |
Add the Test Object to the Object Repository | |
Copy the Test object properties to the Clip Board |
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”,
“abs_x:=1028”, “abs_y:=489”, “acc_name:=”, “class:=”, “default value:=”, “disabled:=0”, “height:=22”, “html id:=”, “html tag:=INPUT”, “innerhtml:=”, “innertext:=”, “kind:=singleline”, “max length:=524288”, “name:=userName”, “outertext:=”, “pattern:=”, “placeholder:=”, “readonly:=0”, “required:=False”, “role:=”, “rows:=0”, “title:=”, “type:=text”, “value:=”, “visible:=True”, “width:=87”, “width in characters:=10”, “x:=524” |