51Testing软件测试论坛
标题:
一个关于winrunner can't find 的问题
[打印本页]
作者:
lufei8389
时间:
2006-9-10 22:04
标题:
一个关于winrunner can't find 的问题
先来描述一下错误出现的情况
首先的运行run from top的时候出现了 execution has 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);
作者:
生如火花
时间:
2006-9-11 09:38
这种问题,有时关闭WR再启动,或者重起机器就解决了,未知原因
作者:
lzq123335
时间:
2006-9-11 09:47
你可以试着把脚本另存为一个文件,再重新设置运行一下。。。
作者:
lufei8389
时间:
2006-9-11 09:55
谢谢! 我先试试
作者:
lufei8389
时间:
2006-9-11 11:42
标题:
解决了
已经解决了 谢谢 重新录制了一下 然后重新启动了一下 就可以使用了
谢谢!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2