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.

IDENTIFYING OBJECTS LIKE AN EXPERT PART 3

PITFALLS OF RECORD AND PLAYBACK 1

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

Pin It on Pinterest

Clef two-factor authentication