如何写语法判断文本检查已经成功或者失败?
如何写语法判断文本检查已经成功?代码部分如下:
web_url("report.jsp",
"URL=http://192.168.1.151:8680/QZFM/js/report/report.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.151:8680/QZFM/app/app.jsp",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=flash/open-flash-chart.swf", ENDITEM,
"Url=/QZFM/servlet/ReportServlet", "Referer=http://192.168.1.151:8680/QZFM/js/report/flash/open-flash-chart.swf", ENDITEM,
LAST);
web_find("Text Check", "What=今日共有", LAST); 回复 1# txs00
高手帮菜鸟解答下 用lr_output_message输出? 回复 3# xxl1989
可否留下代码范例? lr_output_message(“ok? %s”,lr_eval_string(“{Text Check}”));
可以写个if else语句这样输出更明显 查看回放日志,一目了然 脚本改成下面这样
web_reg_find("Text=今日共有",
"SaveCount=Find_Count",
LAST);
web_url("report.jsp",
"URL=http://192.168.1.151:8680/QZFM/js/report/report.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=http://192.168.1.151:8680/QZFM/app/app.jsp",
"Snapshot=t5.inf",
"Mode=HTML",
EXTRARES,
"Url=flash/open-flash-chart.swf", ENDITEM,
"Url=/QZFM/servlet/ReportServlet", "Referer=http://192.168.1.151:8680/QZFM/js/report/flash/open-flash-chart.swf", ENDITEM,
LAST);
//web_find("Text Check", "What=今日共有", LAST);
if(atoi(lr_eval_string("{Find_Count}")) > 0)//判断如果 今日共有 字符串出现次数大于0
lr_output_message("Successful."); //在日志中输出Successful
else //如果出现次数小于等于
lr_output_message("Failed."): //在日志中输出Failed
页:
[1]