uft参数化

'日期的输入与标准输出,输出到Global
Window("Flight Reservation").ActiveX("MaskEdBox").Click 3,4
Window("Flight Reservation").ActiveX("MaskEdBox").Type "121515"
Window("Flight Reservation").ActiveX("MaskEdBox").Output CheckPoint("MaskEdBox_3")
'出发地和目的地从Global得到
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
'使用randomRow进行参数化
totalcounts=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount
randRow=randomNumber(1,totalcounts)
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select(randomRow)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
'订票人从从Global得到
Window("Flight Reservation").WinEdit("Name:").Set DataTable("Name", dtGlobalSheet)
'订票数从Global得到
Window("Flight Reservation").WinEdit("Tickets:").SetSelection 0,1
Window("Flight Reservation").WinEdit("Tickets:").Set DataTable("Tickets", dtGlobalSheet)
Window("Flight Reservation").WinRadioButton("Business").Set
Window("Flight Reservation").WinButton("Insert Order").Click
WAIT 6
'订单号标准输出到Golbal
Window("Flight Reservation").WinEdit("Order No:").Output CheckPoint("Order No:_2")

你可能感兴趣的:(uft参数化)