|
用QTP10录制Flight订票操作,想参数化订票里的Name字段,录制完成,脚本如下:
Dialog("Login").WinEdit("Agent Name:").Set "aaaa"
Dialog("Login").WinEdit("Password:").SetSecure "504170dc4776fb8c7934950714d38187cb4b736a"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "121212"
Window("Flight Reservation").WinComboBox("Fly From:").Select "Denver"
Window("Flight Reservation").WinComboBox("Fly To:").Select "London"
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set DataTable("p_Text", dtGlobalSheet)
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
第一次正常运行,第二次,登陆窗口就不能显示。而且我这里没有systemutil.Run,但是Tools里的属性我设置的是显示systemutil.Run,不知是怎么回事,大家帮帮忙啊! |
|