# Listbox with Watir

**URL:** <https://www.ruby-forum.com/t/listbox-with-watir/98170>\
**Category:** Ruby\
**Created:** [July 12, 2006, 10:21pm UTC](https://www.ruby-forum.com/t/listbox-with-watir/98170 "2006-07-12T22:21:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [July 12, 2006, 10:21pm UTC](https://www.ruby-forum.com/t/listbox-with-watir/98170/1 "2006-07-12T22:21:59Z")

</div>

Is there a class or method for controlling listboxes in Watir? I tried  
using the regular select\_list methods and that works so long as you’re  
only selecting one item from the list. I, however, need to select  
multiple items at the same time, which is why I’m using a listbox, but  
I can’t find anything in the Watir API reference that would allow me to  
do this. Thank you in advance 😉

---

<div class="post-metadata">

**Author:** ![chris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/958977/32.png) [@chris](https://www.ruby-forum.com/u/chris)\
**Post date:** [July 13, 2006, 1:42am UTC](https://www.ruby-forum.com/t/listbox-with-watir/98170/2 "2006-07-13T01:42:42Z")

</div>

Chris wrote:

> Is there a class or method for controlling listboxes in Watir? I tried  
> using the regular select\_list methods and that works so long as you’re  
> only selecting one item from the list. I, however, need to select  
> multiple items at the same time, which is why I’m using a listbox, but  
> I can’t find anything in the Watir API reference that would allow me to  
> do this. Thank you in advance 😉

The API docs indicate that select\_list object’s select() and  
select\_value() methods will accept an array of string or regex values. I  
haven’t tried it myself, though.

Mully
