pkqsunfly
pkqsunfly
2017-07-12 10:44

LR 录制cas sso 单击登录

100
  • 脚本
  • sso

图片说明]
登录脚本时,接口的变化如附图所示。
LR录制的脚本如下
web_submit_data("login;{myCookies}-n1",
"Action=http://rzcloud.shhyit.com:8190/cas/login;jsessionid={myCookies}-n1?service=http://hycloud.shhyit.com:8195/portal_main/toPortalPage",
"Method=POST",
"RecContentType=text/html",
"Referer=http://rzcloud.shhyit.com:8190/cas/login?service=http://hycloud.shhyit.com:8195/portal_main/toPortalPage",
"Snapshot=t13.inf",
"Mode=HTTP",
ITEMDATA,
"Name=username", "Value=jiu23", ENDITEM,
"Name=password", "Value=111111", ENDITEM,
"Name=authCode", "Value=", ENDITEM,
"Name=lt", "Value={ITURL}", ENDITEM,
"Name=execution", "Value=e1s1", ENDITEM,
"Name=_eventId", "Value=submit", ENDITEM,
"Name=isQrSubmit", "Value=false", ENDITEM,
// "Name=qrValue", "Value=3005957d5f8b4f1fa2f9860af015c9db", ENDITEM,
LAST);

增加了重定向内容
web_set_option("MaxRedirectionDepth", "0", LAST );

web_url("getLocation1",
         "URL=http://hycloud.shhyit.com:8195/portal_main/toPortalPage?ticket={ITURL}",                  //此处URL已做参数化
         "TargetFrame=",
 "Resource=0",
 "Referer=http://rzcloud.shhyit.com:8190/cas/login?service=http://hycloud.shhyit.com:8195/portal_main/toPortalPage",
LAST);

但是报错:
Error -26628: HTTP Status-Code=403 (Forbidden) for "http://hycloud.shhyit.com:8195/portal_main/toPortalPage?ticket=LT-624-7qFRVBPxFVS1hvVajGrfNxyNhrxiEr-http://10.103.100.41:8091/cas"

图片说明

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐