|
今天做一个页面文字检查的联系,录制的是访问百度,代码只是简单的一段,如下:
Action()
{
web_add_cookie("BAIDUID=7DD825CA2FAE6D85313FB025F70354A4; DOMAIN=www.baidu.com");
web_reg_find("Text=百度","SaveCount=百度");
web_url("www.baidu.com",
"URL=http://www.baidu.com/",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_find("Text Check",
"What=百度",
LAST);
return 0;
}
执行的日志如下:
Starting action Action.
Action.c(6): web_add_cookie was successful [MsgId: MMSG-26392]
Action.c(8): Registering web_reg_find was successful [MsgId: MMSG-26390]
Action.c(10): Found resource "http://www.baidu.com/img/logo.gif" in HTML "http://www.baidu.com/" [MsgId: MMSG-26659]
Action.c(10): Found resource "http://gimg.baidu.com/img/gs.gif" in HTML "http://www.baidu.com/" [MsgId: MMSG-26659]
Action.c(10): Registered web_reg_find successful for "Text=百度" (count=6) [MsgId: MMSG-26364]
Action.c(10): web_url("www.baidu.com") was successful, 3414 body bytes, 837 header bytes [MsgId: MMSG-26386]
Action.c(19): "Text Check" successful. 4 occurrence(s) of "百度" found (RightOf="", LeftOf="") [MsgId: MMSG-27196]
Action.c(19): web_find was successful [MsgId: MMSG-26392]
Ending action Action.
注意其中的红色部分,第一条是关于web_reg_find 的,其count是6;
第二条是关于web_find的,4 occurrence(s)。查看帮助得知:
web_reg_find的描述是Registers a search for a text string on an HTML page.
web_find的描述是Searches inside an HTML page for a specified text string.
web_find的含义好理解,但是关于web_reg_find的含义就不太理解了,从哪里可以看出Registers的count是6呢? |
|