Get a Value from a Webpage

Hi, I'm using web_reg_save_param("DC1","LB=time","RB=Dis","Ord=All","Search=body",LAST); to grab all the policy number from a webtable on our site. I need to now assign these values exclusively to each Vuser doing our run so that no 2 Vusers will grab the same account number. Can someone help me on this one?
  • Hawesch,

    In your VUgen help:

    HP LoadRunner Virtual User Generator User's Guide > Working with VuGen > File, Table, and XML Parameter Types > Choosing Data Assignment Methods for File/Table Parameters

    The Unique method assigns a unique sequential value to the parameter for each Vuser.

    In this case you must make sure there is enough data in the table for all the Vusers and their iterations. If you have 20 Vusers and you want to perform 5 iterations, your table must contain at least 100 unique values.


    Hope this helps.
  • James, My values are not within the Parameters file but in a table on the webpage I'm accessing. Hence I'm I'm using web_reg_save_param to retrieve them.
  • Hi Hawesh,
    1.
    the list you get back from the "web-reg-save_param", is it always the same or does it give random Policy numbers back ? When it doesn't change a solution could be,
    You need to add code in your script to save the policy numbers(array). Also find out how many(Policynumber_count) table items there are to see how many iterations you can do. In this way it is possible to pick unique policy numbers, in a sequential way from the array until the max number is hit. In every iteration give the number exclusively to a Vuser.
    2.
    When you can find a unique sequential number identification in your web_reg_parm table for every policy number you get back, do update your Left or right boundary in the web_reg_param, using for example a sequential parameter in your boundery to pick the "next" unique number. But accoording to your guestion this is maybe to simple.

    Greets,
    Quality Utd
  • Hi, this is the code I'm using so far. It seems to still not work. Can you directory me in what is incorrect about the code?

    web_reg_save_param("DC1PlcyRefNum",
    "LB=$lnkShowDocument", "", true, "", "", false, true))\">",
    "RB=",
    "Ord=ALL",
    "Search=body",
    LAST);

    //get number of matches
    PolicyCount = atoi(lr_eval_string("{DC1PlcyRefNum_count}"));

    for (i = 1; i <= PolicyCount; i ) {

    }
    return 0;
    }