Isn't it a very frequently asked question in qtp - "why use DP over object repository"?
Here we will look into few scenarios where Descriptive Programming (DP) is more suitable to use then OR.
Scenario 1. - you need to count how many search result are returned when you search a particular search criteria. For example, you want to see how many
qtp/selenium/agile/java jobs are posted on a job portal in last 2 days! you then want to select all and apply.
Because you dont know in advance how many checkboxs will be there on search result, you cant use object repository.
Using DP (childobject), you can easily handle this scenario.
Scenario 2. - you are working on automation of an application where latest code is not deployed yet. To use OR, you must wait untill application is up and running. But if know the object descriptions, you can continue to create you automation scripts using DP.
Scenario 3. - your application is having 10 pages and every page has 2 same button i.e. "Previous Page" and "Next Page". So if use OR, it will add 2 objects for each page i.e. total 20 object for 10 pages. Instead of having 20 duplicate objects and making our OR unnecessarily 'bulky, we can simply write 2 DP objects.
Scenario 4. - Descriptive Programming is very useful for tricky objects like blotter grids, auto-hiding menus and embeded/nested objects and advanced string manipulations.
Scenario 5. - It might not sound a great example but suppose your qtp server is crashed and you can not open/access qtp OR for a while (1-2 days). If you use OR, you have wait until server is back, but you can continue to work if you use DP (advanced users).
Hope above are enough reasons to answer why to use DP at all!!
Please share your scenarios/views on this.