From: Julian Leviston Date: 2008-04-10T18:37:10+09:00 Subject: Re: to select random number from select list To get a random element from an array some_array[rand(some_array.size)] Julian. Learn Ruby on Rails! Check out the FREE VIDS (for a limited time) VIDEO #3 out NOW! http://sensei.zenunit.com/ On 10/04/2008, at 6:59 PM, Pranjal Jain wrote: > HI > I am having a list. I want to select a number in random from that > list? > which command I can use it for doing this? > > For example : > > $ie.row(:class =>"bgTableAltColors",:index > = > > > "4 > ").cell > (:class > ,"padTableRightBorder > ").select_list(:class,"Formelement").option(:text,"Test > Automation - Scripting").select > > here instead of "Test automation -scripting" I want to select a > option > in random. > How can i do it ? > > Please help. > Thanks in advance. > -- > Posted via http://www.ruby-forum.com/. >