我写的LR脚本,却编译不过去,实在找不到哪儿错的?
lr_start_transaction("Submit");double time_elapsed;
double waste;
merc_timer_handle_t timer;
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);
还请各位高手帮忙找错,谢谢啦 编译啥错误 double time_elapsed;
double waste;
merc_timer_handle_t timer;
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);
这样就行了,变量定义要放在LR的代码前 支持云层老师的说法,曾经碰到过 回复 3# 云层
非常感谢,按照你说的,我修改了,可以编译通过了。 这是我改好了,终于可以了,原来变量要定义在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;
}
页:
[1]