# Regarding dropdown listbox loop code

**URL:** <https://www.ruby-forum.com/t/regarding-dropdown-listbox-loop-code/180741>\
**Category:** Ruby\
**Created:** [December 28, 2009, 11:30am UTC](https://www.ruby-forum.com/t/regarding-dropdown-listbox-loop-code/180741 "2009-12-28T11:30:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![me\_dev09](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3ab097/32.png) [@me\_dev09](https://www.ruby-forum.com/u/me_dev09)\
**Post date:** [December 28, 2009, 11:30am UTC](https://www.ruby-forum.com/t/regarding-dropdown-listbox-loop-code/180741/1 "2009-12-28T11:30:15Z")

</div>

Hi,

I am new to Watir.  
I wanted to automate a web application, where there are two dropdown  
listbox with each 5 items listed.

The scenario is “Currency conversion”.  
we have to enter a value in a textbox and select the listed items from  
the two listboxes and click OK button and to get the value other  
textbox.

e.g. The “XE Quick Currency Converter” section of [http://www.xe.com/](http://www.xe.com/)

1. Go to [http://www.xe.com/](http://www.xe.com/)
2. Enter the currency value (for which we need to get the converted  
currency value)
3. Select one option from “From this currency:” dropdown listbox
4. Select one option from “To this currency:” dropdown listbox
5. Click on “GO” button

Here, I would like to get help on the the TWO dropdown listboxes. Plz  
help me out to get the loop code, that will handle the TWO dropdown  
listboxes.

Thanks,

- dev
