Micro Focus QTP (UFT) Forums
Descriptive Programming in Window Applications. - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Descriptive Programming in Window Applications. (/Thread-Descriptive-Programming-in-Window-Applications)



Descriptive Programming in Window Applications. - Amit Singh Chauhan - 06-04-2008

Hi
Which one is better?
Pure keyword Driven approach or keyword along with descriptive programming for Window based applications.

I have an example of Web Apllication using Descriptive programming. Can anyone give me a link to find Descriptive Programming example for Window Based application.


RE: Descriptive Programming in Window Applications. - vamseekk - 06-04-2008

Check if this is useful:
https://www.learnqtp.com/descriptive-programming-simplified/


RE: Descriptive Programming in Window Applications. - somisays - 06-05-2008

Hi,
This is the for flight sample application..

'Invoking the Application
Code:
invokeapplication"C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"

'Loginging to the Application
Code:
Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "sridhar"
Dialog("text:=Login").WinEdit("attached text:=Password:").SetSecure "47e2b30da686ac4f243e9c695c64fa76c5931577"
Dialog("text:=Login").WinButton("text:=OK").Click

'Opening a particular order
Code:
window("text:=Flight Reservation").winmenu("menuobjtype:=2").Select "File;Open Order..."
window("text:=Flight Reservation").Dialog("text:=Open Order").Click
Window("text:=Flight Reservation").Dialog("text:=Open Order").WinCheckBox("text:=&Order No.").Set "ON"
Window("text:=Flight Reservation").Dialog("text:=Open Order").WinEdit("window id:=1016").Set "4"
Window("text:=Flight Reservation").Dialog("text:=Open Order").WinButton("text:=OK").Click

So Explore this script according to your needs..

Regards
Sridhar