|
我录制了一段很短的查询脚本,想判断查询出的页面是否正确,做了以下三件事情:
1、在脚本中添加了检查点:
web_find("web_find",
"LeftOf=是不是",
"What=您要找的",
LAST);
2、在Run-time Settings-->Internet Protocol--> preferences里勾选了Enable image and text check
3、在Run-time Settings-->Internet Protocol-->Content Check里添加了规则
运行结果是这样的:
如图,当设置成Fail if Found时,脚本运行结果为:
Action.c(27): Error -26372: ContentCheck Rule "Rule_1" in Application "Application_1" triggered. Text "您要找的" matched (count=1) [MsgId: MERR-26372]
Action.c(27): web_submit_form("s") highest severity level was "ERROR", 9065 body bytes, 859 header bytes [MsgId: MMSG-26388]
当设置成Fail if Not Found时,脚本运行结果为:
Action.c(10): Error -26370: ContentCheck Rule "Rule_1" in Application "Application_1" triggered. Text "您要找的" not matched [MsgId: MERR-26370]
Action.c(10): web_url("www.baidu.com") highest severity level was "ERROR", 3615 body bytes, 776 header bytes [MsgId: MMSG-26388]
为什么设置成Fail if Not Found运行的结果是Error的那?很奇怪
是不是测试结果就是match和not match,而得不到fail和pass的最终测试结果?请高手们指点,非常感谢!!!
[ 本帖最后由 songlilimnky 于 2008-10-30 22:42 编辑 ] |
|