Loadrunner,web_reg_save首先匹配RB

时间:2014-08-04 13:21:24

标签: loadrunner

我认为答案是否定的 - 但以防万一 我需要从以下动态列表中获取代理的formid,其中订单并不总是相同的

/always/the/same/and/very/long/not/always/in/the/same/order/formid=33,Pilot 
/always/the/same/and/very/long/not/always/in/the/same/order/formid=34,Customer
/always/the/same/and/very/long/not/always/in/the/same/order/formid=35,Agent
/always/the/same/and/very/long/not/always/in/the/same/order/formid=36,Cleaner 

但也可能是: -

/always/the/same/and/very/long/not/always/in/the/same/order/formid=33,Cleaner
/always/the/same/and/very/long/not/always/in/the/same/order/formid=34,Customer
/always/the/same/and/very/long/not/always/in/the/same/order/formid=35,Pilot
/always/the/same/and/very/long/not/always/in/the/same/order/formid=36,Agent

有一种聪明的方法吗? 当RB是唯一的部分时,你如何搜索 你能换掉LB& RB这样你就可以先匹配RB,然后再向后工作,例如: -

web_reg_save_param("cAgentFormID", 
"RB/IC=,Agent"
"LB/IC=,formid=",   
LAST)

1 个答案:

答案 0 :(得分:0)

即使唯一部分是正确的边界,web_reg_save_param函数也应该按照您的需要工作。在这种情况下,该函数使用最近的左边界匹配,而不是页面中第一次出现它。

以下是关于此功能的官方文档的引用,它描述了您所说的内容:

  

web_reg_save_param导致在最近的左边界之后的下一次出现的简单搜索。例如,如果您已将左边界定义为字符{而将右边界定义为字符`}',则保存以下缓冲区c:

      {a{b{c}

已找到左右边界。由于不支持嵌入边界,}' is matched to the most recent {`出现在c之前。 ORD属性为1.只有一个匹配的实例。