<table id="result">
<head>
<cols name="result" type="string" defaultvalue="" selectvalue="" cn_name="执行结果" length="" />
<cols name="sessionid" type="string" defaultvalue="" selectvalue="" cn_name="session编码" length="" />
</head>
<body>
<rows result="true" sessionid="F0BC29CC29F753EFC840327E41162681" />
</body>
</table>
web_reg_save_param("jsessionid",
"LB=result=\"true\" sessionid=\"",
"RB=\" /",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
web_reg_save_param("jsessionid",
"LB=result=\"true\" sessionid=\"",
"RB=\" /",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
web_reg_save_param("jsessionid",
"LB=result=\"true\" sessionid=\"",
"RB=\" /",
"Ord=1",
"Search=body",
"RelFrameId=1",
LAST);
原帖由 Zee 于 2008-3-13 13:19 发表
改为:
web_reg_save_param("jsessionid",
"LB=result=\"true\" sessionid=\"",
"RB=\"",
"Ord=all",
"Search=body",
...
原帖由 justsoo 于 2008-3-13 15:26 发表
将这两行代码注释掉
j=atoi(lr_eval_string("{jsessionid_count}"));
lr_output_message("the j is %d",j);
改为:
lr_output_message("the jsessionid is: %s", lr_eval_string("{jsessionid}")); ...
原帖由 justsoo 于 2008-3-13 15:51 发表
呵呵,你位置放错了。格式应该是这样的:
web_reg_save_param("jsessionid",
"LB=result=\"true\" sessionid=\"",
"RB=\" /",
"NotFound=ERROR",
...
原帖由 justsoo 于 2008-3-13 16:23 发表
web_reg_save_param( );
和
lr_output_message( );
这两个函数中间有web_custom_request( )请求函数吗?
类似于这样的格式:
web_reg_save_param( );
web_custom_request( )
lr_output_message( );
//关联从XML文件中获取 jsessionid
web_reg_save_param("jsessionid",
"LB=",
"RB=",
"NotFound=ERROR",
"Ord=1",
"Search=body",
//"RelFrameId=1",
LAST);
web_custom_request("servlet",
"URL=http://172.16.37.11/scmserver/servlet?userid=dawee&password=F578EA9AC07F28AD77BD195780B92DF2",
"Method=POST",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t4.inf",
"Mode=HTTP",
"EncType=application/xml",
LAST);
//输出获取的jsessionid
lr_output_message("the jsessionid is: %s", lr_eval_string("{jsessionid}"));
原帖由 rickyzhu 于 2008-3-15 21:00 发表
两个问题,仔细验证一下:
1. 代码的位置,应该放在submit代码之前,然后再submit之后进行输出验证
2. 输出验证代码,lr_output_message的写法,仔细检查
我曾经也遇到过这个问题,这个问题比较常见。相信很多 ...
<body>
<rows result="true" sessionid="0000xFi0mTEvo0yfZd-BXgPXXkE:123456780" />
</body>
web_reg_save_param("jsessionid",
"LB=sessionid=\"",
"RB=\" />",
"ORD=1",
"Search=body",
LAST);
web_reg_save_param("jsessionid",
"LB=sessionid='",
"RB=' />",
"ORD=1",
"Search=body",
LAST);
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) | Powered by Discuz! X3.2 |