LR回放报错26628,怎么解决啊。。。。
报错的内容是这样的:Action.c(74): Error -26628: HTTP Status-Code=403 (Forbidden) for "http://www.yunbstar.com.cn:90/ServiceCustomer.svc/GetSelfCustomer"
Action.c(74): Warning -26200: At least one of the resources specified by EXTRARES has not been downloaded due to the above error(s)
Action.c(74): web_custom_request("GetSelfCustomer") highest severity level was "ERROR", 72 body bytes, 180 header bytes 403禁止访问,看看发送的body部分是不是有 会话ID没有参数化 我以前也遇到过这样的问题,是因为你部署的测试应用服务器环境有问题,得需要修改一下配置,具体怎么修改的配置,得需要开发去协助的,好像是允许访问的配置的; 你可以把完整的脚本贴出来,帮你看看! 问题原因:403 Forbidden是HTTP协议中的一个状态码(Status Code),一般会出现在用户请求一些服务器上被禁止请求的数据或页面时发生。可以简单的理解为没有权限访问此站.
分析解决:说明这段脚本中访问服务器时需要进行验证,而你的脚本中验证部分未通过。需要调一下脚本程序,看看是哪里验证出现问题。 单元测试 zhysync 发表于 2015-6-12 10:52
你可以把完整的脚本贴出来,帮你看看!
web_custom_request("Login",
"URL=http://www.yunbstar.com.cn:90/ServiceCustomer.svc/Login",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://www.yunbstar.com.cn:90/",
"Snapshot=t2.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
"Body={\"LoginName\":\"bluesky2006_test\",\"Password\":\"46f94c8de14fb36680850768ff1b7f2a\",\"LoginType\":1,\"AgentVersion\":\"IE 9.0\"}",
LAST);
web_add_cookie("bsrChannelShowType=1; DOMAIN=www.yunbstar.com.cn");
web_submit_data("LoginHandler.ashx",
"Action=http://www.yunbstar.com.cn:90/PageHandler/LoginHandler.ashx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://www.yunbstar.com.cn:90/",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=action", "Value=login", ENDITEM,
"Name=id", "Value=2", ENDITEM,
"Name=current", "Value=Bluesky2006_test", ENDITEM,
"Name=token", "Value=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Name=signInType", "Value=2", ENDITEM,
LAST);
web_url("Index.aspx",
"URL=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.yunbstar.com.cn:90/",
"Snapshot=t4.inf",
"Mode=HTML",
EXTRARES,
"Url=../Images/icons/image_Banner.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
web_custom_request("GetSelfCustomer",
"URL=http://www.yunbstar.com.cn:90/ServiceCustomer.svc/GetSelfCustomer",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Snapshot=t5.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
EXTRARES,
"Url=../PageHandler/LoginHandler.ashx?action=isLogin", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
web_custom_request("MySpace.aspx",
"URL=http://www.yunbstar.com.cn:90/Pages/MySpace.aspx?timestamp=1434345717308",
"Method=POST",
"Resource=0",
"RecContentType=text/html",
"Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Snapshot=t6.inf",
"Mode=HTML",
"EncType=charset=UTF-8",
EXTRARES,
"Url=../JqueryPlugins/zTree_v3.5/js/jquery.ztree.all-3.5.js?_=1434345713451", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../JqueryPlugins/popModal/popModal.js?_=1434345713452", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
web_custom_request("GetResourceGroup",
"URL=http://www.yunbstar.com.cn:90/ResourceGroup.svc/GetResourceGroup",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Snapshot=t7.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
EXTRARES,
"Url=../Images/icons/icon_ListMode_Selected.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
web_custom_request("SearchChannelByPage",
"URL=http://www.yunbstar.com.cn:90/Channel.svc/SearchChannelByPage",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Snapshot=t8.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
"Body={\"RequestCount\":999,\"StartCount\":1,\"KeyWord\":\"\",\"IsGroup\":0,\"ResouceGroupId\":0}",
EXTRARES,
"Url=../Images/icons/icon_Edit_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/icon_Snipzoom_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/icon_Play36x36_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/Line_VideoSplit.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
问了下开发的,说是要用post登陆,post怎么写脚本啊。。。。请大神指导
hxw32315 发表于 2015-6-15 13:28
web_custom_request("Login",
"URL=http://www.yunbstar.com.cn:90/ServiceCustomer.s ...
这开发说的不是废话吗,web_custom_request("SearchChannelByPage",
"URL=http://www.yunbstar.com.cn:90/Channel.svc/SearchChannelByPage",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A",
"Snapshot=t8.inf",
"Mode=HTML",
"EncType=application/json;charset=UTF-8",
"Body={\"RequestCount\":999,\"StartCount\":1,\"KeyWord\":\"\",\"IsGroup\":0,\"ResouceGroupId\":0}",
EXTRARES,
"Url=../Images/icons/icon_Edit_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/icon_Snipzoom_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/icon_Play36x36_Normal.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
"Url=../Images/icons/Line_VideoSplit.png", "Referer=http://www.yunbstar.com.cn:90/Pages/Index.aspx?token=customer_F91C9D830CC31271B90ADAA023DCE4530F42F149D125EF70357814689ECB620A", ENDITEM,
LAST);
这个不是post方法么,我抓包看了一下,登录之后的每个请求都有一个cookie带着会话ID信息,估计是这个原因
@作者;@ zhanghl820716
我也遇到 类似问题。
web_custom_request("user.do_2",
"URL=https://。。。。/ftsp/portal/user.do?menus",
"Method=POST",
"Resource=0",
"RecContentType=application/json",
"Referer=https://。。。。/portal/ftsp/portal/home.do",
"Snapshot=t62.inf",
"Mode=HTTP",
"EncType=application/x-www-form-urlencoded; charset=UTF-8",
"Body=areaCode=portal_top,portal_center,portal_center_sub,portal_sys,portal_tax,portal_set,portal_kh,portal_set_sub",
LAST);
回放则提示 Error -26628: HTTP Status-Code=403 (Forbidden) for "https://。。。。/portal/ftsp/portal/user.do?menus"
但是这个请求的脚本里面没有带相关的session 的,而body 里面的内容都是固定的。 不知道需要配置应用服务器中的 什么设置? 哥哥姐姐看到我。。。
hxw32315 现在有解决 么?
楼主问题解决没呢? 我也遇到同样问题 楼主怎么解决的?
页:
[1]