loadrunner Web_类函数之Web_remove_auto_filter()

来源:互联网 发布:工程预算软件大全 编辑:程序博客网 时间:2024/06/16 06:25

Web_remove_auto_filter()--常用函数

删除下载内容中的过滤器。它与web_add_auto_filter()函数相反;

intweb_remove_auto_filter(char * Id,LAST);

 

  参数说明:

Id:由web_add_auto_filter设置的过滤器实例的标识。 必须采用格式“Id =value”:

LAST:指示属性列表结束的标记

 

一般信息 :

web_remove_auto_filter函数删除在对以前调用web_add_auto_filter中设置的过滤器。


 

示例:web_remove_auto_filter

以下示例使用web_add_auto_filter来排除路径前缀为/Images / Upload的网址。该调用适用于所有后续操作函数,在本例中为对web_url()的两次调用。调用web_remove_auto_filter会从后续的操作函数调用中删除过滤器。

web_add_auto_filter(“Action =Exlude”,

     “PathPrefix =/ Images / Upload”,

     Id = fid”,

     LAST);

 

web_url(“www.knanas.com”,“URL = http://www.knanas.com/”,“Resource =0”

     “RecContentType= text / html”,“Referer =”,“Snapshot = t1.inf”,

     “Mode = HTML”,

     EXTRARES,

     “Url = /images / netaction_icon.gif”,ENDITEM,

     “Url = http://frontpage.knanas.com/Images/Upload/Commerce323.jpg”,ENDITEM,

     //将被排除,因为它匹配路径前缀条件

     “Url = http://frontpage.knanas.com/Images/Upload/Commerce134.gif”,

     ENDITEM,

     //将被排除,因为它匹配路径前缀条件

     “Url = http://frontpage.knanas.com/Images/Upload/120_eminem-t55.jpg”,

     ENDITEM,

     //将被排除,因为它匹配路径前缀条件

     “Url = http://frontpage.knanas.com/Images/Upload/153_gavre_sigar.jpg”,

     ENDITEM,

     //将被排除,因为它匹配路径前缀条件

   “Url = http://realmedia.knanas.com/RealMedia/ads/Creatives/default/empty.gif”,

     ENDITEM,

     LAST);

 

web_remove_auto_filter(Id = fid,LAST);

 

web_url(“www.knanas.com”,“URL = http://www.knanas.com/”,“Resource =0”

     “RecContentType= text / html”,“Referer =”,“Snapshot = t1.inf”,“Mode = HTML”

     EXTRARES,

     “Url = /images / netaction_icon.gif”,

     ENDITEM,

     “Url = http://frontpage.knanas.com/Images/Upload/Commerce323.jpg”,

     ENDITEM,

     //因为过滤器已删除而下载。

     “Url = http://frontpage.knanas.com/Images/Upload/Commerce134.gif”,

     ENDITEM,

     //将包括

     LAST);

 

阅读全文
0 0
原创粉丝点击