can anyone explain about the Descriptive programming in
detail. I mean how to use in the script.



can anyone explain about the Descriptive programming in detail. I mean how to use in the script...

Answer / shyam.meghansh

Descriptive Programming comes under Advance QTP .... in
this we do not require any objects in object repository....
with out adding objects in repository we can test the
application .... the concept DSP

so in DSP we will not add the objects in repository....
inside we will take the logical names of the object and
accesss those... chk one of the example

*============================================*
systemutil.Run("C:\WINNT\NOTEPAD.exe")

Set Open_Pad=Description.Create()
Open_Pad("text").value="Untitled - Notepad"

Set Text_Area=Description.Create()
Text_Area("window id").value="15 "

Set File_Menu=description.Create()
File_Menu("window id").value="262737"

Set File_Menu_Save=description.Create()
File_Menu_Save("window id").value="0"
File_Menu_Save("x").value="681"
File_Menu_Save("y").value="53"
'#32768Menu
Set Save=Description.Create()
Save("text").value="Save As"

Set Enter_File_Name = Description.Create()
Enter_File_Name("attached text").value="File &name:"
Enter_File_Name("window id").value="1148"

Set Save_Button = description.Create()
SAve_Button("text").value="&Save"


Set File_Menu_Close=description.Create()
File_Menu_Close("window id").value="0"
File_Menu_Close("x").value="681"
File_Menu_Close("y").value="53"



Window(Open_Pad).WinEditor(Text_Area).type( "This is shyam
doing the descriptive fro notepad")
Window(Open_Pad).WinMenu(File_Menu_Save).Dialog
(Save).WinEdit(Enter_File_Name).set "demo"
Window(Open_Pad).WinMenu(File_Menu_Save).Dialog
(Save).Winbutton(Save_Button).click
Window(Open_Pad).WinMenu(File_Menu_Close)





*============================================*

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More QTP Interview Questions

When to use Descriptive programing?

2 Answers   Wipro,


can u give one scenario for for PopWindow Exception & write Code for that?

2 Answers   Cap Gemini,


How to release all resources file from the QTP?

0 Answers   Tech Mahindra,


Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?

1 Answers  


7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell data which is equal to the given number say:123. Assume you have given with the column name/id of the table where the number may exist. So now you have to go to the given column and search for the number 123 and retrieve it along with the row number of it.

4 Answers  






where the log files stored when using QTP? plz send answer to me ........

1 Answers  


For example one window is there the window contain some of Check boxes but my question is how many check boxes are there particular window? Please solve the problem gi_raju@rediffmail.com ippaliraju@yahoo.co.in

3 Answers  


How many types of OBJECTS are there in QTP?

8 Answers   Intel, Inter Globe Technologies,


How often were they executed?

0 Answers   Sarga Technologies,


Hi, I want to write the script for a webpage. But i didn't added the properties of the objects to the object repository. Without adding the object properties to the object repository, how to write the script. When i am writing the script, Let us say i typed as Browser (""). after selecting ".", if the object is added to the object repository it will display atomatically. But in my case it is not as i didn't added the object properties. How to proceed further in the above mentioned case to write the script manually. Pls let me know if you didn't understand the question.

3 Answers  


I have one bitmap image in my webpage. The bit map image is moving like 1 place to 2nd place and 2nd place to 3rd place Etc… in my webpage. I wanted to write script for dynamical objects like above example. Could you please send me the answer for above query.

9 Answers   IBM,


Could anyone please tell me one situation where you have used recovery scenarion in real time with an example?

4 Answers  


Categories