51Testing软件测试论坛
标题:
关联 页码 报错
[打印本页]
作者:
v_v
时间:
2012-8-30 09:53
标题:
关联 页码 报错
本帖最后由 v_v 于 2012-8-30 10:36 编辑
代码:
..........
web_reg_save_param( "TotalL_recs",
"LB=TOTAL_RECORDS=\"",
"RB=\"",
"Ord=1",
"IgnoreRedirections=Yes",
"Search=Body",
"RelFrameId=1",
LAST );
web_submit_data("SimpleQueryServlet.xzsp_2",
"Action=http://shfda-oaweb/apMan/com/pdcss/xzsp/common/query/SimpleQueryServlet.xzsp?QueryId=SQL_QUERY_066&QueryAll=0&PageNo=1&PageRecords=20&QueryType=0&",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://shfda-oaweb/apMan/aamp/xksqsl/sqzljs.jsp",
"Snapshot=t77.inf",
...........
page=atoi(lr_eval_string("{TotalL_recs}"));
if (page%20==0)
page=page/20;
else
page=(page/20)+1;
lr_output_message("%d",page);
page=rand()%page+1;
lr_output_message("%d",page);
lr_start_transaction("翻页");
web_reg_save_param("SQIDtest",
"LB=</Record><Record SQID=\"",
"RB=\" QYDM=",
"ORD=all",
LAST);
web_submit_data("SimpleQueryServlet.xzsp_3",
"Action=http://shfda-oaweb/apMan/com/pdcss/xzsp/common/query/SimpleQueryServlet.xzsp?QueryId=SQL_QUERY_066&QueryAll=0&PageNo=page&PageRecords=20&QueryType=0&",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://shfda-oaweb/apMan/aamp/xksqsl/sqzljs.jsp",
"Snapshot=t78.inf",
"Mode=HTTP",
ITEMDATA,
"Name=QueryXML", "Value="
.......... LAST);
lr_end_transaction("翻页",LR_AUTO);
复制代码
我是想随机取列表页码page,输出也是个数字,为什么我放到PageNo=page时,就报错呢。。。。
作者:
v_v
时间:
2012-8-30 10:37
顶一下
作者:
v_v
时间:
2012-8-30 11:18
解决了
itoa(pg,sno,10);
strcpy(link,"Action=http://shfda-oaweb/apMan/com/pdcss/xzsp/common/query/SimpleQueryServlet.xzsp?QueryId=SQL_QUERY_066&QueryAll=0&PageNo=");
strcat(link,sno);
strcat(link,"&PageRecords=20&QueryType=0&");
lr_output_message("---------------%s",link);
web_submit_data("SimpleQueryServlet.xzsp_3",
link,
"Method=POST",
"RecContentType=text/plain",
"Referer=http://shfda-oaweb/apMan/aamp/xksqsl/sqzljs.jsp",
"Snapshot=t78.inf",
"Mode=HTTP",
ITEMDATA,
复制代码
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2