Well, I sort of resolved my own issue by using getAllContents and then
selecting a value from that array.  Unfortunately, this means if there
are multiple options with the same value, there is no way to pick any
of these duplicate options except the first.

Anyone have any idea how to get around this?  Say for example I have a
dropdown where all options are the same.  How do I pick, say, the 3rd
option in the dropdown?

Thanks,
James


On Nov 23, 4:43 pm, James <jgcpal...@gmail.com> wrote:
> Never mind that last post, it wasn't returning what I thought I was
> returning.  It looks like I'm running watir 1.6.5.
>
> On Nov 23, 4:39 pm, James <jgcpal...@gmail.com> wrote:
>
> > Perhaps this is related, or I'm just interpretting it wrong, but if I
> > do:
>
> > gem -v watir
>
> > it returns:
>
> > 1.3.5
>
> > Isn't the newest watir at version 1.6.5?  If I try to update watir, it
> > tells me there's nothing to update.
>
> > Thanks,
> > James
>
> > On Nov 23, 3:52 pm, James <jgcpal...@gmail.com> wrote:
>
> > > My computer crashed and I had to reinstall ruby and watir.
>
> > > I used to be able to use a command like this:
>
> > > browser.select_list(:id, 'mydropdownbox').select_item_in_select_list
> > > (:index, 3)
>
> > > Now, if I do this, every item in the select box gets highlighted, and
> > > I get the error:
>
> > > Watir::Exception::NoValueFoundException in 'XXX'
> > > No option with :index of "3" in this select element
> > > ./test/specs/clicker_spec.rb:359:
> > > ./test/specs/clicker_spec.rb:358:in `each'
> > > ./test/specs/clicker_spec.rb:358:
>
> > > What's going on?  Did something change with this method?  Is there
> > > something I need to change in my code so that it can select items in a
> > > select list based on index?
>
> > > Thanks,
> > > James
--~--~---------~--~----~------------~-------~--~----~
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