num2= Window("Flight Reservation").WinComboBox("Fly To:").GetItemsCount
num2= num2 -1
Window("Flight Reservation").WinComboBox("Fly To:").Select RandomNumber(0, num2)
'选择航票的航班
Window("Flight Reservation").WinButton("FLIGHT").Click
num3= window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
num3 = num3-1
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select RandomNumber(0, num3)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
'输入姓名
Window("Flight Reservation").WinEdit("Name:").Set username
'获取经济舱的价格
window("Flight Reservation").WinRadioButton("Economy").Click
price1=window("Flight Reservation").WinEdit("Price:").GetROProperty("text")
price1= mid (price1,2 ,len(price1)-1)
price1 =CDbl(price1)
'选择哪一号机舱
c= RandomNumber(1,3)
Select Case c
Case 1 window("Flight Reservation").WinRadioButton("First").Click
Case 2 window("Flight Reservation").WinRadioButton("Business").Click
case 3 window("Flight Reservation").WinRadioButton("Economy").Click
End Select
'验证票数
文章来源于领测软件测试网 https://www.ltesting.net/