GeekInterview.com
Results 1 to 3 of 3

Retrieve values from an array - Loadrunner

This is a discussion on Retrieve values from an array - Loadrunner within the LoadRunner forums, part of the Software Testing category; Hi, I just want to know how to use web_reg_save_param function for retrieve values from an array. My array is arrData[0] = new Array('10876','INACIA CARDOZ/MRS', '17469199') If any one knows ...

  1. #1
    amilar is offline Junior Member Array
    Join Date
    Dec 2009
    Answers
    3

    Retrieve values from an array - Loadrunner

    Hi,

    I just want to know how to use web_reg_save_param function for retrieve values from an array.
    My array is

    arrData[0] = new Array('10876','INACIA CARDOZ/MRS', '17469199')

    If any one knows how to get values on this array please reply me. Thanks.

    Amilar


  2. #2
    bizzzzzare is offline Expert Member Array
    Join Date
    Oct 2007
    Answers
    381

    Re: Retrieve values from an array - Loadrunner

    Hi,

    Why do you wish to use web_reg_save_param to extract values from array?
    Use lr_eval_string functionality.

    If you wish to retrieve values from the array that has been used with web_reg_save_param, code should like similar to below -

    web_reg_save_param ("arrData", "LB=\"", RB=\"", "Ord=All", LAST)

    intCount = atoi(lr_eval_string("{arrData_Count}"));

    for(i=0; i
    {

    printf (sValue, "{arrData_%d}", i);
    lr_output_message ("Value of array element", sValue, lr_eval_string(sValue));

    }

    NOTE : For some reason the for loop does not appear in the answer window. I guess you can code that yourself.

    Cheers,

    Last edited by bizzzzzare; 12-21-2009 at 10:54 AM. Reason: Clarity

  3. #3
    shekharmit is offline Junior Member Array
    Join Date
    Jun 2012
    Answers
    1

    Re: Retrieve values from an array - Loadrunner

    can some one please suggest how to pass all the content of array (generated via web_reg_save_param and ORD= ALL) as one string/array ?


    •    Sponsored Ads