|
插入文本检查点后出现这个错误。
vuser_init.c(98): Registering web_reg_find was successful [MsgId: MMSG-26390]
vuser_init.c(102): Notify: Parameter Substitution: parameter "username" = "test1"
vuser_init.c(102): Notify: Parameter Substitution: parameter "password" = "test1"
vuser_init.c(102): Registered web_reg_find successful for "Text=Welcome" [MsgId: MMSG-26362]
vuser_init.c(102): Notify: Saving Parameter "welcome_count = 0".
vuser_init.c(102): web_submit_data("login.pl") was successful, 795 body bytes, 225 header bytes [MsgId: MMSG-26386]
vuser_init.c(120): Warning: The string 'welcome_Count' with parameter delimiters is not a parameter.
vuser_init.c(124): Error: log on failed.
为什么这个脚本的返回值是0.
脚本如下:
web_reg_find("Search=Body",
"Text=Welcome","savecount=welcome_count",
LAST);
web_submit_data("login.pl",
"Action=http://127.0.0.1:1080/WebTours/login.pl",
"Method=POST",
"RecContentType=text/html",
"Referer=http://127.0.0.1:1080/WebTours/nav.pl?in=home",
"Snapshot=t8.inf",
"Mode=HTML",
ITEMDATA,
"Name=userSession", "Value=107180.249007695ffVDAitpAfiDDDDDDDAHipfAtDf", ENDITEM,
"Name=username", "Value={username}", ENDITEM,
"Name=password", "Value={password}", ENDITEM,
"Name=JSFormSubmit", "Value=off", ENDITEM,
"Name=login.x", "Value=48", ENDITEM,
"Name=login.y", "Value=10", ENDITEM,
LAST);
if (atoi(lr_eval_string("{welcome_Count}"))>0)
{lr_output_message("log on successful.");
}
else{
lr_error_message("log on failed.");
} |
|