|
3#
楼主 |
发表于 2013-7-12 14:04:31
|
只看该作者
回复 2# 云层
做文本检查是为了判断登录是否成功,如果登录失败的话,登录的事物不是失败吗?难道事物一直都是通过的就没有失败的事物吗????
Action()
{
int i;
web_reg_save_param("userID",
"LB=<input type=hidden name=userSession value=",
"RB=>",
LAST);
web_url("WebTours",
"URL=http://127.0.0.1:1080/WebTours/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
lr_think_time(9);
web_reg_find("Text=reservation pages.",
"Fail=NotFound",
"SaveCount=countParam",
"Search=Body",
LAST);
lr_start_transaction("login");
web_submit_form("login.pl",
"Snapshot=t2.inf",
ITEMDATA,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=login.x", "Value=40", ENDITEM,
"Name=login.y", "Value=7", ENDITEM,
LAST);
lr_end_transaction("login", LR_AUTO);
for(i=0; i<5; i++)
{
lr_eval_string( "{username}" );
}
web_image("SignOff Button",
"Alt=SignOff Button",
"Snapshot=t3.inf",
LAST);
return 0;
}
我写的for循环是不是不放在事物里面,这个我还不是很明白?请指点一下,谢谢 |
|