|
QTP脚本用数据表参数化后,为什么总是第一次运行正常,到第二次运行,每次跑到第一行就显示找不到对象,请问在QTP内还要设置什么吗,代码如下,求各位大虾帮忙,谢谢啊!!代码如下:
Dialog("Login").Static("Static").Check CheckPoint("Static")
Dialog("Login").WinEdit("Agent Name:").Set "admin"
Dialog("Login").WinEdit("Password:").SetSecure "48ccdca99bfc9f5a007311a6832f9543429d441d"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinButton("Button").Check CheckPoint("Button")
Window("Flight Reservation").WinObject("Date of Flight:").Type "080809"
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").Static("Static").Check CheckPoint("Static_2")
Window("Flight Reservation").Dialog("Flights Table").WinList("From").Select "10436 LON 09:51 AM PAR 11:31 AM QF $171.80"
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set DataTable("NAME", dtGlobalSheet)
msgbox ("xxxxxx")
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinRadioButton("First").Set
Window("Flight Reservation").WinEdit("Tickets:").SetSelection 0,1
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").Close
我想让此脚本连续运行,就是第二次跑到第一行出错,用FOR循环也一样 |
|