b.select_list(:name => "phone_type").options.collect {|o| o.text[/\w/]}
or this b.goto 'http://tinyurl.com/6f8v92t' Cheers, Tim On Fri, Feb 25, 2011 at 5:28 PM, Rajiv Nanduani <rajivkumarnandv...@gmail.com> wrote: > Hi All, > > I am facing a problem with watir for list box object. I have to extrach the > value of select item in list box instead of text value Like.. > > <select size="1" name="phone_type"> > <option value="">- Select One ------------------</option> > <option selected="" value="M">Mobile Phone</option> > <option value="O">Daytime Phone</option> > <option value="H">Evening Phone</option> > </select> > > Here i need the value property value like M , O , H > > please suggest how to get this value using watir/ruby > > -- > RAJIV KUMAR > > <http://rajivkumarnandvani.wordpress.com/> > <http://learnqtphelp.blogspot.com/> > > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > watir-general@googlegroups.com > http://groups.google.com/group/watir-general > watir-general+unsubscr...@googlegroups.com > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com