Smart Identification of Objects

When ever QTP is unable to idetify the object using the properties defined in the script or in Object Repository, the special machnism to identify the object using other properties is called Smart Identification. Object Idetiifcation concept is basd on 4 types of properties and a ordinal number.
1. Mandatory property
2. Assertive property
3. Base filter property
4. Optional Filter property
QTP will learn the object in the following way

BY NOT SELECTING SMART IDETIFICAITON
(Tools->object identification->uncheck smart identification)
QTP will learn the mandatory properties of an object and check if these properties are sufficient to identify object uniquely. If it is sufficient, then it will stop learning further. Othewise it will learn the first assertive property too and again check whether all these properties are sufficient to identify the objects uniquely. If sufficient, it stops learning. Othewise it learns the remaining assertive properties one by one and checks(after each property is added) whether these properties are enough to identify object uniquely. This process continues till QTP identifies object uniquely or up to the end of assertive properties list. At the end of Assertive properties also, if QTP is unable to identify the object uniquely, then finally it will learn the Ordinal identifier and stops learning.


BY SELECTING SMART IDENTIFICAITON
(Tools->object identification->check smart identification)
1. QTP will learn all the mandatory properties along with them it will also learn Base Filter and Optional Filter properties and store Base Filter Properties and Optional Filter Properties separately away from Object Repository and consider whether the Mandatory properties alone are sufficient to identify the object uniquely. If not sufficient it repeats the same process as above.

2. QTP will use all the properties (Mandatory properties, Assertive properties) present in Object Repository except Ordinal Identifier and try to identify the object uniquely. If it is unable to identify the object, then it will leave all the properties in Object Repository and use the Base Filter Properties, Optional Filter Properties. Consider all the Base Filter Properties at a time to identify the object uniquely (by matching these properties with the entire object present in application) If these properties are matched with more than one object, then it will form a list of all the objects matched and then consider the first Optional Filter Properties. It checks whether these properties are matching with objects present in the list. If this property also is matching with more than one object in the list, then it will form a new list of objects that are matched.Then, it will consider the second Optional Filter Property and check whether this property is matching with the objects present in the new list. If the property is matching with more than one object then once again the new list of objects is formed with all the objects that are matched, This process is continued till the new list contains one object or up to the end of Optional Filter Properties list. If still QTP fails to identify the object, then finally it will check whether Ordinal Identifier is available. If it is available, using that roughly object is identified.
If QTP successfully uses Smart Identification to find an object, the step is assigned a Warning status in the Test Results, and the result details for the step indicate that the Smart Identification mechanism was used. The step still receives a passed status.
If QTP cannot identify the object, then it stops the run session and displays run error message.

No comments: