TA的每日心情 | 慵懒 2017-7-13 16:01 |
---|
签到天数: 30 天 连续签到: 1 天 [LV.5]测试团长
|
QTP在机票预订页面使用random number提示 Cannot identify the specified item of the From object. Confirm that the specified item is included in the object's item collection.
请问大家是哪里有问题?此处该如何正确使用随机参数?(win7系统,用的是QTP11,运行到第二轮选航班号时就会报错。随机参数取的是默认的(0,100),试了(0,2)也会这样报错)详情请看截图。
专家视图C:\Users\Administrator\Desktop如下:
Window("Flight Reservation").WinButton("Button").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "111316"
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("from", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("to", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "1418 DEN 05:21 PM LAX 06:19 PM SW $117.20",, RandomNumber(0, 100)
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "yun"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinButton("Button_2").Click
Window("Flight Reservation").Dialog("Flight Reservations").WinButton("是(Y)").Click |
|