2010/7/2 Shlomit Gazit <[email protected]>
> I want to create an array of the innerText (or something else) of the
> 9 out of 16 radios on the page.
> Then I need to do something with every variable in this array.

Then just iterate over all radio buttons and create an array that contains
just the ones you want:

original_array = ["aa", "bb", "ab", "ba"]

new_array = original_array.collect {|element| element if element =~ /a/ }
=> ["aa", nil, "ab", "ba"]

# compact removes nil elements
new_array.compact
=> ["aa", "ab", "ba"]

Željko

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: [email protected]
To unsubscribe: [email protected]

Reply via email to