SystemUtil.Run "C:\Program Files (x86)\HP\Unified Functional Testing\samples\flight\app\flight4a.exe"
var_login=login("name","mercury")
'@Description 飞机订票系统登录函数
Public Function login(ByRef name, ByRef password)
' TODO: add function body here
Dialog("Login").WinEdit("Agent Name:").Set name
Dialog("Login").WinEdit("Password:").set password
Dialog("Login").WinButton("OK").Click
End Function
Window("Flight Reservation").Activate
Window("Flight Reservation").WinObject("Date of Flight:").Type DataTable("p_KeyboardInput", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("p_Item", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("p_Item1", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "cat"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set "12"
Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
RunAction "Copy of 04_Logout [text02]", oneIteration
Window("Flight Reservation").Move 378,140
Window("Flight Reservation").Close