一个关于winrunner can't find 的问题
先来描述一下错误出现的情况首先的运行run from top的时候出现了 executionhas been suspend in d:\filename changing flow will destory the context " for statement " being executed
然后点击“确定”
运行的时候出现的错误是 winrunner can't find the window" Fax Order No.3"
以下是我的运行的脚本代码 使用的是winrunner 8.2
我已经把Fax Order No.3 已经修改成了!Fax Order No.* 在GUI FILES里面
table = "lesson8.xls";
rc = ddt_open(table, DDT_MODE_READ);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");
ddt_get_row_count(table,table_RowCount);
for(table_Row = 1; table_Row <= table_RowCount; table_Row ++)
{
ddt_set_row(table,table_Row);
# Shell_TrayWnd
#set_window("Fax Order No. 3", 1);
set_window ("Shell_TrayWnd", 2);
toolbar_button_press ("ToolbarWindow32_1", "Flight Reservation"); # Button Number 4;
# Flight Reservation
set_window ("Flight Reservation", 3);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 1);
button_set ("Order No.", ON);
edit_set ("Edit_1", ddt_val(table,"Order_Num"));
button_press ("OK");
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 2);
toolbar_button_press ("ToolbarWindow32_1", "Flight Reservation"); # Button Number 4;
# Flight Reservation
set_window ("Flight Reservation", 6);
menu_select_item ("File;Fax Order...");
#注意这里的 Fax Order No. 3 是不会随着循环的改变而改变的
set_window("Fax Order No.3", 1);
edit_get_text("Ticket Price:",price);
edit_get_text("# Tickets:",tickets);
edit_get_text("Total:",total);
if(price*tickets == total)
tl_step("total",0,"total is correct.");
else
tl_step("total",1,"total is not correct.");
button_press ("Cancel");
}
ddt_close(table); 这种问题,有时关闭WR再启动,或者重起机器就解决了,未知原因 你可以试着把脚本另存为一个文件,再重新设置运行一下。。。 谢谢!我先试试
解决了
已经解决了 谢谢重新录制了一下 然后重新启动了一下就可以使用了谢谢!
页:
[1]