Hi All,

I am trying to get the number of checkboxes within a window.  I want
to get the value of each one without knowing which one I will be
using.

html

<fieldset class="theme-options">
<input id="simple_discussion_resource_category_ids_" type="hidden"
value="" name="simple_discussion[resource_category_ids][]">
<div class="add-themes">
<div class="label-like">
<ul class="lists">
<li>
<input id="simple_discussion_resource_category_90" class="checkbox"
type="checkbox" value="90"
name="simple_discussion[resource_category_ids][]">
<label for="simple_discussion_resource_category_90">Ambulatory/
Outpatient Care</label>
</li>
<li>
<li>
<li>
<li>
<li>
<li>
<li>
</ul>
<ul class="lists">

I would like to get the number of <li> and then loop through and get
the value which I need for later in my script.

One of many attempts to get this:

 themeint = themeNum = $browser.div(:class,'add-
themes').ul(:class,'lists').lists.length

      $browser.div(:class,'add-themes').lis.each do|themeint|
        checkboxName = $browser.div(:class,'add-
themes').ul(:class,'lists').li(:class,'checkbox').value
        puts checkboxName
      end


Any help is always appreciated and thank you so much for the help
ahead of time.

Joe

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to