Thanks for the suggestion.
unfortunately it dont work :-(

> contents = ff.form(:index, 1).select_list(:index, 1).getAllObjects

returns a empty string.




On 26 Apr., 00:21, George <george.sand...@gmail.com> wrote:
> Hi there,
>
> If you're looking to get all the options in a select list and put it
> into an array, you can use this:
>
> contents = ff.form(:index, 1).select_list[1].getAllObjects
>
> -George
>
> On Apr 25, 1:25 pm, jason <jason.franklin.sto...@gmail.com> wrote:
>
> > I have looked around and found no love on this subject.
>
> > I would like to "discover" the text of a forms select list - is this
> > at all possible?
>
> > i.e
>
> > ff.form(:index, 1).select_list[1].each do |option|
> >  puts option.inspect
> > end
>
> > Results in this output - but does not include the text in the option:
> > <option value="1000000">Hello</option>
>
> > name:
> > type:
> > id:
> > value:        1000000
> > disabled:     false
>
> > It would have though that the following would work:
>
> > ff.form(:index, 1).select_list[1].each do |option|
> >  puts option.text #or
> >  puts option.inner_text
> > end
>
> > but - no love.
>
> > any ideas would be very highly appreciated.
>
> > Thanks a million.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to