Sie sind auf Seite 1von 3

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

Question Submitted By :: Geminisrinivas


I also faced this Question!! Answer
Rank
Posted By

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


Answer descriptive programming in QTP means whenever qtp 3 Prasad
facing
#1
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

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


Answer descriptive programming in QTP means when there 0 Mallikharjun
is no
#2 Bhavanam
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").

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


Answer It works perfectly.... 2 Pradeep
#3
'USING DESCRIPTIVE PROGRAMMING - WITHOUT OBJECT
REPOSTARY

Browser("creationtime:=4").Page("title:=Editorial
Company
Search").Link("text:=Codes").Click

'OR

Browser("name:=Editorial Company Search").Page


("title:=Editorial Company Search").Link
("text:=Codes").Click

For descriptive programming the object properties


should be
extracted first using the QTP object repository
and then
use it in the code.

Ex., name:= or creationtime:= or title:=

Depends on the objects and its available


properties

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


Answer Writing the scripting even though the objects 0 Vijendra
are not
# 4 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

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


Answer It is something like instructing the QTP to 4 Ravi
perform
#5
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>

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


Answer : Programming is done without using the object
repository
#6
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.

Das könnte Ihnen auch gefallen