LoadRunner读取关联数组的个数和内容

web_reg_save_param_ex(
        "ParamName=response_header1",
        "LB=Set-Cookie: ",
        "RB=;",
        "Ordinal=All",    //多个条件符合就是返回数组
        SEARCH_FILTERS, 
            "RelFrameID=1",  //这个是有重定向的时候有用
            "Scope=Headers",
        LAST);

    web_url("popupLogin2013", 
        "URL=https://passport.jd.com/uc/popupLogin2013?clstag1=0&clstag2=0&r=0.45619612547335486&t=1451008297482", 
        "Resource=0", 
        "RecContentType=text/html", 
        "Referer=http://tuantrade.jd.com/quanguo-index.html", 
        "Snapshot=t26.inf", 
        "Mode=HTML", 
        LAST);

    arrSize = lr_paramarr_len("response_header1");  //这个函数返回的是数组的大小

    lr_output_message("符合条件的cookie数量为: %d", arrSize);

    lr_output_message("popupLogin2013 response header value = %s", lr_paramarr_idx("response_header1", 1));//注意下标是从1开始的

 

posted on 2015-12-25 14:23  帅胡  阅读(352)  评论(0编辑  收藏  举报

导航