51Testing软件测试论坛

标题: WinEdit object was not found in the Object Repository. [打印本页]

作者: xwm259695    时间: 2012-2-9 15:26
标题: WinEdit object was not found in the Object Repository.
  1. Dialog("Login").WinEdit("Agent Name:").Set "mercury"
  2. Dialog("Login").WinEdit("Password:").SetSecure "4f31c484579419918c5c9582b3adede9949df82f"
  3. Dialog("Login").WinButton("OK").Click
  4. Window("Flight Reservation").ActiveX("MaskEdBox").Type DataTable("Data_of_Flight", dtGlobalSheet)' 航班时间
  5. Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("FlyForm", dtGlobalSheet)' 起始点
  6. Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("FlyTo", dtGlobalSheet)' 终点站
  7. Window("Flight Reservation").WinButton("FLIGHT").Click' 查看航班
  8. ItemCount=Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetItemsCount'取得航班列表的行数
  9. SelectItem=RandomNumber(0,ItemCount)'随机选取其中一项
  10. Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select  SelectItem ' 选择航班列表信息
  11. Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
  12. Window("Flight Reservation").WinEdit("Name:").Set "jojo"' 订票人名字
  13. Window("Flight Reservation").WinButton("Insert Order").Click' 保存订票记录
  14. Wait 1'等待记录插入过程完成
  15. RecordNo= Window("Flight Reservation").WinEdit("Order No:").GetTOProperties("text")'取得订单记录号
  16. Window("Flight Reservation").WinButton("Button").Click' 打开订票记录
  17. Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Order No.").Set "No"
  18. Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Type RecordNo '设置订单号
  19. Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click '确认订单
复制代码
运行时报不知为何报如下错误:
The test run cannot continue due to an unrecoverable error.

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.

Line (1): "Dialog("Login").WinEdit("Agent Name:").Set "mercury"".
作者: fengdishudu444    时间: 2012-2-9 16:41
对象没有找到  往对象库中添加一下该对象
作者: pl80601983    时间: 2012-2-9 17:20
回复 1# xwm259695


    检查对象仓库看看。保证对象仓库中有此对象。




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2