For any corporate training requirements Please mail To sudhakar@qtpsudhakar.com
Course Name Date Time Duration Type Location
An important update from QtpSudhakar. I stopped giving classroom training in MindQ Systems. I have bigger plans and I want to put an end to regular classroom training because very less people are practicing. From now onwards every session of mine is going to have explanation and practice. Everyone should practice in presence of mine and should go out of classroom with practical knowledge. So I started my own institute AnyTechLabs in Madhapur. Please reach out to +91-8328152362 for course details. Visit AnyTechLabs.com for address details.
Selenium + Cucumber 24th October 7.30 AM IST to 9.00 AM IST 45 Days WeekDay Online

A book "Cracking the QTP interview" authored by Sudhakar.Read More. Buy From FlipKart

Tuesday, March 27, 2012

How to write DP for an object having many objects in its heirarchy?


Suppose I want to do DP for licindia.com where I need to click on the login button. Here the hierarchy captured through Object spy shows as


In this case how should be the DP for clicking on the button?

Beginners will feel difficult when writing descriptive programming.
Here is an example how to write descriptive programming when there are many objects in an object hierarchy.

The basic hierarchy of an object is Browser--> Page --> Object
Some times when you spy on object it shows Browser--> Page -->WebTable--> WebTable-->WebTable-->Object
But in DP you can ignore webtables in the hierarchy and consider Browser--> Page --> Object.
When the hierarchy is like Browser--> Page -->Frame-->WebTable--> WebTable-->WebTable-->Object
Then consider Browser--> Page -->Frame-->Object

A Simple Technique to identify how to write DP when you have confusion in hierarchy level

1.     Add that object to Object Repository 
2.     Identify the hierarchy in OR
3.     Follow the same hierarchy for writing DP


  1. If you're working in the Web Environment, you can totally skip all intermediate objects and only consider the top-most and the bottom-most object and still retrieve the exact same result as you would otherwise. Therefore, saying that:When the hierarchy is like Browser--> Page -->Frame-->WebTable--> WebTable-->WebTable-->ObjectThen consider Browser--> Page -->Frame-->Objectis also equivalent to:Browser--> Page -->Frame-->ObjectBrowser--> Page -->ObjectBrowser--> ObjectHowever, the statement about skipping intermediate objects does not apply to all technologies.

  2. Sudhakar Reddy KakunuriApril 17, 2009 at 10:25 AM

    Yes Anshoo. We can do that.I have given a standard technique to write.