|
有一java程序,想对某一页面做检查点,录制方式为html-based,已将general options->correlation->enable scripting and java applets on snapshots viewer选中,runtime settings->preferences->enable image and text check及contentcheck->enable contentcheck during replay也均已选中。
我要检查的是这个页面中是否有79883这个值
web_url("1e.jsf",
"URL=http://testsvr1:8384/redem/ent/yearReport/1e.jsf?reportType1=1&entityType1=1&entityNumber1=19842",
"Resource=0",
"RecContentType=text/html",
"Referer=http://testsvr1:8384/redem/ent/yearReport/main/index.jsf",
"Snapshot=t17.inf",
"Mode=HTML",
LAST);
此页面的server response中有我要的值<input id="form1:g100006__12" name="form1:g100006__12" type="text" value="79883" title="" class=""/></td>
于是脚本如下:
web_url("1e.jsf",
"URL=http://testsvr1:8384/redem/ent/yearReport/1e.jsf?reportType1=1&entityType1=1&entityNumber1=19842",
"Resource=0",
"RecContentType=text/html",
"Referer=http://testsvr1:8384/redem/ent/yearReport/main/index.jsf",
"Snapshot=t17.inf",
"Mode=HTML",
LAST);
web_find("Text Check",
"RightOf=<input id=\"form1:g100006__12\" name=\"form1:g100006__12\" type=\"text\" value=\"",
"LeftOf=\" title=\"\" class=\"\"/></td>",
"What=79883",
LAST);
可为什么运行的时候总报错?
Error -27195: "Text Check" failed. 0 occurrence(s) of "79883" found (RightOf="<input id="form1:g100006__12" name="form1:g100006__12" type="text" value="", LeftOf="" title="" class=""/></td>") [MsgId: MERR-27195]
web_find highest severity level was "ERROR" [MsgId: MMSG-26391]
这是怎么回事呢?而我用web_reg_find是可以取到值的
[ 本帖最后由 xiao_jie98 于 2006-1-13 17:22 编辑 ] |
|