Object Identification: -
QTP’s object identification concept is based on 4 types of properties and an ordinal identifier.
Types of properties:
• Mandatory properties
• Assistive properties
• Base Filter properties
• Optional Filter properties
A test engineer can specify list of mandatory properties, assistive properties, base filter properties, optional filter properties and ordinal identifier.
QTP will learn the information in the following way: -
First of all QTP will learn all the specified mandatory properties and then think whether these properties are sufficient to identify the object uniquely. If it feels sufficient it will stop learning. Otherwise it will learn the 1st assistive property. Then once again think whether all the properties are sufficient for identifying the object uniquely. If at all it feels sufficient it will stop learning otherwise it will learn the 2nd assistive property and then think again whether all these properties are sufficient for identifying the object uniquely. This process continues till the QTP get satisfied or up to the end of the assistive properties list.
If still QTP feels not satisfied then finally it will learn the ordinal identifier. All the properties learnt during this process will be stored in the object repository.
If at all the smart identification option is selected then the QTP will learn the base filter properties, optional filter properties along with the mandatory properties and stores the base filter properties and optional filter properties separately and secretly and then continues with the same procedure as above.
QTP uses the learnt information in the following way to identify the object: -
First of all QTP will use all the properties present in the object repository except ordinal identifier and tries to identify the object. If it fails then it will enter into the smart brain by forgetting about all the properties present in the object repository and then considers all the base filter properties and try to match with all the objects in the AUT. The objects that are matched with all these properties are formed as a list and if the list is containing only one object then that is the object. Otherwise it will take the support of first optional filter property and try to match with the objects in the list. Whatever the objects that are matched with this property will be formed as a new list and if the list contains only one object then that is the object. Otherwise it will take the support of 2nd optional filter property and try to match with all the properties in the new list. This procedure continues till the list contains one object or up to the end of the optional filter properties list.
If still the QTP is unable to identify the object then it will go to the object repository and if at all the ordinal identifier is available in the object repository then it will identify the object roughly using the ordinal identifier.
Smart Identification: - Smart Identification is a mechanism provided by QTP, which is used for identifying the objects even though some properties are dynamically changed.
Ordinal Identifiers: - There are 3 types of ordinal identifiers.
1. Location
2. Index
3. Creation Time
1. Location: If at all the Location is selected as an ordinal identifier then the QTP will generate the sequence of numbers from 0,1,2,… based on the sequence of the objects located in the application.
2. Index: If at all the index is selected as an ordinal identifier then the QTP will generate the sequence of numbers from 0,1,2,… based on the sequence of the programs of the corresponding objects.
3. Creation time: If at all the creation time is selected as an ordinal identifier then the QTP will generate the sequence of numbers from 0,1,2,... based on the loading time of a web page.
Post a Comment