|
9#
楼主 |
发表于 2011-8-17 17:44:51
|
只看该作者
本帖最后由 252090366 于 2011-8-17 17:47 编辑
恩,正如你说的那样!但是我想自己的代码里面来关联session,看是否能通过LR本身来解决问题!
=============================
代码如下:
Action()
{
web_url("eoms",
"URL=http://*.*.*.*:8081/eoms",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t82.inf",
"Mode=HTML",
LAST);
web_url("logon.do",
"URL=http://*.*.*.*:8081/eoms/logon.do",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t83.inf",
"Mode=HTML",
LAST);
flex_web_request("getMessageServer.jsp",
"URL=http://*.*.*.*:8081/eoms/portalLogon/getMessageServer.jsp?pg="
"portal",
"Method=GET",
"Resource=0",
"RecContentType=text/html",
"Referer=http://*.*.*.*:8081/eoms/logon.do",
"Snapshot=t84.inf",
"Mode=HTML",
"EncType=text/xml",
"Body=pg=portal",
LAST);
lr_rendezvous("login_rendezvous");
lr_start_transaction("login_transaction");
web_set_user("*.*.*.*\\admin","ynlteoms","*.*.*.*:8081");
web_submit_data("j_security_check",
"Action=http://*.*.*.*:8081/eoms/j_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://*.*.*.*:8081/eoms/logon.do",
"Snapshot=t85.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=admin", ENDITEM,
"Name=j_password", "Value=ynlteoms", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("WdatePicker.css",
"URL=http://*.*.*.*:8081/eoms/_script/DatePicker/skin/WdatePicker.css",
"Resource=1",
"RecContentType=text/css",
"Referer=http://*.*.*.*:8081/eoms/mainbody.do?type=getMenu",
"Snapshot=t86.inf",
LAST);
=====================
web_submit_data("j_security_check",
"Action=http://*.*.*.*:8081/eoms/j_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://*.*.*.*:8081/eoms/logon.do",
"Snapshot=t85.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=admin", ENDITEM,
"Name=j_password", "Value=*******", ENDITEM,
LAST);
主要是这段代码,Action=http://*.*.*.*:8081/eoms/j_security_check,这个地址会去检查session,如果不正常系统会拒绝登陆,跳转到登陆页面,录制时,是没走到这一步的!所以在执行时,会造成访问这个页面出现问题,返回HTTP401。我只想自己在脚本中看能不能做SESSION的关联来解决这个问题!
|
|