Such an old version. Makes no sense not to update. However I think this is what you're looking for:
ie.*select_list*(:index, 1).getAllContents https://groups.google.com/forum/#!searchin/watir-general/select_list$20contents/watir-general/_ehpmnhbEi4/MLLkGj2qOe0J You can probably search this group for most older watir issues do the advanced search and use a before date (like 2009, 2010) On Monday, May 19, 2014 4:37:41 AM UTC-5, Bhavesh Sharma wrote: > > Hi, > > im getting error as NoMethodError for .option which im using with > select_list. > > i have Ruby 1.8.6 and watir 1.6.2. > > definitely it is old version but right now i cannot upgrade it due to some > limitation for my project. > > Now i wrote code like this : > > elems = Array.new > values = Array.new > elems = $ie.select_list(:id,"setTagList").options > puts elems > > 0.upto(elems.length - 1) do |i| > values.push elems[i].text > end > > 0.upto(values.length - 1) do |i| > puts values[i] > if values[i] =~ /DupTags/ > returnValue = false > else > returnValue = true > end > end > > > But then it shows error that undefined method .options like this : > > NoMethodError: undefined method `options' for > #<Watir::SelectList:0xfcc2d4c> > > I also tried like this, but same error : > > searchList = $ie.select_list(:id,"setTagList") > selectContent = searchList.options.collect { |option| option.value } > > So what is the issue here? .option is bydefault method i guess. then why > its not working. > > please help. > > bhavesh > -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
