lgh 发表于 2006-4-27 17:42:16

LoadRunner 如何在脚本中添加图像检查点

LoadRunner 如何在脚本中添加图像检查点?ALT属性和SRC属性是什么东西?如何填写

rain_wind 发表于 2006-4-27 20:08:48

举个例子:登陆成功后,添加图片检查点.该图片的名称为: test.gif
1.在登陆成功页面,点击右键->查看源文件
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 编辑 ]

qrz2000 发表于 2006-4-27 21:28:13

添加了后,还要启用图片检查才行的

jut984907 发表于 2006-4-28 10:42:37

呵呵

2楼说的透彻;
3楼补充的好;
赞一个

shengyan 发表于 2006-5-26 13:05:40

alt是什么意思?

mm_louis 发表于 2006-5-26 16:29:15

每天进步一点点,欢迎大家一起讨论共同提高~~~~

johngan 发表于 2006-5-26 17:13:55

int web_image_check(const char *CheckName, <List of Attributes>, "Alt=Alt", "Src=Src", LAST );
到 LR function reference里找下web_image这个函数就知道 ALT和SRC是什么了

Zee 发表于 2006-5-26 17:39:36

在tree view里添加方便点。

lidian36 发表于 2006-8-1 11:27:19

看了之后 又提高了不少 ! 谢谢!

jeanjing00 发表于 2006-8-2 14:27:57

顶啊,学习了。

cocochu 发表于 2006-8-3 16:35:45

烦,不会完善脚本

烦,不会完善脚本

bigbug 发表于 2006-10-18 03:04:05

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?

bigbug 发表于 2006-10-18 03:11:45

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!

bigbug 发表于 2006-10-18 04:28:09

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!

jut984907 发表于 2006-10-18 09:41:37

看楼上用英文,比较晕啊~~

今天有看到这个帖子,以前也不太会使用这个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,则都失败。

jut984907 发表于 2006-10-18 09:47:40

至于楼上的例子,我以为这样即可
web_image_check("web_image_check",
               "Src=images/bookanother.gif",
                LAST);

bigbug 发表于 2006-10-18 22:15:33

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?

hmilyjch 发表于 2006-12-28 09:40:25

web_image_check("web_image_check",
                "Alt=Images/bookanother.gif",//是alt
                LAST);

wangyong3552128 发表于 2007-2-28 11:36:38

2楼可以这样,Src和Alt写道一起去,简单

web_image_check("web_image_check",
      "Src=Images/test.gif",
         "Alt=344",                        
      LAST);

cmfly 发表于 2007-3-1 14:59:50

动态图像如何检查?image的scr会变得阿。
页: [1] 2
查看完整版本: LoadRunner 如何在脚本中添加图像检查点