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.
Introduction to Object Spy?
I am an inbuilt tool which comes bundled with UFT, I help automation testers with following capabilities:-
You can find my brothers in Selenium.
- Highlight the object. (How to do highlight in Selenium)
- Adding objects to Object repository.
- Check the properties of object (also you copy that to clipboard).
- Check what all the operations that can be performed on the object.
How to launch me?
- From menu bar icon
2. Tools -> Object Spy
3. Resources -> Object Repository Manager
4. Resources -> Object Repository
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.
This feature of mine will be disabled until and unless no object is added to my UI.
One’s the object is added ill help you highlight that particular object in the application (with a blink around that object.)
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.
Add object to object repository (OR):-
Using this feature you can add the selected object to object repository.
- 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.
Copy to clipboard:-
Click on this button to copy all the object properties in ,name:=value pair combination.
Paste them in any of the editor say notepad, to employ in automation.
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.
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”.
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.
You can find the same native methods/properties for link in my UI.
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 .