Sunday, 26 July 2015

QTP OBJECT IDENTIFICATION


OBJECT IDENTIFICATION


Object identification:
                   Object identification is based on four types of properties and an ordinal identifier

Types of properties:
                                      1. Mandatory Properties
                                      2. Assistive properties
                                      3. Base-Filter Properties
                                      4. Optional Filter properties
A test engineer can specify the list of mandatory properties, List of assistive properties, List of base filter properties, list of optional filter properties and an ordinal identifier.




QTP learns the information in the following in case only normal brain:
First of all the QTP will learn all the mandatory properties at a time and then think weather these properties are sufficient to identify the object uniquely. If it feels sufficient then it will stop learning otherwise it will learn the first assistive property and once again stops and thinks weather these properties are sufficient to identify the object uniquely. If it feels sufficient then it stops learning otherwise learns the second assistive property and checks weather these properties are sufficient or not. This process continuous till the QTP satisfies or up to the end of the assistive properties list. At the end of the assistive properties list also if it feels not satisfied then it will finally learn the ordinal identifier and stops learning.

QTP learns the information in the following way in case of smart brain also:
                   While learning the mandatory properties along with them it will learn the base filter properties, optional filter properties and stores them in the secret place.
                   It considers the mandatory properties only and check whether these properties are sufficient to identify the object uniquely, And repeats the above process.

Note: In the above learning process except base filter properties and optional filter properties all the remaining information learnt will be stored in the object repository.

QTP will use the information in the following way to identify the object during execution:
                   First of all QTP will use all the properties present in the object repository except ordinal identifier and try to identify the object. If at all the object is not identified then it will forget about all these properties and freshly enters in to the secret place.
                   QTP will consider all the base filter properties and try to identify the object and forms a list of all the objects that are matched with the base filter properties.
If the list contains only one object then that is the object otherwise it will take the support of first optional filter property and try to match with all the object present in the list and forms a new list of all the objects that are matched with that property and then check whether the list is containing one object or more than one object. If the list is containing more than one object then it will consider the second optional filter property and repeats the whole procedure till the list contains on object or up to the end of the optional properties list.
At the end of the optional filter properties list also if the list is containing more than one object then it will finally go to the object repository and check whether the ordinal identifier is available or not. If at all the ordinal identifier is available it will identify the object roughly using that otherwise HANDSUP.
Ordinal Identifiers:
                    There are three 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 a sequence of numbers from 0,1,2,3 based on the sequence of the objects located in AUT.

2.Index:
                   If at all the index is selected as an ordinal identifier than the QTP will generate the numbers from 0,1,2,3…. Based ob the sequence of the programs of the objects.




3. Creation Time (especially for web pages):
                   If at all creation time is selected as an ordinal identifier the QTP will generate the number from 0, 1, 2, 3… based on the loading time of the web pages

Smart Identification:
          Whenever the QTP is unable to identify the objects with the help of the properties present in the object repository then the special mechanism provided by QTP to identify the object smartly with some other properties is known as smart identification.

Navigation for Object identification Configuration:
·         Activate the menu item tools
·         Select the option object identification
·         Select the desired environment
·         Select the desired object type
·         Specify the desired list of mandatory properties and assistive properties with the help of corresponding add/ remove buttons
·         Select the ordinal identifier
·         Smart identification
·         Select the check box enable smart identification
·         Click on configure button
·         Specify the desired list of base filter properties and optional filter properties with the help of add/remove buttons
·         Click on OK
·         Click once again on Ok



No comments:

Post a Comment