LoadRunner 如何在脚本中添加图像检查点
LoadRunner 如何在脚本中添加图像检查点?ALT属性和SRC属性是什么东西?如何填写 举个例子:登陆成功后,添加图片检查点.该图片的名称为: test.gif1.在登陆成功页面,点击右键->查看源文件
2.在源文件中查找到引用该图片的脚本
如: <td><img src="../images/test.gif" width="778" height="71" border="0" usemap="#Map" alt="344"></td>
则图片的检查点可如下:
web_image_check("web_image_check",
"Src=Images/test.gif", //注:这里对应上方的第一处红色字体,即src="../images/test.gif"
LAST);
web_image_check("web_image_check",
"Alt=344", //注:这里对应上方的第二处红色字体,即alt="344"[/
LAST);
[ 本帖最后由 rain_wind 于 2006-4-27 20:10 编辑 ] 添加了后,还要启用图片检查才行的
呵呵
2楼说的透彻;3楼补充的好;
赞一个 alt是什么意思? 每天进步一点点,欢迎大家一起讨论共同提高~~~~ int web_image_check(const char *CheckName, <List of Attributes>, "Alt=Alt", "Src=Src", LAST );
到 LR function reference里找下web_image这个函数就知道 ALT和SRC是什么了 在tree view里添加方便点。 看了之后 又提高了不少 ! 谢谢! 顶啊,学习了。
烦,不会完善脚本
烦,不会完善脚本anyone has idea on that?
I have this script to check the image:web_image_check("web_image_check",
"Src=Images/test.gif",
LAST);
after I run it and I get this result:
Confirmation.c(8): Error -27191: "web_image_check" failed (0 occurrence(s) found. Alt="", Src="Images/test.gif")
Confirmation.c(8): web_image_check highest severity level was "ERROR"
The source code like that:
<form method="post" action="" enctype="application/x-www-form-urlencoded">
<input type="image" name="Book Another" src="/MercuryWebTours/images/bookanother.gif" border="0" /></form>
So, anybody has idea about that? What is worng with my script?
a little mistake
sorry all,the above script, I just add the wrong image name for my image check, but anyway, when I use the same name in the script as source code, it has same error for me.
Pls give me any suggestion? Thx!
a little mistake
sorry all,the above script, I just add the wrong image name for my image check, but anyway, when I use the same name in the script as source code, it has same error for me.
Pls give me any suggestion? Thx!
看楼上用英文,比较晕啊~~
今天有看到这个帖子,以前也不太会使用这个image检查点。下面举例说明:录制 http://www.google.com
会打开google首页,看源文件如此 <img src="/intl/zh-CN_ALL/images/logo.gif" width=286 height=110 alt="Google">。
那么,我加入检查点
web_image_check("web_image_check",
"Src=intl/zh-CN_ALL/images/logo.gif",
"Alt=Google",
LAST);
在设置中使用检查点。
回放后即可成功。如果修改src为logo.gif1,或alt 为google1,则都失败。 至于楼上的例子,我以为这样即可
web_image_check("web_image_check",
"Src=images/bookanother.gif",
LAST); I have this script to check the image:
web_image_check("web_image_check",
"Src=Images/bookanother.gif",
LAST);
sorry guys, I didn't notice what the difference with your script and mine. Am I right? web_image_check("web_image_check",
"Alt=Images/bookanother.gif",//是alt
LAST); 2楼可以这样,Src和Alt写道一起去,简单
web_image_check("web_image_check",
"Src=Images/test.gif",
"Alt=344",
LAST); 动态图像如何检查?image的scr会变得阿。
页:
[1]
2