|
登陆界面用户登陆的时候系统会验证该登陆用户是否正在使用系统 如果正在使用就提示该用户正在使用 再次点击登陆按钮 可以强行登陆
用loadrunner录制了脚本以后会回放的时候会提示失败
Action()
{
web_url("IPBearNet",
"URL=http://192.168.70.237:9080/IPBearNet",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_url("login.do",
"URL=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t2.inf",
"Mode=HTML",
EXTRARES,
"Url=styles/style_sc/images/login/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/btn_login.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/login/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
"Url=styles/style_sc/images/logo_zone-01.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=valSoftInfo", ENDITEM,
LAST);
lr_think_time( 2 );
web_submit_form("login.do_2",
"Snapshot=t3.inf",
ITEMDATA,
"Name=loginName", "Value=xu", ENDITEM,
"Name=loginPwd", "Value=12", ENDITEM,
EXTRARES,
"Url=styles/style_sc/images/login/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/btn_login.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/login/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
"Url=styles/style_sc/images/logo_zone-01.gif", "Referer=http://192.168.70.237:9080/IPBearNet/login.do?method=Login", ENDITEM,
LAST);
web_submit_form("login.do_3",
"Snapshot=t4.inf",
ITEMDATA,
"Name=loginName", "Value=xu", ENDITEM,
"Name=loginPwd", "Value=12", ENDITEM,
LAST);
web_url("index.jsp",
"URL=http://192.168.70.237:9080/IPBearNet/index.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=styles/style_sc/images/studio/lineleft/r3_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/lineleft.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/lineright/r3_c4.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/lineright.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linemiddle/r3_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linemiddle.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linebottom/r4_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linebottom.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/linetop/r2_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/linetop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c2.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c1_zone.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/studio/navtop/r1_c3.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
"Url=styles/style_sc/images/navtopmenu/toprivetmenu.gif", "Referer=http://192.168.70.237:9080/IPBearNet/studio/navtop.jsp", ENDITEM,
LAST);
web_link("犚? 表 盘",
"Text=犚? 表 盘",
"Snapshot=t6.inf",
EXTRARES,
"Url=../styles/style_sc/images/navleft/bg_navleft.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r1_c1.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r1_c1-arrow.gif", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
"Url=../styles/style_sc/images/navleft/r2_openadown.jpg", "Referer=http://192.168.70.237:9080/IPBearNet/ibn/studio.do?method=LoadNavLeft&CRMId=111&menuPid=111&menuName=仪 表 盘", ENDITEM,
LAST);
在回放的过程中 如果已有人员登陆 脚本可以直接通过
如果没有人登陆 脚本提示
Action.c(47): Error -27979: Requested form not found [MsgId: MERR-27979]
Action.c(47): web_submit_form("login.do_3") highest severity level was "ERROR", 0 body bytes, 0 header bytes [MsgId: MMSG-26388]
求脚本改进办法 |
|