|
参数化表中的第一项可以顺利执行,但到第二项时就会弹出如下错误信息:
v" k7 j& t
The test run cannot continue due to an unrecoverable error.4 [* }8 t6 z* @* p( S+ t6 ~( A
Cannot find the "Agent Name:" object's parent "Login" (class Dialog). Verify that parent properties match an object currently displayed in your application.
直接在Keyword View里点击“Fly From”和“Fly To”的value栏里的文本,对其进行参数化设置;! I; m8 i: O: L2 z0 n0 r" [
其中“Location in data table”选项卡我是选全局的;1 n0 L" E' _4 b8 u* ?) Y0 `! Q9 z
还有“action call properties”里也选了 run on all rows l2
R(
f3 C* |. d
脚本如下:
Dialog("Login").WinEdit("Agent Name:").Set "abcd"
Dialog("Login").WinEdit("Password:").SetSecure "4ae7f5f210ee4f35eb74996225c54a5e14cbc8c7"
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").ActiveX("MaskEdBox").Type "110309"
Window("Flight Reservation").WinComboBox("Fly From:").Select DataTable("Fly_From", dtGlobalSheet)
Window("Flight Reservation").WinComboBox("Fly To:").Select DataTable("Fly_To", dtGlobalSheet)
Window("Flight Reservation").WinButton("FLIGHT").Click
Window("Flight Reservation").Dialog("Flights Table").WinButton("OK").Click
Window("Flight Reservation").WinEdit("Name:").Set "jane"
Window("Flight Reservation").WinButton("Insert Order").Click
Window("Flight Reservation").WinMenu("Menu").Select "File;Exit"
记得最后应该加一句话,但忘记语句是怎么写的了,请高手指教,谢谢! |
|