liuleidelang 发表于 2011-12-5 15:16:38

QTP 10.0自带flights, 回放出现问题。

用QTP自带的flights, 录制脚本, 参数化后。 回放出现如下问题:

Cannot find the "Agent Name:" object's parent "Login" (class Dialog). Verify that parent properties match an object currently displayed in your application.

Line (1): "Dialog("Login").WinEdit("Agent Name:").Set "tony"".

脚本如下:

Dialog("Login").WinEdit("Agent Name:").Set "tony"
Dialog("Login").WinEdit("Agent Name:").Type "mic Tab"
Dialog("Login").WinEdit("Password:").SetSecure "4edc6bf87be698a54c8b28376b5543f64d464a30"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "121511"
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("flyfrom", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("flyto", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set DataTable("name", dtGlobalSheet)
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").Close
页: [1]
查看完整版本: QTP 10.0自带flights, 回放出现问题。