| || |
Randomly selecting multiple items in a checklist
With the assistance from a previous posting I was able to randomly enter account names, person names, etc. into my test script using the iSeed function.
I am trying to to randomly select at least three items from a checklist where I can chose as many as 10 items. I want Silk Test to ramdomly select three items each time I run the test.
In the Silk Test help I have found methods such as MultiSelect, SelectList, GetSelText. I am at a loss as to which route I should take. Can anyone lead me in the right direction as to which Silk Test Help section would assist me the most?
I am using Silk Test 5.5.3. Thanks
Re: Randomly selecting multiple items in a checklist
Select your items by item number and use the random methods to generate that number for you. Just loop through this three times, and you should select three items. You might want to put some checking in place to make certain you don't randomly generate the same number and attemtpt to select an item already selected. Just keep a list of already generated numbers and check against that list. Once you have made your three selections, destroy the list.
You could do a list count prior to generating your random number and make certain the generated number does not exceed the list count.