我在Load runner [WEB HTTP / HTML]中开发了脚本。
相关参数之一是下一个相关参数的左边界
有人可以帮助提供在下一个相关参数值的左边界中使用先前相关参数值的方法吗?
web_reg_save_param("documentHash", lr_eval_string("LB={token}"), "RB=')","Ordinal=1", LAST);
答案 0 :(得分:1)
您可以在左边界使用您的参数,如下所示:
web_reg_save_param("documentHash", lr_eval_string("LB={token}"), "RB=')", LAST);
答案 1 :(得分:0)
因为我已经在评论中发布了代码。我是一个例子的详细答案。
在此示例中,我们将https://www.example.com演示c = { 1:0 , 1:2...1:6 , 2:0 , 2:1 , 2:2 ,...2:6}
。
以下是www.example.com的输出。我们将使用web_reg_save_param_ex();
检索标记的文本。
web_reg_save_param_ex();
//Retrieving the first value.
//c_FirstValue will retrieve the string 'established'
web_reg_save_param_ex(
"ParamName=c_FirstValue",
"LB=This domain is",
"RB=to be used",
"Ordinal=1",
SEARCH_FILTERS,
LAST);
web_custom_request("web_custom_request",
"URL=https://www.example.com",
"Method=GET",
"TargetFrame=",
"Resource=0",
"Referer=",
"Body=",
LAST);
lr_output_message("%s",lr_eval_string("{c_FirstValue}"));
//In this function, we are passing the c_FirstValue as a left boundary and retrieves the string 'to'
web_reg_save_param_ex(
"ParamName=c_SecondValue",
"LB={c_FirstValue}",
"RB=be used",
"Ordinal=1",
SEARCH_FILTERS,
LAST);
web_custom_request("web_custom_request",
"URL=https://www.example.com",
"Method=GET",
"TargetFrame=",
"Resource=0",
"Referer=",
"Body=",
LAST);
lr_output_message("%s",lr_eval_string("{c_SecondValue}"));