Search This Blog

Monday, December 20, 2010

How QTP identifies objects ???


How QTP identifies objects ???

QTP uses human like methods to identify any object. How we identify our friends/relatives????? Have you ever thought what process we follow to identify & remember any object in real world?....OK its rather simple as it seems when we see anything first time our mind remember some unique properties of this object….just like when I first saw Eiffel Tower I remember its design, Place,Colour,Height etc.So next time when I will see this my brain will use that information as repository of properties & check if any property of that building matches with same object…if both of the properties matches I will recognize this building as Eiffel Tower.

Some time you have experienced that you teach a kid A for Apple. How he remember Apple ? He identifies that apple is red colour fruit so when you show him some other red colour fruit look like apple he gets confused. Now later on when he retires & learns more properties of Apple on showing another fruit with same/different properties he identifies Apple successfully.

Now process of identifying objects might me clear in your mind same way QTP behaves like human when QTP records any object its captures its properties with its logical name & Physical description.i.e. Name, URL, html id etc & stores them in its object repository (Local/Shared), this object is save as Test Object. These properties are not dependent on location in AUT so even though in successive builds if your objects change location in AUT your test will not fail. When we run our test qtp checks for same objects which it stores in its repository in AUT & identify them using its properties stored in repository.

QTP uses following properties of Test Object to identify.

  1. Mandatory Property
  2. Assistive Property
  3. Ordinal Identifier
  4. Smart Identification
We will discuss these properties in detail in my next post….

No comments:

Post a Comment