|
今天自学WR教程时,编写脚本老是遇到错误.才学!请多多指教啊!
我用的是WR8.0,教程是7.6的,就是WinRunner 7.6 Tutorial 中文版.
里面的lesson7,我完全按教程做的。在运行的时候老是需要用"手"识别一个窗口的函数,还有到最后说是遇到语法错误:
lesson7(26):syntax error
else
具体脚本代码我发下:
# Flight Reservation
set_window ("Flight Reservation", 4);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 2);
button_set ("Order No.", ON);
edit_set ("Edit_1", "3");
obj_type ("Edit_1","<kReturn>");
# Flight Reservation
win_activate ("Flight Reservation");
set_window ("Flight Reservation", 1);
menu_select_item ("File;Fax Order...");
# Fax Order No. 3
set_window ("Fax Order No. 3", 2);
button_press ("Cancel");
edit_get_text("# Tickets:",tickets);
edit_get_text("Ticket Price:",price);
edit_get_text("Total:",total);
# check that the total ticket price is calculated correctly.
if (tickets*price==total)
tl_step("total",0,"total is correct.")
else
tl_step("total",1,"total is incorrect.");
加粗的地方就是出错的地方.请各位大哥大姐指教下!谢谢! |
|