51Testing软件测试论坛
标题:
脚本语句求教
[打印本页]
作者:
ken19850
时间:
2012-8-2 15:00
标题:
脚本语句求教
本帖最后由 ken19850 于 2012-8-2 15:03 编辑
Action()
{
int i=1,j;
char str,value;
复制代码
web_submit_data("goods_in_stock.aspx",
"Action=http://vip.dqc100.com/Manager/Seller/goods_in_stock.aspx",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://vip.dqc100.com/Manager/Seller/goods_in_stock.aspx",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=__EVENTTARGET", "Value=", ENDITEM,
"Name=__EVENTARGUMENT", "Value=", ENDITEM,
"Name=__VIEWSTATE", "Value={Siebel_Analytic_ViewState3}", ENDITEM,
"Name=__EVENTVALIDATION", "Value={Siebel_Analytic_ViewState4}", ENDITEM,
"Name=ctl00$Header1$HeaderTop1$J_Code", "Value=请输入您要搜索的产品", ENDITEM,
"Name=ctl00$Header1$HeaderTop1$Hf_hfType", "Value=0", ENDITEM,
"Name=ctl00$ContentPlaceMain$txt_ComTitle", "Value=", ENDITEM,
"Name=Sec_SubmitBtn", "Value=搜索", ENDITEM,
//"Name=ctl00$ContentPlaceMain$rptList$ctl00$ChkItem", "Value=on", ENDITEM,
j=atoi(lr_eval_string("Siebel_Analytic_ViewState5_count");
lr_error_message("%d",j);
if(i<=j)
{
sprintf(str,"{Siebel_Analytic_ViewState5_%d}",i);
lr_save_string(lr_eval_string(str),"value");
"Name=ctl00$ContentPlaceMain$rptList$ctl00$hfItem", "Value={value}", ENDITEM, ;
i++;
}
/*
"Name=ctl00$ContentPlaceMain$rptList$ctl00$hfItem", "Value=37902", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl01$hfItem", "Value=37901", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl02$hfItem", "Value=37900", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl03$hfItem", "Value=37899", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl04$hfItem", "Value=37898", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl05$hfItem", "Value=37897", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl06$hfItem", "Value=37895", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl07$hfItem", "Value=37894", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl08$hfItem", "Value=37893", ENDITEM,
"Name=ctl00$ContentPlaceMain$rptList$ctl09$hfItem", "Value=37857", ENDITEM,
*/
"Name=operate", "Value=", ENDITEM,
"Name=ctl00$ContentPlaceMain$btnUpShelf1", "Value=上 架", ENDITEM,
LAST);
复制代码
PS:Siebel_Analytic_ViewState5是个关联,ord=all,取的是循环部分那部分数值!
我想写个循环在web_submit_data里面,但是一直提示语法出错,求教!哪里需要修改或者哪里出错了!新人,勿喷!
作者:
mystic
时间:
2012-8-3 09:47
傻孩子,循环只能写在web_submit_data外面!
作者:
yubiao584521
时间:
2012-8-3 11:28
[img][/img]
作者:
云层
时间:
2012-8-3 12:13
请在关联请求后写处理,而不能在函数中写C语言
作者:
ken19850
时间:
2012-8-3 17:09
呵呵,新手,且半路出家身份!谢谢各位的热心回答!小弟又学到了点东西!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2