LR机票登录事物的疑问
LR11自带飞机订票系统,我对登录做了参数化,文本检查(判断登录是否成功),循环迭代,还有登录事物,登录事物是否应该包括文本检查和循环迭代,详细说明一下原因,请各位高手指点一下小女子,多谢啦 不包括,你工作时间还要包括吃饭,睡觉,上厕所么? 回复 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循环是不是不放在事物里面,这个我还不是很明白?请指点一下,谢谢
页:
[1]