我正在使用web param函数来检索某些值。我想从数组项中获取特定索引的值,并将其存储在要用于web_link调用的参数中。如何从web_reg_save_param检索特定索引值arrray
char * tempVal;
web_reg_save_param("dynArray","LB=/EmployeeProfile/","RB=\">","ORD=ALL",LAST);
tempVal = "{dynArray_2}";
没有为上述声明没有错误,但访问tempVal当它给错误
vuser_init.c(143): web_link("emp") started [MsgId: MMSG-26355]
vuser_init.c(143): Warning: The string 'tempVal' with parameter delimiters is not a parameter.
vuser_init.c(143): Error -27995: Requested link ("Text={tempVal}") not found [MsgId: MERR-27995]
这个例子是总数,我期待访问特定的索引和存储的参数。而且随机指数选项不是我的要求。 – Akbar
您似乎误用了LoadRunner参数化。 'tempVal'局部变量不会自动转换为参数。调用'lr_save_string(tempVal,“tempVal”)'来做到这一点。那么你将能够使用它。 – tserg42