On Thu, Sep 30, 2010 at 4:29 PM, ISmellGas <[email protected]>
wrote:
> @contents = b.select_list(:name, "mydropdown").getAllContents
> @length = b.select_list(:name, "mydropdown").getAllContents.length

You could do it this way:

@length = @contents.length

> @random = Kernel.rand(@length)
> @value = @conten...@random]

Why is everything in instance variables (they begin with @)? Is it used
somewhere else? I would use local variables (just drop @ from the beginning
of the variable name).

Željko

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

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to