TA的每日心情 | 无聊 2020-12-8 11:20 |
---|
签到天数: 605 天 连续签到: 1 天 [LV.9]测试副司令
|
回复 4# liujun_11
SystemUtil.Run "C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\HP\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "mercury"
Dialog("Login").WinEdit("Password:").set "mercury"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").Activate
Window("Flight Reservation").ActiveX("MaskEdBox").Type "110712"
itemscount = Window("Flight Reservation").WinComboBox("Fly From:").GetROProperty ("items count")
For i = 0 to itemscount -1
Window("Flight Reservation").WinComboBox("Fly From:").Select i '用序号来选择
'print window("Flight Reservation").WinComboBox("Fly From:").GetROProperty("text")
itemscount1 = Window("Flight Reservation").WinComboBox("Fly To:").GetROProperty ("items count")
For e = i to itemscount1-1
Window("Flight Reservation").WinComboBox("Fly To:").Select e
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "Aa"
If i=0 and e=0 Then
Window("Flight Reservation").WinButton("Insert Order").Click
else
Window("Flight Reservation").WinButton("Update Order").Click
End If
Next
Next
Window("Flight Reservation").Close
试下吧。。。我调试过没问题 |
|