|
我录制脚本的时候,在查询页面用一个key值查到两条记录,然后把这两条记录提交到另外一个页面去。具体如下图。我现在把这个key值设置成一个随机数,想在一定范围内随机查询,那我怎么处理查询出来的记录啊?
下面是我的LR脚本:
//查询
web_submit_data("reportCase.do_2",
"Action=http://claim.sinosafe.com.cn:15080/claim/auto-claim/acceptcase/reportCase.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://claim.sinosafe.com.cn:15080/claim/auto-claim/acceptcase/reportCase.do",
"Snapshot=t9.inf",
"Mode=HTML",
ITEMDATA,
"Name=policyNo", "Value=1010103202006000038", ENDITEM, //key值
"Name=insured", "Value=", ENDITEM,
"Name=licenseNo", "Value=", ENDITEM,
"Name=effectiveDate", "Value=2005-12-06", ENDITEM,
"Name=invalidDate", "Value=2006-12-06", ENDITEM,
"Name=engineNo", "Value=", ENDITEM,
"Name=lossDate", "Value=2006-12-06 08:36:02", ENDITEM,
"Name=frameNo", "Value=", ENDITEM,
EXTRARES,
LAST);
lr_think_time(11);
//查询结果提交
web_submit_data("displayReport.do",
"Action=http://claim.sinosafe.com.cn:15080/claim/auto-claim/acceptcase/displayReport.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://claim.sinosafe.com.cn:15080/claim/auto-claim/acceptcase/reportCase.do",
"Snapshot=t10.inf",
"Mode=HTML",
ITEMDATA,
"Name=policyNo", "Value=1010103202006000038", ENDITEM,
"Name=insured", "Value=", ENDITEM,
"Name=licenseNo", "Value=", ENDITEM,
"Name=effectiveDate", "Value=2005-12-06", ENDITEM,
"Name=invalidDate", "Value=2006-12-06", ENDITEM,
"Name=engineNo", "Value=", ENDITEM,
"Name=lossDate", "Value=2006-12-06 08:36:02", ENDITEM,
"Name=frameNo", "Value=", ENDITEM,
"Name=policyNoList", "Value=1010103202006000038", ENDITEM, //查询结果
"Name=policyNoList", "Value=1010103302006000020", ENDITEM, //查询结果
EXTRARES,
LAST);
各位大虾指点一下! |
|