Object Identification in QTP

This article explains the details about the object identification in QTP.
Object identification is the crucial part of a test case. QTP doesn't record the object properties arbitrarily, rather there is a configuration that QTP follows while recording a selected combination of properties. These properties can be changed in case the application requires a different combination.
The combination can be changed by navigating to Tools > Object Identification. There are 3 different properties that QTP uses for object identification.
Mandatory Properties: These are all the properties always captured and saved for the object even if it's not possible to identify some of the objects without anyone of these properties. Ex: html tag, name and type
Assistive Properties:These properties are used if the mandatory properties are not enough to uniquely identify the objects.  QTP adds the assitive properties one by one, in order specified until the object can be uniquely identified. Ex: outertext
Ordinal Identifiers: If,after using all mandatory and assitive properties, the selected objects still can't be uniquely identified, QTP then uses ordinal identifier. 
User Defined Objects:QTP uses the name of the Window to identify the object type.In case the application doesn't use Standard Window class QTP might be unable to identify the Object. Ex: Checkbox
Assume that the check box is not a standard window object. We can make it as a Windows object by using the following mechanism.
01. Navigate to Tools > Object Identification window.
02.Then select the option "Standard Windows" from Environment dropdown box.
03. The select "WinCheckBox" option from "Test Object Classes" table.
04. Then click on "User Defined" button and observe that a new window is opened.
05. Click on the hand icon to read the object and then click on the checkbox in web page needs to be added.
06. Then map it to "CheckBox" and then click on "OK" button.
07.Once mapped QTP will thereafter be able to identify the object as a WinCheckBox.
SHARE

About அமரகோசம்

    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment