Functions used: Web_reg_find (), Lr_log_message (), lr_eval_string (), strcmp (), Atoi ()
Action ()
{
Web_reg_find ("Text=liuej", "Savecount=para_count", last); Text check, and save variables
Web_submit_form ("login.pl",
"Snapshot=t3.inf",
ItemData,
"Name=username", "Value={useranme}", Enditem,
"Name=password", "Value={password}", Enditem,
"Name=login.x", "value=59", Enditem,
"Name=login.y", "value=1", Enditem,
last);
Lr_log_message ("username=%s password=%s", lr_eval_string ("{useranme}"), Lr_eval_string ("{password}");
Lr_log_message ("count=%d", lr_eval_string ("{para_count}"));
if (Atoi (lr_eval_string ("{para_count}") >0)//Method 1. Verify that the string to check is found on the page
Lr_output_message ("We find the string!");
Else
Lr_output_message ("Sorry,don ' t find the string!");
if (strcmp (lr_eval_string ("{para_count}"), "0") >0)//Method 2. Verify that the string to check is found on the page
Lr_output_message ("find");
Else
Lr_output_message ("not find");
return 0;
}
LR function Basics (i)