51Testing软件测试论坛
标题:
我写的LR脚本,却编译不过去,实在找不到哪儿错的?
[打印本页]
作者:
章美霞
时间:
2010-12-10 15:18
标题:
我写的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);
还请各位高手帮忙找错,谢谢啦
作者:
云层
时间:
2010-12-10 19:59
编译啥错误
作者:
云层
时间:
2010-12-10 20:00
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的代码前
作者:
superliming
时间:
2010-12-13 15:09
支持云层老师的说法,曾经碰到过
作者:
章美霞
时间:
2010-12-14 14:59
回复
3#
云层
非常感谢,按照你说的,我修改了,可以编译通过了。
作者:
章美霞
时间:
2010-12-14 15:01
这是我改好了,终于可以了,原来变量要定义在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;
}
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2