How to get a random selection from a dropdown box in TruClient

  • Questions
  • How to get a random selection from a dropdown box in TruClient
Question ID: 106993
0
0

Using LoadRunner 12.53 TruClient protocol, what is the best practice to perform a random selection on a given form input? (like a dropdown menu or a radio box group)

Marked as spam
Posted by (Questions: 144, Answers: 1)
Asked on July 28, 2016 1:36 pm
31 views
Answers (1)
1
Private answer

You can use ordinal 0 in Select option from list box step. That will pick a random value

Alternatively, you can use below code:
var objectIndex = Math.floor((object.length-1)*Math.random())+2;
objectIndex;
Put that code in JS part of that step

Marked as spam
Posted by (Questions: 0, Answers: 152)
Answered on July 28, 2016 1:44 pm