Random Value from dropdown list

873 views
Skip to first unread message

panji.i...@kudo.co.id

unread,
Dec 23, 2016, 3:46:48 AM12/23/16
to robotframework-users
Hi guys, I need some help here.

I Want to get random value from some dropdown list :

Example :
${RandomList}=                          Generate Random String       13, 15, 27        [NUMBERS]
  Set Suite Variable                      ${RandomList}
Select From List                         name=List            ${RandomList}

I got an error when trying using this, Can all you help me ?


Paolo De Grazia

unread,
Dec 24, 2016, 6:10:45 AM12/24/16
to robotframework-users
Hi,

Try to log ${RandomList},you will find out it is not a number.
In order to achieve this:
Create a list with the numbers you have
Generate a random number between 0 and 2 (list index)
Get the list element with your random index
Pass it to the select from list

Reply all
Reply to author
Forward
0 new messages