码迷,mamicode.com
首页 > 其他好文 > 详细

LR函数基础(一)

时间:2015-04-07 23:17:11      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:

函数用到:web_reg_find()、 lr_log_message()、 lr_eval_string()、strcmp()、atoi()

 

Action()
{
    web_reg_find("Text=liuej", "SaveCount=para_count", LAST); //文本检查,且保存变量

  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)     //法1.验证是否找到了页面上的要检查的字符串
        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)  // 法2.验证是否找到了页面上的要检查的字符串
  lr_output_message("find");
 else
  lr_output_message("not find");

 return 0;
}

LR函数基础(一)

标签:

原文地址:http://www.cnblogs.com/shengs/p/4399691.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!