lr关联出错,提示:错误 -35061: 找不到请求的参数
本帖最后由 sqfsyz 于 2012-12-14 16:45 编辑在录制一个登录功能,操作步骤相同,但是录制的脚本中VIEWSTATE和EVENTVALIDATION前后两次录制的值不一样,顾对这两个进行关联:
录制时的脚本为:
Action()
{
web_url("Login.aspx",
"URL=http://192.168.3.83:9526/Login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/image/login_p_img03.gif", ENDITEM,
"Url=/image/a_te02.gif", ENDITEM,
LAST);
lr_start_transaction("login");
web_submit_data("Login.aspx_2",
"Action=http://192.168.3.83:9526/Login.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.3.83:9526/Login.aspx",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=__VIEWSTATE", "Value=/wEPDwUKMTA2OTkwMTQ1Mg8WAh4ER1VJRAUkYzhjYzM0MmQtOTUyOC00YjJiLWFiOTAtZjAzMGNhODQyNTU2FgICAQ9kFgICAQ8PFgIeBFRleHQFJGM4Y2MzNDJkLTk1MjgtNGIyYi1hYjkwLWYwMzBjYTg0MjU1NmRkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBQhidG5Mb2dpbmqhjCdP/vhPHaQrqLJsbVbNMEEB", ENDITEM,
"Name=__EVENTVALIDATION", "Value=/wEWBQKO0qHSCAKl1bK4CQKC3IeGDALKw6LdBQLO44u1Df3LTK2QOl3zabG9PRxro2/ZgqZQ", ENDITEM,
"Name=txtUsername", "Value=shiqinfang", ENDITEM,
"Name=txtPass", "Value=sqf123456", ENDITEM,
"Name=CheckCode", "Value=1234", ENDITEM,
"Name=btnLogin.x", "Value=69", ENDITEM,
"Name=btnLogin.y", "Value=26", ENDITEM,
EXTRARES,
"Url=/image/content-bg.gif", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/mail_leftbg.gif", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/top_bt.jpg", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/top-right.gif", "Referer=http://192.168.3.83:9526/webCode/index/Admin_top.aspx", ENDITEM,
"Url=/image/menu_topline.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/menu_bgS.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/menu_bg1.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/menu_bg2.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
LAST);
lr_end_transaction("login",LR_AUTO);
关联后的脚本为:
web_set_max_html_param_len("999999");
web_reg_save_param_ex(
"ParamName=CorrelationParam1",
"LB=\"Name=__VIEWSTATE\", \"Value=",
"RB=\"",
SEARCH_FILTERS,
"Scope=BODY",
"RequestUrl=*/Login.aspx*",
LAST);
web_reg_save_param_ex(
"ParamName=CorrelationParam2",
"LB=\"Name=__EVENTVALIDATION\", \"Value=",
"RB=\"",
SEARCH_FILTERS,
"Scope=BODY",
"RequestUrl=*/Login.aspx*",
LAST);
web_url("Login.aspx",
"URL=http://192.168.3.83:9526/Login.aspx",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"Url=/image/a_te02.gif", ENDITEM,
"Url=/image/login_p_img03.gif", ENDITEM,
LAST);
lr_start_transaction("login");
web_submit_data("Login.aspx_2",
"Action=http://192.168.3.83:9526/Login.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.3.83:9526/Login.aspx",
"Snapshot=t4.inf",
"Mode=HTML",
ITEMDATA,
"Name=__VIEWSTATE", "Value={CorrelationParam1}", ENDITEM,
"Name=__EVENTVALIDATION", "Value={CorrelationParam2}", ENDITEM,
"Name=txtUsername", "Value=shiqinfang", ENDITEM,
"Name=txtPass", "Value=sqf123456", ENDITEM,
"Name=CheckCode", "Value=1234", ENDITEM,
"Name=btnLogin.x", "Value=45", ENDITEM,
"Name=btnLogin.y", "Value=20", ENDITEM,
EXTRARES,
"Url=/image/mail_leftbg.gif", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/content-bg.gif", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/top_bt.jpg", "Referer=http://192.168.3.83:9526/webCode/index/Right.html", ENDITEM,
"Url=/image/menu_bgS.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/menu_topline.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/menu_bg1.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
"Url=/image/top-right.gif", "Referer=http://192.168.3.83:9526/webCode/index/Admin_top.aspx", ENDITEM,
"Url=/image/menu_bg2.gif", "Referer=http://192.168.3.83:9526/webCode/index/Left.aspx", ENDITEM,
LAST);
lr_end_transaction("login",LR_AUTO);
回放总是提示:
Action.c(22): 错误 -35061: 找不到请求的参数“CorrelationParam1”的匹配项。检查请求的边界是否存在于响应数据中。此外,如果要保存的数据超过 256 个字节,请使用 web_set_max_html_param_len 增加参数大小
Action.c(22): 错误 -35061: 找不到请求的参数“CorrelationParam2”的匹配项。检查请求的边界是否存在于响应数据中。此外,如果要保存的数据超过 256 个字节,请使用 web_set_max_html_param_len 增加参数大小
Action.c(22): web_url("Login.aspx") 最高严重级别为“ERROR”,27125 个正文字节,3064 个标头字节 我现在也遇到这样的问题了,正在找解决方法,你还知道原因了? 应该是左右边界没设好吧,或是说这个地方压根就不需要进行关联,这是我的想法哈 看你贴出来的东西好像左右边界从脚本里面取的,应该从生成日志里面取,欢迎加入群260113421相互学习 应该在SUBMIT前加关联事物吧。
页:
[1]