QTP如何识别WinEdit?
上一篇 /
下一篇 2011-04-14 15:55:27
用
QTP录制自带的飞机订票系统时,在订单号处为什么不能识别WinEdit
("Order
No:"),
Order
No:在对象仓库是存在的。麻烦高手帮解决,谢谢!
代码如下:
Window("Flight
Reservation").WinEdit("Order No:").Check CheckPoint("Order
No:")'Order No:对象的检查点Dim Oder_No '定义获取Oder No对象为是否为空的变量
Oder_No=Window("Flight
Reservation").WinEdit("Order
No:").GetROProperty("text")
If Oder_No<>"" Then
Reporter.ReportEvent
micPass,"订票成功","根据Oder No对象text属性不为空判断订票成功"
Reporter.ReportEvent
micPass,"订单号","订单号为:"&cint(Oder_No)
else
Reporter.ReportEvent micFail,"订票失败","根据Oder No对象text属性为空判断订票成功"
End If
检查点处报错如下:Cannot identify the object "Order No:" (of class WinEdit). Verify that this object's properties match an object currently displayed in your application.
判断取值时报错如下:The "Order No:" WinEdit object was not found in the Object Repository.
Check the Object Repository to confirm that the object exists or to find the correct name for the object.
郁闷!麻烦各位高手帮忙解决,谢谢
收藏
举报
TAG: