Usually it's best to use a case statement if you start to have more
than if/else conditions.
case (do stuff)
when (result1):
ie.links[1].click
when (result2):
ie.links[2].click
else:
ie.links[3].click
end
It tends to make it easier to read & easier to extend should you ever
need additional conditions...
I highly recommend case ... there is a *LOT* of power inside those
"when" criteria.
j.
On 12/14/05, Torres, Ben (HQP) <[EMAIL PROTECTED]> wrote:
> Hi,
>
> What is the syntax I use for else-if statements? I am using the code
> below, but I am getting an error:
>
> If cond1
> ie.links[1].click
> Else-if cond2
> ie.links[2].click
> Else
> ie.links[3].click
> End
>
>
> Thanks in advance...
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
>
--
"Remember. Understand. Believe. Yield! -> http://ruby-lang.org"
Jeff Wood
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general