|
真是崩潰了,本人學習QTP,用最簡單的飛機訂票系統完成以下的流程,有二個action,首先,插入一訂單,然後,action2根據這訂單號碼來查詢出來.其中的設置是這樣的:自動生成一訂單後,在這訂單號加入輪出值,設置為datatable,globla sheet,然後actions2中讀取這個參數.不知道為什麽,run 時老是不成功,有提示error,搞了一天都不成功,真是要急暈了,望大蝦們幫忙,謝謝,以下是action1的code:
Dialog("Login").WinEdit("Agent Name:").Type "M"
Dialog("Login").WinEdit("Agent Name:").Set "Mercury"
Dialog("Login").WinEdit("Password:").SetSecure "4be0e703f6918a83a90b3e47593bc5d73456b4de"
Dialog("Login").WinButton("OK").Click
wait 2
Window("Flight Reservation").ActiveX("MaskEdBox").Type "051210"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Frankfurt"
Window("Flight Reservation").WinButton("FLIGHT").Click
wait 3
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "15797 DEN 08:00 AM FRA 08:45 AM AA $104.60"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
wait 3
Window("Flight Reservation").WinEdit("Name:").Set "jessica"
wait 3
Window("Flight Reservation").WinButton("Insert Order").Click
wait 5
Window("Flight Reservation").WinEdit("Order No:").Output CheckPoint("Order No:_3")
wait 2
RunAction "action2", oneIteration
action2的代碼是:
Window("Flight Reservation").WinButton("Button_2").Click
Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "ON"
wait 2
Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set DataTable("Order_No_3_text_out", dtGlobalSheet)
[ 本帖最后由 yzz_19 于 2010-5-14 16:36 编辑 ] |
|