WHAT IS THE DESCRIPTIVE programming when it is useful? &
when to use this ?

Answer Posted / manish gupta

List few scenarios where Descriptive Programming MUST be
used?

1. For an object which will be used only once or
twice, there’s no need to use the slow, complex Object
Repository. DP should be used.

2. In case the identification properties and values of
an object match more than one object; QTP will throw
an "Object’s description matches more than one of the
objects currently displayed in your application" error (If
OR is used).
DP easily deals with double objects by using the
index property. We can add “Index:=X” to the description
strings (when X is a zero-based counter), and QTP will
point to object #X.
3. Some objects change hierarchies i.e. an object will
appear under a different parent each time (e.g. – a pop-up
which appears under the initiating sub-window). In some
applications, the only way to work with such objects is
with DP.
4. When using an Object Reference in an External
Function, it is difficult to make sure that the relevant
object is being defined in the Calling Action’s Object
Repository or Even if it is defined, does it have the same
Logical Name? Descriptive Programming is the only option
left.




5. Instead of working with a single object at a time,
we can gather all the objects which answer to our
identification properties, and work with them as a
collection.

For Example:- Suppose you are testing Yahoo Website.
After you login, it lists all the mails present in your
inbox with a checkbox for each mail. Using this checkbox
you can select a mail for deletion or for moving it etc.

But when you design your test, you do not know how
many check boxes (mails) will be displayed on the page, and
you cannot, of course, know the exact object description of
each check box. In this situation, you can use a
programmatic description to instruct QuickTest to perform a
Set "ON" method for all objects that fit the description:
HTML TAG = input, TYPE = check box.
6. When testing a “NOT YET DEVELOPED” build, DP must
be used.
7. Size of Object Repository adversely affects the
performance of QTP. Huge OR slows QTP down.

Is This Answer Correct ?    11 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we write winrunner language i.e TSL in QTP tool?

1468


What are the recording modes in wave event?

1530


QTP script is not working on other's machine..

1530


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

2882


Could i know how how to explain keyword driven framework in interview? If any body knows plz send the explanation.

1605






What is reusable action?

592


How can I import environment from a file on disk?

531


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

978


How to find Operating system information using QTP script?

565


How does qtp identify the object in the application?

529


Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.

1759


Can you write a script to check if the folder exists or not?

507


What are the five challenges you faced in QTP?

2749


How you can find the absolute value of the number in qtp?

514


how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance

1422