这是手写的代码,没有录制,但是用到的对象都导到对象库了,但是运行到第五行的时候出现了个问题,问题如下:Cannot identify the object "MaskEdBox" (of class ActiveX). Verify that this object's properties match an object currently displayed in your application.
代码如下:
SystemUtil.Run "D:\qtp_install\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set "1234"
Dialog("Login").WinEdit("Password:").SetSecure "4d5c715216611b0e2e2d05134ddffa93dec5063b"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type"11/11/11"
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").WinList("From").Select RandomNumber(1, 2)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "frank"
Window("Flight Reservation").WinRadioButton("First").Click
Window("Flight Reservation").WinButton("Insert Order").Click
新手,请教!