51Testing软件测试论坛

标题: 关联函数的一个例子 [打印本页]

作者: 土豆飞侠    时间: 2007-10-23 13:52
标题: 关联函数的一个例子
我写的关联函数有些问题,不知道怎么改,不确定是函数名不能一样,还是其他的。脚本如下:
lr_think_time( 1 );
   web_reg_save_param("appInfos","LR=ITEMDATA, "Name=appInfos", "Value=","RB=, ENDITEM,"Name=");
   web_reg_save_param("appInfos","LR="Name=appInfos", "Value=","RB=", ENDITEM,");
web_submit_data("firstApprovePrevise.action",
  "Action=http://10.0.0.75:8085/firstApprovePrevise.action",
  "Method=POST",
  "TargetFrame=",
  "RecContentType=text/html",
  "Referer=http://10.0.0.75:8085/showFirstApproveList.action?corpCde=&rappNo=&receiverCorp=&applyDateStart=&applyDateEnd=&receiverCorpCn=&cdCatCde=&otherPlaceLic=",
  "Snapshot=t6.inf",
  "Mode=HTML",
  ITEMDATA,
  "Name=appInfos", "Value=4a5cbb5c-60f4-11dc-b705-95e216347f0c$119$1$071100100000657600041$A", ENDITEM,
  "Name=appInfos", "Value=4a5a716a-60f4-11dc-b705-95e216347f0c$119$1$071100100000657600039$A", ENDITEM,
  LAST);
报的错误如下:
Action.c (93): syntax error; found `Name' expecting `)'
Action.c (93): syntax error; found `Name' expecting `;'
Action.c (93): undeclared identifier `Name'
Action.c (93): undeclared identifier `appInfos'
Action.c (93): syntax error; found ", " expecting `;'
Action.c (93): syntax error; found `Value' expecting `;'
Action.c (93): undeclared identifier `Value'
Action.c (93): operands of = have illegal types `int' and `pointer to char'
Action.c (93): syntax error; found `RB' expecting `;'
Action.c (93): undeclared identifier `RB'
Action.c (93): illegal expression
Action.c (93): syntax error; found "ENDITEM" expecting `;'
Action.c (93): syntax error; found `)' expecting `;'
Action.c (93): illegal statement termination
Action.c (93): skipping `)'
Action.c (94): syntax error; found `Name' expecting `)'
Action.c (94): syntax error; found `Name' expecting `;'
Action.c (94): syntax error; found ", " expecting `;'
Action.c (94): syntax error; found `Value' expecting `;'
Action.c (94): operands of = have illegal types `int' and `pointer to char'
Action.c (94): too many errors  
老家各位帮我看一下。
作者: xingcyx    时间: 2007-10-23 14:05
晕,你这个连编译都没通过。语法有问题。
"LB="和"RB="里面的引号需要用转义符“\"转义,另外,你的LB好象也写错了,写成LR了。。
做事情要细心点。。
作者: 白蚁    时间: 2007-10-23 14:26
web_reg_save_param("appInfos","LR=ITEMDATA, "Name=appInfos", "Value=","RB=, ENDITEM,"Name=");
   web_reg_save_param("appInfos","LR="Name=appInfos", "Value=","RB=", ENDITEM,");
你是想关联下面这两个吧 关联出错了 还有你的管理名称不要一样 这样出问题不好查找。
左右边界重新定义
  "Name=appInfos", "Value=4a5cbb5c-60f4-11dc-b705-95e216347f0c$119$1$071100100000657600041$A", ENDITEM,
  "Name=appInfos", "Value=4a5a716a-60f4-11dc-b705-95e216347f0c$119$1$071100100000657600039$A", ENDITEM,
作者: rickyzhu    时间: 2007-10-23 22:55
两个变量名都一样了,语法不对,F1看看帮助就知道了撒
作者: 土豆飞侠    时间: 2007-10-25 16:47
标题: 十分感谢
多谢!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2