UFT – Smart Identification:
Smart Identification is a mechanism to identify the objects in Object Repository when the normal mechanism fails. It is applicable only for Web Applications. This mechanism is used by UFT to identify objects at Run time. When UFT is unable to recognize objects using the normal method, it goes for the Smart Identification to identify the objects on the application.
It has two types of properties
- Base Property – Basic Property of an Object whose value cannot be changed.
- Optional Filter Property – Other properties which will assist in identifying the objects
Enabling Smart Identification in UFT:
- In UFT Menu, go to Tools –> Object Identification
- Choose Environment and Test Object Class
- Select ‘Enable Smart Identification’ Check box
- Click Configure to choose Base and Optional Filter Properties
- Add Properties
- Go to Object Repository to check if Smart Identification is Enabled
- Verify Check:- To verify that enabled object it working as pet the settings, add object to Object Repository(OR) and check under “Object Properties” ->“Additional Details”->”Enable smart identification” is coming as “True”, in case it is not enabled “Enable smart identification”(ESI) will come as disabled.
Disabling Smart Identification:
- To Disable Smart Identification go to File à Settings à Run
- Select ‘Disable Smart Identification during the run session’ Dialog box
More about Smart Identification:
If Smart Identification is disabled before adding objects, then UFT will not use Smart Identification after enabling it. Therefore Smart Identification should be enabled before adding objects to object repository.
Mechanism of Smart Identification:
HP UFT “forgets” the learned test object description and creates a new object candidate list containing the objects that match all of the properties defined in the Base Filter Properties list. UFT then uses Base Filter Property to reduce the Object Candidate list. And then it starts matching the properties in the optional filter property with the object list to remove the ones whose properties are not matching. The idea is to narrow down only to one object matching some or all of the saved description properties.