LR11中怎么增加中文的文本检查点
用LR11录制了一段脚本,登录后是这个界面。录制完成后是: web_url("hz6","URL=http://192.168.1.8:9081/hz6",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
EXTRARES,
"URL=/hz6/resource/skins/default/css/img/login_bg.png", "Referer=http://192.168.1.8:9081/hz6/", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/login_inner.png", "Referer=http://192.168.1.8:9081/hz6/", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/btn_login.png", "Referer=http://192.168.1.8:9081/hz6/", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/title_bg2.gif", "Referer=http://192.168.1.8:9081/hz6/", ENDITEM,
LAST);
web_add_cookie("user; DOMAIN=192.168.1.8");
lr_start_transaction("login");
web_submit_data("userLoginAuthentication.login",
"Action=http://192.168.1.8:9081/hz6/userLoginAuthentication.login",
"Method=POST",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://192.168.1.8:9081/hz6/",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=verifyType", "Value=0", ENDITEM,
"Name=loginName", "Value=admin", ENDITEM,
"Name=ssoPassword", "Value=146584EFCE09AC17", ENDITEM,
"Name=yyy2d073d0310b1Ipu2d074db4", "Value=1234", ENDITEM,
"Name=loginModel", "Value=user", ENDITEM,
"Name=appname", "Value=", ENDITEM,
LAST);
web_url("operator.jsp",
"URL=http://192.168.1.8:9081/hz6/resource/skins/default/operator.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t3.inf",
"Mode=HTML",
EXTRARES,
"URL=css/img/h_bg.jpg", ENDITEM,
"URL=css/img/nav_bg.jpg", ENDITEM,
"URL=css/img/set.gif", ENDITEM,
"URL=css/img/menu/business.png", ENDITEM,
"URL=css/img/exit_bg.gif", ENDITEM,
"URL=css/img/subli_bg.gif", ENDITEM,
"URL=css/img/logooperator.gif", ENDITEM,
"URL=css/img/home.gif", ENDITEM,
"URL=css/img/design.png", ENDITEM,
"URL=css/img/manage.gif", ENDITEM,
"URL=css/img/iconmode.gif", ENDITEM,
"URL=css/img/home_r.png", ENDITEM,
"URL=css/img/menu/toturial.png", ENDITEM,
LAST);
web_url("loadfirstlevelmenu.jsp",
"URL=http://192.168.1.8:9081/hz6/horizon/menu/loadfirstlevelmenu.jsp?menuCategory=1",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://192.168.1.8:9081/hz6/resource/skins/default/operator.jsp",
"Snapshot=t4.inf",
"Mode=HTML",
LAST);
web_url("layout.doGetUserLayoutContent.do",
"URL=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.8:9081/hz6/resource/skins/default/operator.jsp",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"URL=/hz6/resource/skins/default/css/img/bg.jpg", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/footer_bg.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/toright.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/icon_dt.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/mainnav_bg.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/toleft.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
LAST);
web_url("sysmenu.xmlbyjs.jsp",
"URL=http://192.168.1.8:9081/hz6/horizon/menu/sysmenu.xmlbyjs.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic",
"Snapshot=t6.inf",
"Mode=HTML",
EXTRARES,
"URL=/hz6/resource/skins/default/css/img/tips.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
"URL=/hz6/resource/skins/default/css/img/footer_libg.png", "Referer=http://192.168.1.8:9081/hz6/horizon/layout/layout.doGetUserLayoutContent.do?userId=public&flag=pic", ENDITEM,
LAST);
web_find("Text Check",
"What=您好,",
LAST);
lr_end_transaction("login", LR_AUTO);
代码中的检查点是录制时候添加的,但是回放的时候会出错,放到什么地方都出错:vuser_init.c(73): 错误 -27195: “Text Check”失败。找到“您好,”的 0 处出现(RightOf=“”,LeftOf=“”)
vuser_init.c(73): web_find 最高严重级别为“ERROR”
请问是LR11不支持中文检查点吗?还是我设置的有问题 支持,要看看是不是乱码了 请问您指的乱码是哪里那。要怎么检查或者设置什么地方那。运行时设置那地方我是设置的utf-8的格式 如果不是UTF-8编码设置了也会乱码 检查编码还检查什么地方那。回放的时候页面显示的是正常的,没有乱码 方法一:你可以试下注释掉所有的web_add_cookie函数,有可能cookie失效了,没有进入到你想进的页面
方法二:看你用哪种模式录制的脚本,如果是URL,请用web_reg_find函数,因为web_find函数录只能对基于HTTP模式录制的脚本中进行查找,web_reg_find函数没有限制
还是不行,也有可能是两个原因,两者一起试
另外:方法二中说的web_reg_find函数是注册型函数,放在要校验的请求之前
页:
[1]