|
首先:
不要相信帮助 ,帮助写的太模糊.有些东西要自己试过才知道.
在网页中 ,有个 web_image_check 的函数.是检查图片的.
如果存在制定的图片,系统就认为成功.(这个函数成功,否者 这个函数失败,也会导致函数所处的事务失败)
下面是 帮助的解释:
In the following example, the web_image_check function looks for the image ALT text is "Venus" in the ImagesAndMaps page:
web_url("index.html", "URL=http://localhost/ImagesAndMaps.html",
"TargetFrame=", LAST);
web_image_check("Go2Venus", "Alt=Venus", LAST);
上面是函数举的例子.
起始 ALT 和 SRC 是忽略大小写的 .而且 要写全路径.否则就会报错.
下面是我的脚本:
web_image_check("forone","src=../images/home.gif",LAST);
如果写成 web_image_check("forone","src=home",LAST);
web_image_check("forone","src=/home.gif",LAST);
只写图片的名称,或者写不全路径
调试就会出错.
Action.c(13): web_url("ListMBeansAction_4") was successful, 18639 body bytes, 545 header bytes, 56 chunking overhead bytes [MsgId: MMSG-26385]
Action.c(23): Error -27191: "forone" failed (0 occurrence(s) found. Alt="", Src="../images/home.gif") [MsgId: MERR-27191]
Action.c(23): web_image_check highest severity level was "ERROR" [MsgId: MMSG-26391]
Ending action Action.
所以 .要写全 HTML 的 路路径
web_image_check("forone","src=http://192.168.0.135:7001/console/images/home.gif",LAST);
才会成功
ction.c(23): "forone" succeeded (1 occurrence(s) found. Alt="", Src="http://192.168.0.135:7001/console/images/home.gif") [MsgId: MMSG-27192]
Action.c(23): web_image_check was successful [MsgId: MMSG-26392]
强烈建议 LR 把帮助写的更细致..没有中文的资料.只能靠这点英文帮助了.
我用的是盗版,我是替那些正版用户 鸣不平..~~~~
@_# |
|