|
代码如下,结果如图;如何只执行一次登陆和退出,执行两次定票,
各位大侠支招,前面一个相同的例子我没看懂,谢谢 谢谢 谢谢- '登陆
- If not Dialog("Login").Exist Then
- systemutil.Run"C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight3a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\"
- End If
- Dialog("Login").WinEdit("Agent Name:").Set "zhang"
- Dialog("Login").WinEdit("Password:").SetSecure "47a167f45d0dbecc2128f9c95db14f1d84f374fc"
- Dialog("Login").WinButton("OK").Click
- '预订
- Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("date", dtGlobalSheet)
- Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("fly_from", dtGlobalSheet)
- Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("fly_to", dtGlobalSheet)
- Window("Flight Reservation").WinButton("FLIGHT").Click
- 'Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "14243 DEN 12:57 PM FRA 01:41 PM SR $110.00"
- Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
- Window("Flight Reservation").WinEdit("Customer Name:").Set "zhang"
- Window("Flight Reservation").WinRadioButton("First").Set
- Window("Flight Reservation").WinButton("Insert").Click
- Window("Flight Reservation").WinButton("Button").Click
- Window("Flight Reservation").Activate
- '退出
- Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
复制代码 |
|