Object Identification in UFT:-
How UFT identify Objects?
Please refer the workflow first and then try to relate it with the scenario.
|Describe the Workflow adopted by UFT/QTP for object identification.|
You are going for a meeting with a person called John for the first time. You haven’t met him before and only option of recognizing John is the description given by your boss.
Description of John:-
Destination: – Taj (Hotel name.), Blue entry gate.
Hotel location:-Third hotel in Kings Street.
Accessories/height:-Black coat, Blue tie, Ray ban specks, and 6 feet
So here you are like UFT and John is Object. So your task is to find object.
What will be our approach?
Step1: Reaching the destination with the help of hotel name,Taj(Mandatory Property),Blue gate(Assistive Property), and that it is the third hotel in Kings Street as told by your boss (Visual Relation identifier)
Step2: -After reaching hotel, UFT is looking for the Person with black coat, blue tie, 6 feet height (Smart identification), Ray ban (it is dark inside the hotel, thus this property is not used by UFT)
Step3:-Now problem is that there are 2 person which are of same height, wearing black coat , blue tie, now you are stuck, here comes the final shot(Ordinal identifier), you call your boss(we don’t have John phone number J), he tells that he is currently standing right in front of help desk(This is ordinal identifier property called Location).Here you finally found John.
In case you (UFT) is not able to find John (object) so meeting never happened (UFT throws error) and hope your boss is great enough, that this is not affecting your appraisal J.
So basic approach of UFT is to store some identifiers i.e. object properties so that it can be used at Run time, to uniquely identify the object and required action on that object can be performed or testing of the object is possible.We need object Spy to add objects to object repository.
Hope this may have cleared some of your doubts regarding object identification by UFT/QTP.