救助!怎么跳出本次action循环,继续下一次循环!
脚本中有个参数totalRecords,如果取得totalRecords为0则不执行后面的操作,重新执行Action()重新获取totalRecords直到totalRecords大于0时再执行后面的语句。请教怎么实现?totalRecords是询结果总数,是由前面的多个步骤决定的,这个脚本执行的快的话,就会查不到数据。
Action()
{
........
lr_start_transaction("违规初审查询");
lr_think_time(20);
web_reg_save_param("totalRecords",
"LB=totalRecords\":",
"RB=}",
"NotFound=ERROR",
"Search=All",
LAST);
web_reg_save_param("NID",
"LB=\"id\":\"",
"RB=\"",
// "NotFound=ERROR",
"Search=All",
"Ord=ALL",
LAST);
..............
lr_end_transaction("违规初审查询", LR_AUTO);
..............
lr_start_transaction("违规初审");
sprintf(tmp,"{NID_%d}",randomnumber);
sprintf(str,lr_eval_string(tmp));
lr_save_string(str,"param");
lr_eval_string("{param}");
lr_output_message("参数名:%s",tmp);
lr_output_message("参数值:%s",str);
lr_think_time(30);
web_submit_data("issueManageAction.action",
"Action=http://192.168.29.203:8100/ssm/framework/app/auditflow/issueManageAction.action?method=doubtPointSure",
"Method=POST",
"RecContentType=text/xml",
"Referer=http://192.168.29.203:8100/ssm/framework/authAction.action;jsessionid={PeopleSoftJSessionID2}?method=loadAuthTopMenus",
"Snapshot=t112.inf",
"Mode=HTTP",
ITEMDATA,
"Name=conditionA", "Value=Y", ENDITEM,
"Name=conditionB", "Value=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", ENDITEM,
"Name=rid", "Value={param}", ENDITEM,
"Name=remark", "Value=qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq", ENDITEM,
"Name=sureIllegal", "Value=true", ENDITEM,
LAST);
......
lr_end_transaction("违规初审", LR_AUTO);
return 0;
} 你外面写个死循环,关联后写个关联项遍历不就行了么? 谢谢,已经解决了。是我开始想多了,加了个判断把后面的所有脚本扩进去就好了。
页:
[1]