You can compare arrays very easily in ruby use the == method. I think  
order matters so you might wish to sort (.sort) your array.

There is a method on a select box to get all of the options  
( .options() ). This returns an array.

You can then store your expected results in an array and compare the  


On 12 Feb 2009, at 17:29, Jason Shelton <> wrote:

> All,
> I am writing to ask if anyone has a quick way of verifying the  
> contents of a drop down.  I have a list of names, and I want to  
> verify that each name is being displayed in the drop down.  Thanks  
> in advance for all of your help.
> - Shelton
> Windows Liveā„¢: Keep your life in sync. See how it works.
> >

You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to
Before posting, please read the following guidelines:
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to