1、判断系统是否登录成功,我们一般使用 web_reg_find 函数
2、web_reg_find 函数一般有2种判断方式
2.1、检查期望值,找到则返回成功: web_reg_find("Text=ilm904pl","Search=Body",LAST);
2.2、检查错误值,找到则返回失败,否则成功:web_reg_find("Text=ilm9XXX","Fail=FOUND","Search=Body",LAST);
3、web_reg_find 函数+参数SaveCount 根据获取执行结果再判断.
//如果找到对应的文本,则SaveCount = 0,否则SaveCount != 0
EG:对于有些系统先判断是否登录成功,如果成功则执行流程A,否则执行流程B。
int LoginTest;
web_reg_find("Text=ilm9XXX","SaveCount=LoginTest","Search=Body",LAST);
web_url("request"".......执行请求信息........")
if( atoi(lr_eval_string("{LoginTest}")) == 0 ){
lr_output_message("log on Success");
}else{
lr_error_message("log on Failed");
}