十万火急求助!LR登录BS系统回放遭拒绝
本帖最后由 noshadow 于 2011-12-20 09:33 编辑自动关联不行,手动根据RESPONSE关联SESSION后也不行,token是我自己根据回应在脚本中填写进去的。一登录回放就遭拒绝。求助!
以下是我的登录脚本部分
一到j_acegi_security_check执行之后就遭拒绝了。
web_submit_data("j_acegi_security_check",
"Action=http://localhost:8080/dmb/j_acegi_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8080/dmb/login.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=root", ENDITEM,
"Name=j_password", "Value=root", ENDITEM,
"Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
"Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
LAST);
全部登录代码如下,输入用户名密码进去后就停止录制了。
Action()
{
//Correlation comment - Do not change!Original value='0B4F0D8D0D0030F0EC7A6DF3323C262A' Name ='CorrelationParameter_1'
web_cache_cleanup();
web_reg_save_param_ex(
"ParamName=CorrelationParameter_1",
"LB=Set-Cookie: JSESSIONID=",
"RB=; Path",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);
//Correlation comment - Do not change!Original value='C665117C2E3C2A07C36D34DF12B7FFF55AFC1F02BA3B9E81' Name ='CorrelationParameter_2'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_2",
"LB= var token='",
"RB=';\r\n var contextPath",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);
web_url("login.jsp",
"URL=http://localhost:8080/dmb/login.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=css/common.css", ENDITEM,
"URL=../favicon.ico", ENDITEM,
"URL=../evideo/zh/logo.png", ENDITEM,
"URL=../footer.png", ENDITEM,
"URL=images/frame/login_bg.png", ENDITEM,
"URL=resources/images/default/window/left-corners.png", ENDITEM,
"URL=resources/images/default/window/right-corners.png", ENDITEM,
"URL=resources/images/default/window/top-bottom.png", ENDITEM,
"URL=resources/images/default/window/left-right.png", ENDITEM,
"URL=resources/images/default/button/btn-sprite.gif", ENDITEM,
"URL=resources/images/default/form/text-bg.gif", ENDITEM,
"URL=resources/images/default/sizer/s-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/ne-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/se-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/nw-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/e-handle.gif", ENDITEM,
"URL=resources/images/default/sizer/sw-handle.gif", ENDITEM,
"URL=resources/images/default/panel/tool-sprites.gif", ENDITEM,
LAST);
lr_think_time(3);
//Correlation comment - Do not change!Original value='3668F7F28A9812224A68A93760BA1DB34E17223EEE170E09' Name ='CorrelationParameter_3'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_3",
"LB= var token='",
"RB=';\r\n var contextPath",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login.jsp*",
LAST);
web_url("login.jsp_2",
"URL=http://localhost:8080/dmb/login.jsp?user=anonymousUser&token={CorrelationParameter_2}",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
LAST);
lr_think_time(3);
web_submit_data("j_acegi_security_check",
"Action=http://localhost:8080/dmb/j_acegi_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://localhost:8080/dmb/login.jsp",
"Snapshot=t3.inf",
"Mode=HTML",
ITEMDATA,
"Name=j_username", "Value=root", ENDITEM,
"Name=j_password", "Value=root", ENDITEM,
"Name=user", "Value=anonymousUser&token={CorrelationParameter_3}", ENDITEM,
"Name=url","Value=welcome.jsp?user=root&token={CorrelationParameter_3}", ENDITEM,
LAST);
售价太高了啊 这是让回答问题吗? 这个。。。。楼主要问什么? 拒绝具体是什么错? 学习中,LR总录制不了呢 回复 3# jldzwangbo08
不好意思,我以为那是跟CSDN一样,给别人分的。。。。 回复 3# jldzwangbo08
。。。。。。我错了 回复 4# archonwang
怎么搞脚本登录进去。。 回复 5# mr.bee
没有具体的,就提示框,访问遭拒绝 回复 11# szyszy2000
录制了两次了,不同的都关联了。还有TOKEN也进行了关联。 后来发现,无论关不关联,其实回放时操作也都做了。可是就是LR上的浏览器回放老遭拒绝! 楼上的是否可以提供个截图或是别的什么。真不知道你的问题。 另外,lr的浏览器是否存在问题应该不是主要的。具体还是要看是否有数据变化或是日志 LR还不是很熟,继续学习中 进来一起聊聊
软件测试开发(已满)
172709641软件测试开发联盟①
51570236 软件测试开发联盟②
页:
[1]