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

what is regular expression how will you implement it?

1 Answers  


which command u will use to access the application through descriptive programing?

7 Answers   Datamatics,


Could any one suggest web site links to learning VB Script for QTP purpose??

3 Answers  


How the automated tests in org

1 Answers   Maintec,


What is checkpoints for quicktest professional?

0 Answers  






Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.

0 Answers  


Use of Multiple Actions in QTP?

3 Answers  


What is keyword view and Expert view in QTP?

9 Answers   Ordain Solutions,


1) How will you associate SOR in Runtime? ( u had written 10 lines of code from 11th line u want associate what code u will write) 2) How will close n number of browser expect only one which is has to test? ( First tell me how will you identify how many browser are opened ) what logic u will use? 3) In web Table u want to click on link ( Link Name Mohamed ) you dont know in which row and column that link is there. how wil u identify and click on that link.

2 Answers  


How can we retrieve the Bug Ids which are open&Reopen in status through QTP scrit?Please find the script which i tried... Dim objBugFactory, objBug Dim BugId Set TDConnection = QCUtil.TDConnection Set objBug = TDConnection.BugFactory If QCUtil.IsConnected then Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.TDConnection.ServerName + chr (13) +"Project: " + QCUtil.TDConnection.ProjectName + chr (13) + "Domain: " + QCUtil.TDConnection.DomainName Reporter.ReportEvent 0, "Current time on server is","==>" & TDConnection.ServerTime Else Reporter.ReportEvent 1, "Not connected", "Not connected to Quality Center" End If If mybug.Status="Open" Then BugId=mybug.DefectId MsgBox BugId End If 'OR**********************************--------------------- -----********************************** If Bug_Fields("BG_STATUS").Value ="Open" Or "Re Open"Then BugId=Bug_Fields("BG_BUG_ID").Value MsgBox BugId End If

0 Answers   TCS,


QTP Data Table Having 10 records with 10 to 15 fields(lets say).now i want to get alternative records from datatable.pls can any one answer it?

3 Answers   Syntel,


how to main tain the Old scripts in qtp?

1 Answers   IBM,


Categories