Tuesday, July 14, 2009

DP Programing without using OR

' script w/o using object repository, define the unique property of n object using object spy
' use description property to define the property of an object
'after declaring app as an description.create us it like an array

Dim app
Set app=description.Create
app("x").value="116"
app("y").value="163"

SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("text:=Login").WinEdit("attached text:=Agent Name:").Set "hhfhgfhfh"
Dialog("text:=Login").WinEdit("attached text:=Password:").SetSecure "4a2cd4e45343a457cb542ea924d8860e780f851e"
Dialog("text:=login").WinButton(app).Click
with Window("text:=Flight Reservation")
.activate
.activex("acx_name:=MaskEdBox").type "111111"
.wincombobox("attached text:=Fly From:").select "Denver"
.wincombobox("attached text:=Fly To:").select "Los Angeles"
.winbutton("text:=FLIGHT").Click
.dialog("text:=Flights Table").winlist("window id:=2001").Select "3523 DEN 11:21 AM LAX 12:19 PM NW $138.80"
.dialog("text:=Flights Table").winbutton("windowstyle:=1342242816").click

end with

1 comment: