|
SystemUtil.Run "C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe","","C:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\","open"
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Agent Name:").Type micTab
Dialog("Login").WinEdit("Password:").SetSecure "46f25c0c4be6951a9c2628956475"
Dialog("Login").WinEdit("Password:").SetSecure "46f25c0e3d0af362190ae1b6f6e058e59b08c6eb"
Dialog("Login").WinEdit("Password:").Type micReturn
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111111"
Window("Flight Reservation").WinComboBox("Fly From:").Select "London"
Window("Flight Reservation").WinComboBox("Fly To:").Select "Denver"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "111"
Window("Flight Reservation").WinRadioButton("Business").Set
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").ActiveX("Threed Panel Control").WaitProperty "text", "Insert Done... ", 10000
'这个是一个同步点效果比你价格wait 7 好多了!
Dim num '定义一个变量
num=Window("Flight Reservation").WinEdit ("Order No:").GetROProperty("text")
‘把WinEdit ("Order No:")中text的值赋于num
msgbox num '这个是用来调试用的 可以不要
Window("Flight Reservation").Close |
|