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

How to Compare the 2 xl-sheets in QTP? ple write the vb Script for the comparison?

1 Answers  


vb script for calling one function to the another function

2 Answers  


why can't you use excel directly in qtp. why we want to import excel data into Datatable.

1 Answers   BoA,


What is throw Object?

0 Answers  


How can we add regular expression for date field (dd/mon/yyyy)?

3 Answers   CTS,






How to get line numbers in your editor in expert view?

2 Answers  


HI How to take screenshots of a Webpage and saving it in a external word document using QTP.

4 Answers   3i Infotech, TCS,


While recording a login window QTP is identifying only parent window,then how can u identify the child objects.

2 Answers   Symphony,


How do we connect QC by using QTP?

2 Answers   Infosys,


I register user defined function in one test, I tried to call that function into other test. But that function not works in other test please give the direction for that.

1 Answers  


Give me the Example of standard check point and text check point with syntax?

3 Answers   IMI Soft, IMI Soft Engineering,


I got some information from the QTP help.But i am not sure whether through this process will QTP work or not bellow is the Help what I have Remote setup Settings Remote WSH, which is a new technology included in WSH 5.6, provides the ability to run a script on a remote machine or machines. With Remote WSH, the script is physically copied from the local machine to the remote machine before executing. In order to enable Remote WSH functionality, you must first set up the remote machine with the proper security settings. The steps below perform the tasks that enable Remote WSH. Note Both the remote and local machines must be running Windows NT 4 SP3 or greater in order to use Remote WSH. To enable a machine to run remote scripts 1. Install WSH V5.6 on the machine. If you are using Windows 2001 or have installed Internet Explorer 6 or greater, WSH 5.6 has already been installed. Note WSH 5.6 is available for download from the web at http://msdn.microsoft.com/scripting 2. Add yourself to the remote machine's Local Administrators group. 3. To enable Remote WSH, use Poledit.exe on the server. Note An administrator who wants to enable Remote WSH must either acquire the Windows 2000 resource kit, or use http://msdn.microsoft.com/scripting to acquire the necessary windowsscript.adm file that contains the WSH settings. The windowsscript.adm file must be copied to the server that sets the gapplicabel group's policies. Although it is not necessary to copy the file to the server's \WINNT\INF directory, this is nonetheless where the default adm files are located. Note For more information on Poledit.exe, see the Poledit.exe's online help system. 4. WSH should now be enabled on the machine. To test it,. WSH 5.6 can run scripts that reside on remote systems. The following scripts demonstrate this capability. These scripts make the assumption that the files are located on a local machine directory called "c:\wsh5.6"; change the local path and the remote machine name as necessary. After initially running RemoteTest.WSF on the local machine, there may be a small pause as DCOM verifies your identity. After you see the "Done" message, a file named "c:\beenhere.txt" on the remote machine indicates the time that you executed the command (from the remote computer's clock). Script to run scripts remotely set oController = CreateObject("WSHController") set oProcess= oController.CreateScript("c:\wsh5.6\beenhere.wsf","remmachine") oProcess. Execute Could you tell me will it work fine

0 Answers   Livetek,


Categories