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:

sirme的个人空间 引用 删除 sirme   /   2011-04-18 09:20:50
我重新录制脚本就解决问题了,原先那个脚本还是有问题,真想不明白为什么?
 

评分:0

我来说两句

日历

« 2024-05-14  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 1908
  • 日志数: 1
  • 建立时间: 2011-01-19
  • 更新时间: 2011-04-14

RSS订阅

Open Toolbar