Learn Object Spy in UFT

Hello Friends!! My name is object spy. You can find me in my new avatar of hat and goggles in UFT. Today I am going to tell you about myself.

Object spy in UFT
My new look 
Introduction to Object Spy?

I am an inbuilt tool which comes bundled with UFT, I help automation testers with following capabilities:-

1. Highlight the object. (How to do highlight in Selenium)
2. Adding objects to Object repository.
3. Check the properties of object (also you copy that to clipboard).
4. Check what all the operations that can be performed on the object.
Object Spy UFT
Object Spy UFT
How to launch me?

1.       From menu bar icon

Launch object spy from menu bar
Launch from Menu Bar
2.       Tools -> Object Spy

Object Spy in Tools
Object Spy launch from Tools
3.       Resources -> Object  Repository Manager

Launch object spy object repository manager
Launch from object repository manager
4.       Resources -> Object Repository
Launch Object spy from local OR
Launch from local OR
Understand my UI?

Hand: – This is the point where you can start my interaction with the objects, just click it and move my hand over the required object and ill provide you the properties which is consumed by UFT in object identification. Moreover you can press CTRL key to hide my hand to perform normal operations of mouse.
Press CTRL key in object spy UFT
Working with hand icon in object spy
This feature of mine will be disabled until and unless no object is added to my UI.
Highlight button is disabled
Highlight is disabled 
Highlight button enabled in object spy
Highlight/add to OR/ Copy to clipboard are enabled one’s object is added
One’s the object is added ill help you highlight that particular object in the application (with a blink around that object.)

Note: – 
Incase I am not able to find the object due to nonexistent of object or properties are not unique, I’ll generate an error message like below.

Highlight failure message UFT
Error message for non exiting object in application 
Add object to object repository (OR):
Using this feature you can add the selected object to object repository.

Add objects to OR in object spy
Add objects to OR

  • Only the selected object from the hierarchy will be added to OR
  • One’s that object is added to OR, this button will become disabled and small bucket like symbol will appear next to the object.
  • Object will be added to local Object repository incase i am launched from Local object repository or from menu bar icon or from tools options. I will add object to shared OR only incase i am launched from object repository manager.

Adding object to OR from object spy
Object added to OR 

Copy to clipboard:-
Click on this button to copy all the object properties in ,name:=value pair combination. 
Copy to clipboard in object spy
Copy to clipboard in Object Spy

Paste them in any of the editor say notepad, to employ in automation.

Copy object properties in object spy
Copied object properties from object spy
This feature is important while working with descriptive programming(DP) in UFT, as you can utilize this properties in DP.

Keep me on Top while spying:-
You can keep me on the top of the application while hand button is active or make me invisible while object spy is active.

Keep object spy on top while spying
Keep object Spy in top of Application while spying 
I am really powerful, as when I am active, you can’t perform any operation in UFT, so you need to close me before you can work on UFT or Object repository manager.

How to work with me:

Launch me -> click on hand -> hover over the object with which you want to work -> select it -> Try to highlight (to cross check that we have captured the correct object) -> add to OR / copy to clipboard/ check properties or operations that can be performed on object

  • Under properties: – we can select identification and native properties/operations.
  • Identification Properties are properties that UFT uses to identify objects in application, these come as name value pairs like “title: =HOME”.

Object Spy identification properties dialog box
Object spy Identification Properties

When to use Native properties/operations?

Sometimes my identification properties are not enough to fulfil many automation requirements. To deal with these problems you can leverage ‘Native Properties’ of the application under test.

You can retrieve native properties value for an object using .object

Below example shows the native properties/methods of link object.
Native method of link in UFT
Working with Native properties and Methods

You can find the same native methods/properties for link in my UI.

Link native methods in UFT
Link Native methods

  • Native properties are properties as created by the creator of object, e.g. Microsoft is creator for IE explorer objects.
  • Identification properties are subset of native properties.
  • We can use .object to retrieve Native Properties, utilize native operations, and manipulate native properties.

Hope this crisp introduction about myself, help You know and understand my usage in UFT. Do share your comments or feedback below . Will be happy to hear from You. Bye bye J

2 replies on “Learn Object Spy in UFT”

Leave a Reply

Your email address will not be published. Required fields are marked *