TA的每日心情 | 难过 2016-2-22 17:29 |
---|
签到天数: 2 天 连续签到: 2 天 [LV.1]测试小兵
|
刚开始学习UFT自动化测试,练习 订票系统 测试的过程中总出现如下的运行错误,点击“重试”几次有时候就能往下进行了,麻烦高手指点到底是哪里出现了错误,谢谢!
脚本内容如下:
- Dim itemCount
- 'Book
- Window("Flight Reservation").WinButton("Button").Click
- Window("Flight Reservation").WinObject("Date of Flight:").Type DataTable("OrderDate", dtLocalSheet)
- Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("FlyFrom",dtLocalSheet)
- Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("FlyTo",dtLocalSheet)
- Window("Flight Reservation").WinButton("FLIGHT").Click
- If Window("Flight Reservation").Dialog("Flights Table").WinList("From").Exist Then
- itemCount = Window("Flight Reservation").Dialog("Flights Table").WinList("From").GetROProperty("items count")
- Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select RandomNumber(0,itemCount)
- Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
- End If
- Window("Flight Reservation").WinEdit("Name:").Set DataTable("Name",dtLocalSheet)
- Window("Flight Reservation").WinButton("Insert Order").Click
- Window("Flight Reservation").WinButton("Button_2").Click
- 'Check
- Window("Flight Reservation").Dialog("Open Order").WinCheckBox("Customer Name").Set "ON"
- Window("Flight Reservation").Dialog("Open Order").WinEdit("Edit").Set DataTable("Name",dtLocalSheet)
- Window("Flight Reservation").Dialog("Open Order").WinButton("OK").Click
- itemCount = Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").WinList("Flight No.").GetROProperty("items count")
- Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").WinList("Flight No.").Select RandomNumber(0,itemCount)
- Window("Flight Reservation").Dialog("Open Order").Dialog("Search Results").WinButton("OK").Click
复制代码 出错时状态如下:
|
|