Descriptve code for Flight application

'Script for Login

Systemutil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
with Dialog("text:=Login")
.WinEdit("attached text:=Agent Name:").set "abcd"
.WinEdit("attached text:=Password:").set "mercury"
.WinButton("text:=OK").click
End with

'Script for Insert new Record
With Window("text:=Flight Reservation")
.WinMenu("menuobjtype:=2").Select "File;New Order"
.ActiveX("acx_name:=MaskEdBox").Type "062610"
.WinCombobox("attached text:=Fly From:").Select "Denver"
.WinComboBox("attached text:=Fly To:").Select "Paris"
.WinButton("text:=FLIGHT").Click
.Dialog("text:=Flights Table").WinList("attached text:=From","nativeclass:=ListBox").Select 1
.Dialog("text:=Flights Table").WinButton("text:=OK").Click
.WinEdit("attached text:=Name:","nativeclass:=Edit").Set "james"
.WinButton("text:=&Insert Order").click
End With

'Script for open Record
With window("text:=Flight Reservation")
.WinMenu("menuobjtype:=2").Select "File;Open Order..."
with .Dialog("text:=Open Order")
.WinCheckBox("text:=&Order No.").Set "ON"
.WinEdit("window id:=1016").Set "1"
.WinButton("text:=OK").Click
End With
End With

Comments