|
我在LoadRunner 8.1 中,录制相同的登录操作,以前的脚本是这样的 比如登录名:zhuxn ,在以后的脚本中都会以系统分配的变量自动代替username={CSRule_1_UID17}", ,脚本如下,但是我重装loadRuuner后重新录制还是该操作,却不是相同的结果比如登录名:zhuxn ,在以后的脚本中却不能以系统分配的变量代替用户名还是用户名 username=zhuxn 。 请问需要做怎样的设置
/* Registering parameter(s) from source task id 6
// {CSRule_1_UID17} = "zhuxn"
// */
web_reg_save_param("CSRule_1_UID17",
"LB= value=\"",
"RB=\"",
"Ord=5",
"Search=Body",
"RelFrameId=1",
LAST);
web_submit_data("Default.aspx",
"Action=http://192.168.0.129:8081/Default.aspx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.129:8081/",
"Snapshot=t3.inf",
"Mode=HTTP",
ITEMDATA,
"Name=__VIEWSTATE", "Value={CSRule_1_UID3}", ENDITEM,
"Name=username", "Value={loginName}", ENDITEM,
"Name=Button1", "Value={CSRule_1_UID4}", ENDITEM,
"Name=__EVENTVALIDATION", "Value={CSRule_1_UID5}", ENDITEM,
LAST);
lr_message("%s成功登录啦!",lr_eval_string("{CSRule_1_UID17}"));
web_submit_data("DefaultChannel.ashx",
"Action=http://192.168.0.129:8081/DefaultChannel.ashx",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.0.129:8081/Chat.aspx?username={CSRule_1_UID17}",
"Snapshot=t5.inf",
"Mode=HTTP",
ITEMDATA,
"Name=privateToken", "Value={CSRule_1_UID17}", ENDITEM,
"Name=lastMessageId", "Value=0", ENDITEM,
LAST); |
|