QTP tutorial for beginners-QTP and Identifying Objects like an Expert 4

At this point, we now know that a test object is added to the Object Repository. It will then classify the object and examine its properties. This process is called Identifying Identification Properties. QTP has a predetermined set of properties for every class it identifies. Using the car analogy, we know that each car (object) has wheels and a steering wheel (identification properties).

In order to identify identification properties, QTP first looks at an object’s Mandatory Properties. These are specified properties which help identify an object. In the video, we chose the link element from the web environment. The mandatory properties that appeared were html tag and text. When added to the Object Repository it identified these properties as A (html tag) and Answer (text).

Second, QTP looks at its Assistive Properties. These are properties that QTP identifies only if the mandatory properties are not enough to create a unique description. From the video, we saw that none of the link element objects had assistive properties. The same goes with the page object and browser object.

If neither the mandatory nor assistive properties are enough to identify a unique object, QTP will look at Ordinal Identifiers. By default, the ordinal identifier assigns a numerical value that indicates its order and is accurate only in relation to other objects that have the same values as specified in the mandatory and assistive property lists. This is considered the easiest but most dangerous way of identifying an object since changed in the composition of an application can cause a value to change, even though the object remains the same. Therefore, there is a huge possibility that an object could not be identified correctly.

In the video, two applications, Google and Yahoo were opened and added to the object repository. Yahoo yielded a creation time of 0 while Google a creation time 1 meaning, the Yahoo browser was created first followed by the Google browser. When a test run was done, both identifiers identified the same browser. Therefore, using the ordinal identifier is actually not an ideal choice and should only be used as a last resort.



Take a second to Tweet our site link. We appreciate your support!

  • Pingback: QTP tutorial-Object identification like an expert part 3 -QTPtutorial.net |()

  • Susan Welch

    HI, I’m looking for part 5 in your series of “Identifying objects like an expert” please. Where is that one located? Unfortunately, I am unable to find it.

    • QTPtutorialnet

      We didn’t finish it. So many things to do and there are only 24 hours in a day. We will have that done for your Susan!

Pin It on Pinterest

Clef two-factor authentication