-
web_reg_find("Text=ABC", "SaveCount=abc_count", LAST);51Testing软件测试网V?2Rs.J Gmdweb_url("Step", "URL=...", LAST);)LN4E4U7u~8C0if (strcmp(lr_eval_string("{abc_count}"), "0") == 0)
lr_output_message("not found");51Testing软件测试网 p T.n*C!h:[Ye
else51Testing软件测试网*|4U9H.Wk9G;R\qg
lr_output_message("{abc_count} found");51Testing软件测试网C*p'l&s*qc Q
如果想保存并且显示找到的文本,可以使用web_reg_save_param界定左右边界把找到的信息保存到参数中。如下:
*Iv!P+y/B6J^'N0
-
char *str1,*str2;51Testing软件测试网)w*U"^sCOstr1="desired text";51Testing软件测试网Ef1`{*ud&G// Register the left and right beacons sought::j0xTN2sT a3Q0web_reg_save_param("param","LB/ic=xxx","RB=xxx");,yb4yt'd8V,v0// Do the monitored deed:iW$e![#ox!^0web_url("some url","URL=www.xxx.com",LAST);51Testing软件测试网3r@ a7M~+d-pi// Compare:5I1b'EM\?0str2=lr_eval_string("{param}");n~iUdm%HkC0if(strcmp(str1,str2)==0) {
lr_output_message("param found");
1]9od4^*YG0
}else{
:u:d9J6C.y1O lky0
lr_output_message("Value found is %s",str2);51Testing软件测试网;n;J{.`v"Z
}