txs00 发表于 2009-9-18 15:26:12

LR录制的时候代码有的中文显示乱码是什么原因?

Action()
{

        web_url("HRAS",
                "URL=http://192.168.1.186:8989/HRAS",
                "Resource=0",
                "RecContentType=text/html",
                "Referer=",
                "Snapshot=t1.inf",
                "Mode=HTML",
                EXTRARES,
                "Url=/favicon.ico", "Referer=", ENDITEM,
                LAST);

        lr_think_time(4);

        web_link("鑽\xAF\xE7洃鐢ㄦ埛",
                "Text=鑽\xAF\xE7洃鐢ㄦ埛",
                "Snapshot=t2.inf",
                LAST);

        web_submit_form("login.do",
                "Snapshot=t3.inf",
                ITEMDATA,
                "Name=userName", "Value=admin", ENDITEM,
                "Name=password", "Value=123456", ENDITEM,
                EXTRARES,
                "Url=images/jc02.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/about/yjs_bg.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/qtip/tip-sprite.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/left-right.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/corners-sprite.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/white-top-bottom.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/tool-sprites.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/toolbar/bg.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/top-bottom.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/icon/changeTheme.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tabs/tab-strip-bg.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/toolbar/btn-arrow.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/s.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tree/folder.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/panel/light-hd.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tabs/tabs-sprite.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tree/folder-open.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tree/elbow-end-minus.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=login.do?act=getUserInfo", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/folder_go.png", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/grid/loading.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tree/elbow-end-plus.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/banner/user.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/user02.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=images/banner/black_arrow.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                "Url=components/extjs/resources/images/default/tree/elbow-plus.gif", "Referer=http://192.168.1.186:8989/HRAS/hras/avalon.jsp", ENDITEM,
                LAST);

        return 0;
}
就前面的 中文显示用户名,密码这些有问题

txs00 发表于 2009-9-18 15:38:12

:Q

mzhy 发表于 2009-9-18 15:49:16

看看你测试的系统编码和lr录制时设置的编码格式是否一致

txs00 发表于 2009-9-18 17:11:48

回复 3# 的帖子

怎么看

yaojianbo83 发表于 2009-9-18 17:46:51

你在 Tools----Recording options----Advanced-里面的support charset 设置成 UTF-8          看看呢?

txs00 发表于 2009-9-20 11:46:05

回复 5# 的帖子

就是这个原因:victory:

cljerome 发表于 2012-1-9 17:19:39

在被测系统的
Web.config文件
<globalization requestEncoding="gb2312" responseEncoding="gb2312" fileEncoding="gb2312"/>加入到<system.web>。。。。。</system.web>节中
页: [1]
查看完整版本: LR录制的时候代码有的中文显示乱码是什么原因?