本帖最后由 sagapo1314 于 2010-12-21 13:15 编辑
之前录制的脚本,有做过ip地址的参数化,后来强制关闭LR后,再进行录制时,就会出现将ip中的0替换掉了,这个怎么处理啊,
在vuser_init中有部分ip是正常的
lr是9.5版本,
URL=http://10.10.5.28:7777被替换成URL=http://1{CSRule_1_UID9}.1{CSRule_1_UID9}.5.28:7777
部分脚本如下:/* -------------------------------------------------------------------------------
Script Title
:
Script Description :
Recorder Version
: 3041
------------------------------------------------------------------------------- */
vuser_init() {
web_add_cookie("cn_current_skin=xtheme-default; DOMAIN=10.10.5.28");
web_add_cookie("N03209.szIndexFrameAutoHideMenu=true; DOMAIN=10.10.5.28");
web_set_max_html_param_len("1024");
web_url("web",
"URL=http://10.10.5.28:7777/web/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTTP",
LAST);
web_reg_save_param("CSRule_1_UID9",
"LB= value=\"",
"RB=\"",
"Ord=4",
"Search=Body",
"RelFrameId=1",
LAST);
/* Registering parameter(s) from source task id 25
// {CSRule_1_UID7} = "/web"
// */
web_reg_save_param("CSRule_1_UID7",
"LB= value=\"",
"RB=\"",
"Ord=2",
"Search=Body",
"RelFrameId=1",
LAST);
/* Registering parameter(s) from source task id 25
// {CSRule_1_UID6} = "close"
// */
web_reg_save_param("CSRule_1_UID6",
"LB= value=\"",
"RB=\"",
"Ord=1",
"Search=Body",
"RelFrameId=1",
LAST);
/* Registering parameter(s) from source task id 25
// {CSRule_1_UID8} = "null"
// */
web_reg_save_param("CSRule_1_UID8",
"LB= value=\"",
"RB=\"",
"Ord=3",
"Search=Body",
"RelFrameId=1",
LAST);
web_submit_data("loginAction.do",
"Action=http://10.10.5.28:7777/web/loginAction.do",
"Method=POST",
"RecContentType=text/html",
"Referer=http://10.10.5.28:7777/web/login.jsp",
"Snapshot=t12.inf",
"Mode=HTTP",
ITEMDATA,
"Name=userId", "Value={CSRule_1_UID2}", ENDITEM,
"Name=password", "Value={CSRule_1_UID3}", ENDITEM,
"Name=moduleUrl", "Value=", ENDITEM,
"Name=bureauCode", "Value=", ENDITEM,
"Name=token", "Value=", ENDITEM,
LAST);
web_concurrent_start(NULL);
web_url("xmlHttp.js_2",
"URL=http://1{CSRule_1_UID9}.1{CSRule_1_UID9}.5.28:7777{CSRule_1_UID7}/system/js/xmlHttp.js",
"Resource=1",
"Referer=http://1{CSRule_1_UID9}.1{CSRule_1_UID9}.5.28:7777{CSRule_1_UID7}/loginAction.do",
LAST);
|