Thursday, November 4, 2010

CoolTuts - QTP - Object Identification

This concept tells how QTP is identifies while running and recording session.

Object Identification in Running session

In Normal or Low level recording QTP stores object information in the object repository. QTP script consists of the object class, object name, operations, and values.

While Running the scripts QTP will see the class, object name in the script and it searches the same object name in the object repository. If that name exists in the object repository then QTP will identify the object in the application using recorded properties in the object repository.

To change the object identification in QTP, select
Tools > Object Identification

Using Object Identification, you can
1. Configure the properties for each class
2. Selecting the Ordinal Identifier
3. Configure the smart identification
4. Creating user defined classes

In object Identification Dialog box you can find list of classes. For every class you can find pre-configured Mandatory and assistive properties.


  1. Mandatory properties -- Properties that QTP always learns for a particular test object classes.
  2. Assistive properties --- Properties that QTP learns only if the mandatory properties are sufficient to create a unique description. If several assistive properties are defined for an object class, then QTP learns one assistive property at a time and stops as soon as it creates a unique description for the object.
  3. Ordinal Identifier--- If the combination of all defined mandatory and assistive properties is not sufficient to create a unique test object description, Quick Test also records the value for the selected ordinal identifier.

There are two types of ordinal identifiers:

  • Index - indicates the order in which the object appears in the application code relative to other objects with an otherwise identical description.
  • Location - Indicates teh order in which the object appears within the parent window, frame, or dialog box relative to other objects with an otherwise identical description. Values are assigned from top to bottom, and then left to right.
  • Web Browser object has the third ordinal identifier type:
    CreateTime - Indicates the order in which the browser was opened relative to other open browsers with an otherwise identical description. Each test object class has a default ordinal identifier selected.



No comments:

Post a Comment