Restrict the Captuiring of some values in Drop down list

5 views
Skip to first unread message

Irfan G G

unread,
Apr 5, 2016, 11:59:51 AM4/5/16
to LoadRunner
Hi,

I am new to load runner, I have two different drop down lists if I capture the values because of same right boundary and left boundary,it is capturing in single variable, if i want random values from captured list it will consider every value captured, so how i can separate each drop down values ?

/************first drop down data***************/
Saving Parameter "subject_1 = ".                        
Action.c(35): Notify: Saving Parameter "subject_2 = DBMS".
Action.c(35): Notify: Saving Parameter "subject_3 = JAVA".
Action.c(35): Notify: Saving Parameter "subject_4 = C++".
Action.c(35): Notify: Saving Parameter "subject_5 = C".


Action.c(35): Notify: Saving Parameter "subject_6 = ".                   ------------>>>>second drop down data
Action.c(35): Notify: Saving Parameter "subject_7 = class1".
Action.c(35): Notify: Saving Parameter "subject_8 = class2".
Action.c(35): Notify: Saving Parameter "subject_9 = class3".
Action.c(35): Notify: Saving Parameter "subject_10 = class4".

James Pulley

unread,
Apr 5, 2016, 12:07:22 PM4/5/16
to LoadRunner
Establishing a baseline on your phrase, "I am new to load runner...."

  1. Have you been through an audit of your foundation skills?
  2. Have you been through product training with an HP Certified Instructor?  
  3. Do you have a mentor assigned to work with you for your first 2-6 months of work?

Anand Gattu

unread,
Apr 5, 2016, 1:03:37 PM4/5/16
to LR-Loa...@googlegroups.com

Simple.....
i = Rand() % 6
Subject_[i] ....is what u want ...
Chill

--
You received this message because you are subscribed to the Google Groups "LoadRunner" group.
To unsubscribe from this group and stop receiving emails from it, send an email to LR-LoadRunne...@googlegroups.com.
To post to this group, send email to LR-Loa...@googlegroups.com.
Visit this group at https://groups.google.com/group/LR-LoadRunner.
To view this discussion on the web visit https://groups.google.com/d/msgid/LR-LoadRunner/4eff970e-d3cc-485f-a591-9778f26f34b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

André Luyer

unread,
Apr 6, 2016, 11:56:59 AM4/6/16
to LoadRunner
If you provide code snippet make sure it functions correctly.
rand() % 6 has a 1 in 6 change of returning 0.

To the OP: open the on-line help and lookup the functions web_reg_save_param_regexp and lr_paramarr_random.

André

Raja Rk

unread,
Apr 17, 2016, 9:48:28 AM4/17/16
to LoadRunner
Irfan, drop down lists are in xml format so the values of all drop downs are likely to have same boundaries. You cannot capture the values of a single drop down list in just one step. Now You must see the unique name of the drop down at the beginning of the XML tree so use that as left boundary and capture the whole XML tree of that drop down and use lr_XML_get_values (SelectAll=yes) to extract the values. Again you cannot use lr_paramarr_random to get a random value from the parameter array created using lr_XML_get_values. You need to write a code for that. Go ahead, explore, experiment and get back with questions if you don't succeed

Irfan G G

unread,
May 2, 2016, 10:03:45 AM5/2/16
to LoadRunner
Thanks for your reply I got how to separate 2 drop downs that are written in simple html tags using some c skills now I am exploring about capturing the whole XML tree I will get back to you if I have doubt once again thanks.

Irfan G G

unread,
May 2, 2016, 10:03:49 AM5/2/16
to LoadRunner
Yeah I got it thanks..
Reply all
Reply to author
Forward
0 new messages