測試實現
1.登錄名,訂票日期的參數化
2.飛機的起始地,航班,票數的隨機選擇
3.對總票價與但票價的計算核對
4。頭等艙,商業艙價格是經濟艙的倍數檢查
5.對所定的票進行查詢
6.對定好的票號進行檢查并輸出檢查內容
'登錄界面 的操作
Dialog("Login").WinEdit("Agent Name:").Set DataTable("Agent_Name", dtLocalSheet)
Dialog("Login").WinEdit("Password:").SetSecure "4d646f4218e27f097848718d8842bf6a65537f6d"
username= dialog("Login").WinEdit("Agent Name:").GetROProperty("text")
Dialog("Login").WinButton("OK").Click
'訂票界面的操作的
Window("Flight Reservation").WinObject("Date of Flight:").type DataTable("Data_of_Flight1", dtGlobalSheet) '日期的操作選擇
''''訂票的出發地的選擇
num1= Window("Flight Reservation").WinComboBox("Fly From:").GetItemsCount
num1= num1-1
Window("Flight Reservation").WinComboBox("Fly From:").Select RandomNumber(0, num1)
'驗證flight的狀態
If window("Flight Reservation").WinButton("FLIGHT").GetROProperty("enabled") <> 0 Then
print "filght 出錯!現在處于激活狀態"
End If
'''''訂票的目的地的選擇
文章來源于領測軟件測試網 http://www.k11sc111.com/