When qtp fails to identify any object uniquely with help of learned description of the object it uses smart identification.Normally qtp uses its learned description for identifying an object & this learned description is sufficient to identify any object uniquely as it does not frequently but anyhow if any point of time qtp unable to identify object using its description or it finds more than one object, then it use smart identification techniques.
The Smart Identification Technique uses two properties :
- Base Filter Properties. The most fundamental properties of a particular test object class; those whose values cannot be changed without changing the essence of the original object. For example, if a Web link’s tag was changed from <A> to any other value, you could no longer call it the same object.
- Optional Filter Properties. Other properties that can help identify objects of a particular class. These properties are unlikely to change on a regular basis,but can be ignored if they are no longer applicable.
Smart Identification Process :
QTP initiate smart identification Process when it is not able to identify any object during run session or more than one object with same description.Th following process is followed to identify object.
- As soon as smart identification initiate qtp forget all learned description based on mandatory & assistive properties & ordinal identifiers & create a new object candidate list containing the object which matches all of the defined base filter properties.
- QuickTest filters out any object in the object candidate list that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list.
- QuickTest evaluates the new object candidate list:
- If the new object candidate list still has more than one object, QuickTest uses the new (smaller) object candidate list to repeat step2 for the next optional filter property in the list.
- If the new object candidate list is empty, QuickTest ignores this optional filter property, returns to the previous object candidate list, and repeats step2 for the next optional filter property in the list.
- If the new object candidate list is empty, QuickTest ignores this optional filter property, returns to the previous object candidate list, and repeats step2 for the next optional filter property in the list.
- If the new object candidate list is empty, QuickTest ignores this optional filter property, returns to the previous object candidate list, and repeats step2 for the next optional filter property in the list.If the object candidate list contains exactly one object, then QuickTest concludes that it has identified the object and performs the statement containing the object QuickTest continues the process described in steps2 and3 until it either identifies one object, or runs out of optional filter properties to use.
If, after completing the Smart Identification elimination process, QuickTest still cannot identify the object, then QuickTest uses the learned description plus the ordinal identifier to identify the object.If the combined learned description and ordinal identifier are not sufficient to identify the object, then QuickTest stops the run session and displays a Run Error message.
Reference : QTP help.