I have written heaps of tests using Selenium RC, using the FIT HTML methods, however now I want to extend these using the full power of Ruby.

I have done a little ruby development in the past, so I thought it would be a case of embedding selenium commands in the ruby files. But it doesnt seem to be quite the case.

For a simple example, I want to add a loop that will then type(using the selenium command) an integer x amount of times(using a ruby loop) into an input box. (10987654321)

$i = 10
while $i != 0
@selenium.type "input_box1", $i
$i = $i--

Most samples i find on the internet, dont really illustrate the combining of core ruby language with the selenium commands, such as ruby loops, arrays etc in order to utilize the two languages symbiotically.

Feel free to recommend any sites, books, etc that can give more insight into how to combine the ruby and selenium commands to full effect.

Thanks in advance.