|
6#
楼主 |
发表于 2010-12-14 15:01:25
|
只看该作者
这是我改好了,终于可以了,原来变量要定义在LR的代码前,不过还是有点不太明白,过会儿查下资料
Action()
{
double time_elapsed;
double waste;
merc_timer_handle_t timer;
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_start_transaction("Submit");
timer=lr_start_timer();
web_reg_find("Text=zmx04",
LAST);
time_elapsed=lr_end_timer(timer);
waste=time_elapsed*1000;
lr_wasted_time(waste);
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value=zmx04", ENDITEM,
"Name=password", "Value=zmx04", ENDITEM,
"Name=login.x", "Value=41", ENDITEM,
"Name=login.y", "Value=8", ENDITEM,
LAST);
lr_end_transaction("Submit", LR_AUTO);
return 0;
} |
|