When to use Descriptive programing?

Answer Posted / malar and sandy

Below are some of the situations when Descriptive
Programming can be considered useful:
1. The objects in the application are dynamic in
nature and need special handling to identify the object.
The best example would be of clicking a link which changes
according to the user of the application, Ex. “Logout
<<UserName>>”.
2. When object repository is getting huge due to the
no. of objects being added. If the size of Object
repository increases too much then it decreases the
performance of QTP while recognizing a object.
3. When you don’t want to use object repository at
all. Well the first question would be why not Object
repository? Consider the following scenario which would
help understand why not Object repository

Scenario 1: Suppose we have a web application that has not
been developed yet. Now QTP for recording the script and
adding the objects to repository needs the application to
be up, that would mean waiting for the application to be
deployed before we can start of with making QTP scripts.
But if we know the descriptions of the objects that will be
created then we can still start off with the script writing
for testing

Scenario 2: Suppose an application has 3 navigation buttons
on each and every page. Let the buttons be “Cancel”, “Back”
and “Next”. Now recording action on these buttons would add
3 objects per page in the repository. For a 10 page flow
this would mean 30 objects which could have been
represented just by using 3 objects. So instead of adding
these 30 objects to the repository we can just write 3
descriptions for the object and use it on any page.

4. Modification to a test case is needed but the
Object repository for the same is Read only or in shared
mode i.e. changes may affect other scripts as well.
5. When you want to take action on similar type of
object i.e. suppose we have 20 textboxes on the page and
there names are in the form txt_1, txt_2, txt_3 and so on.
Now adding all 20 the Object repository would not be a good
programming approach.

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where you are storing your script?

627


What is an object repository?

594


how to do the batch testing in test director using manual testing procedure?

1771


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

1574


What are the types of object repository?

573






How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")

1414


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

1427


How to get the format of a webedit class in qtp. How can i know that particular webedit accept what type of format like "mm/dd/yyyy" or "$" or Alphanumeric

1636


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

1561


How to capture all the data of a webtable, weblist and combolist using QTP?

2846


What is synchronization point in QTP?

668


If we put all properties in mandatory and assistive list of Normal Identification, Do we still need Smart?

564


If u r using library files (Instead of Check Points) , How do u do bitmap check ?

1446


What is meant by Output Value in UFT?

556


How to find the path of folder in which the test is saved in qtp?

524