Schlomit,

Could you post the code you created from my example
so folks can look at it to try to determine why the conditional
is not working? Please include the output as well.

Thanks,
Joe


On Jul 2, 5:59 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
> 2010/7/2 Shlomit Gazit <shlomitpatr...@gmail.com>
>
> > 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: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to