51Testing软件测试论坛
标题:
Http协议脚本中{}转义问题!
[打印本页]
作者:
racer0201
时间:
2013-1-21 15:42
标题:
Http协议脚本中{}转义问题!
本帖最后由 racer0201 于 2013-1-21 16:35 编辑
有个Java开发的系统,用的ZK框架,有操作时,用HTTP协议录制出来的脚本是:
web_submit_data("zkau_2",
"Action=http://
IP
/APS_KC/zkau",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://
IP
/APS_KC/index.zul",
"Snapshot=t41.inf",
"Mode=HTTP",
ITEMDATA,
"Name=dtid", "Value=z_1ya", ENDITEM,
"Name=cmd_0", "Value=onOpen", ENDITEM,
"Name=uuid_0", "Value=t_82", ENDITEM,
"Name=data_0", "Value={\"open\":true,\"reference\":\"t_53\"}", ENDITEM,
"Name=cmd_1", "Value=onClick", ENDITEM,
"Name=uuid_1", "Value=t_93", ENDITEM,
"Name=data_1", "Value={\"pageX\":313,\"pageY\":340,\"which\":1,\"x\":105,\"y\":14}", ENDITEM,
LAST);
但是这样在脚本回放时,会有提示:
Action.c(387): web_concurrent_end was successful, 65597 body bytes, 5773 header bytes [MsgId: MMSG-26386]
Action.c(391): Warning: The string '"open":true,"reference":"t_53"' with parameter delimiters is not a parameter.
Action.c(391): Warning: The string '"pageX":313,"pageY":340,"which":1,"x":105,"y":14' with parameter delimiters is not a parameter.
Action.c(391): web_submit_data("zkau_2") was successful, 66 body bytes, 236 header bytes [MsgId: MMSG-26386]
请问这个情况应该怎么处理?谢谢各位大神!补充一点,我用httpwatch获取的Post内容的确就是这样的格式,不太懂Java开发,现在很头疼啊,附图一张
[attach]83301[/attach]
作者:
云层
时间:
2013-1-21 17:44
你修改一下LR的通用设置把参数化的关联边界从{}改成[]就行了
作者:
racer0201
时间:
2013-1-23 10:49
选项已找到,如图[attach]83325[/attach][attach]83324[/attach]
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2