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.