what is descriptive programming in QTP? How can be done?

Answers were Sorted based on User's Feedback



what is descriptive programming in QTP? How can be done?..

Answer / prasad

descriptive programming in QTP means whenever qtp facing
dificulty with obj identification then we will go with
regular exp or desc prog it means identifying obj unique
prop from the script itself.
ex:vbwindow("").vbedit("attached text:=username").set cdbjd

Is This Answer Correct ?    61 Yes 18 No

what is descriptive programming in QTP? How can be done?..

Answer / mallikharjun bhavanam

descriptive programming in QTP means when there is no
object in object repository for that object wehave to write
decriptive programming to add the properties of the object
which is not there in the oblect repository.
you can describe an objectdirectly in a test statementby
specifying property:= value pairs describing the object
insted of specifying an object's logical name.
syntax
testobject
("propertyname1 :=propertyvalue1","...","propertynamex :=pro
pertyvaluex").

Is This Answer Correct ?    42 Yes 13 No

what is descriptive programming in QTP? How can be done?..

Answer / vijendra

Writing the scripting even though the objects are not
existing in the object repository(Those may be at
development level) it occurs based on the prototypes.
For script creation we use description.create
ex: set mywindow=description.create
mywindow("text").value=login

Is This Answer Correct ?    21 Yes 8 No

what is descriptive programming in QTP? How can be done?..

Answer / ravi

It is something like instructing the QTP to perform
operations on objects without refering to the Object
Repository. To do this we provide QTP with a list of
properties and Values that QTP can use to identify the
Object on which we want to perform the operations.

There are basically 2 ways

1. We can list the set of properties and Values that
describe the object directly in the statement

Propertyname:=Property Value, --------, PropertynameN
N:=PropertynameN

2. Using Descriptive Object:

Here we do create a Descrition Object and add the property
name and it's Valuse to the Description Object. We pass
this description object to the QTP statement.

Set < Var name > = DESCRIPTION. CREATE

< Desc OBJ / Var Name >.
(<"Propertyname1">.value=<propertyvalue1>

- If we want to add more more properties we have the follow
the above
---
---
---
< Desc OBJ / Var Name >.
(<"PropertynameN">.value=<propertyvalueN>

Is This Answer Correct ?    19 Yes 7 No

what is descriptive programming in QTP? How can be done?..

Answer / amit puhan

: Programming is done without using the object repository
is called descriptive programming. To do this we provide
QTP the list of properties & values, that qtp can use to
identify the object on which we want to perform the
operation. There 2 methods on
Which we go for descriptive programming
&#61692; Specify the list of properties and values, which
describe the object directly in the statement.
&#61692; Use a description object which has a method cold
create
Note: - When the objects that create dynamically. Console
based application, lesson of object in the application.

Is This Answer Correct ?    17 Yes 7 No

what is descriptive programming in QTP? How can be done?..

Answer / neelakantan

Basically by having object repository it has both
advantages as well disadvantages. We all know about
advantages.. As far as disadvantage is concern Supoose if u
have unstable application ie Properties might change or
Name of the Object might change..Frequent changes is
happening in ur application..We will go for descriptive
programming.. Pbjects id will be unique for all
applicaions.. So by having unique id we can write the code
like

("windowid:=2342143")

Is This Answer Correct ?    11 Yes 4 No

what is descriptive programming in QTP? How can be done?..

Answer / pavan

Descriptive Programming is the way of instructing QTP to
identify the objects without object repository.

It can be done as follows:

Example 1: Browser("title:= < title of the browser> ").Page
("title:= < title of the page> ").frame("name:= <name of
the frame>")....

Example 2: vbwindow("title: <title>").vbedit("attached
text:=username").set "name"

etc....

Is This Answer Correct ?    8 Yes 5 No

what is descriptive programming in QTP? How can be done?..

Answer / vinayak

If suppose properties of any objects are dynamically
changing and you dont want them to use through obcect
repository at that time only you are in need of Descriptive
programming.
Even if object is not prssent in to objectvrepository that
time too you can use them, you just need to hardcode them
in your script.You need to give their property and value in
svcript itself.

Is This Answer Correct ?    2 Yes 0 No

what is descriptive programming in QTP? How can be done?..

Answer / sachin

Hi Babu ,
You need to use the following code

Dialog("text:=Login").Activate
Dialog("text:=Login").WinEdit("Attached text:= Agent Name:").Set "xxxx"

Thanks
Sachin
(Any Queries:http://qtpwithvbscript.blogspot.com/)

Is This Answer Correct ?    1 Yes 0 No

what is descriptive programming in QTP? How can be done?..

Answer / vishakhab

Similar way,
for web programming:
suppose you are testing: Google Sign up page.
"https://www.google.com/accounts/NewAccount?"
To recognize the Text box: "Your current email address:"
The follow statement:
Browser("Google Accounts").Page("Google Accounts").WebEdit
("name:=Email","id:=Email").Set "vishakhavijay23@yahoo.com"

won't work without defining the object in the repository.

You need to modify the above statement as:
set emlTxt=Browser("Google Accounts").Page("Google
Accounts").WebEdit("name:=Email")
emlTxt.Set "vishakha@yahoo.com"

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More QTP Interview Questions

Explain the differences between table and db checkpoints?

0 Answers  


i m fresher iwant to know about testing what is the scope of testing field.i m aware in manual testing shall i go to automatiuon testinh directly or if any work experinc in manual testinh then only i go to manually automation testing.

2 Answers  


WHAT IS A TEST STRATEGY & WHAT IS THE DIFFERENCE BETWEEN TEST STRATEGY & TEST PLAN?

21 Answers   ABM, AZTEC, CTS, Infosys, Nihilent, Orange,


1.IF SOME OBJECT IN APPLICATION IS NOT IDENTIFIED BY QTP? HOW WILL YOU OVERCOME THIS? 2. WHEN AND WHYDO U GO FOR DESCRIPTIVE PROGRAMMING? 3. WHAT IS THE DIFFERENCE BETWEEN VB AND VBA? 4.WHAT ARE THE REGULAR EXPRESSIONS YOU USED? 5.IF ANY REQUIREMENT IS ADDED IN YOUR PROJECT, HOW WILL YOU PROCEED TO DERIVE THE TEST CASES AND HOW WILL YOU PERFORM AUTOMATION FOR IT?

2 Answers   RBS,


I added 5 edit box objects in OR.i run the script and the first edit box successfully executed.But on next day when i executed same script for second edit box,it gives an error "object not Found". But when i used Highlight in app. object already in OR.So how i will handel this type of error. Hi please inform me the write answer.Its urgent.

1 Answers   TCS,






h u call the function

6 Answers   Wipro,


What is the use of ordinal identifier in qtp?

0 Answers  


How do you move objects from local object repository to shared object repository???What are methods?

1 Answers  


how to call a funtion in a script? i have saved the login scipt in notepad. with extension .vbs. But when i am calling the function with the keyword CALL <Function Name>. its not working out. can any one give me a clue how to call the external functions. with example.

3 Answers  


What is the difference between QTP 8.2 and QTP 9.2

0 Answers   Nokia,


What are the benefits of quick test pro(qtp)?

0 Answers  


write script for bitmap image?

0 Answers   CA,


Categories