Joe,
For example I was trying:
$ie.radios.each do | radio |
if($ie.radio(:id,"ID_OTHER_OPTION_BUTTON"))
puts("yes")
else
puts("NO")
end
end
The output was 15 yes instead of 1.
On Jul 2, 9:05 am, joedio <[email protected]> wrote:
> 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 <[email protected]>
> wrote:
>
>
>
> > 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]