Re: Re: [wtr-general] how to get slectlist box option value

2011-02-25 Thread rajivkumarnandvani
thanks All I got this from this URL http://rdoc.info/gems/watir/1.7.0/Watir/SelectList:option Given the following html: Unknown Male Female get the value attribute of option with visible text 'Female' browser.select_list(:id, 'gender').option(:text, 'Female').value #=> 'F' or find out if

Re: [wtr-general] how to get slectlist box option value

2011-02-25 Thread Tim Koopmans
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 wrote: > Hi All, > > I am facing a problem with watir for list box object. I have to extrach the > value of select

Re: [wtr-general] how to get slectlist box option value

2011-02-24 Thread Priya D
Try this To select individual attribute :- browser.select_list(:name, "phone_type").select("M") On 25 February 2011 11:58, Rajiv Nanduani 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 L