Li Chen wrote:
> Lex Williams wrote:
>>> my_form = nil
>>> 
>>> catch(:FoundForm) do
>>>   agent.page.forms.each do |form|
>>>     form.fields.each do |field|
>>>       if(field.value == "Go")
>>>         my_form = form
>>>         throw FoundForm
>>>       end
>>>     end
>>>    end
>>> end

You must have missed my update on that method , if you're using the code 
you pasted above . It should throw :FoundForm , instead of FoundForm . 
Like this:

my_form = nil

catch(:FoundForm) do
   agent.page.forms.each do |form|
     form.fields.each do |field|
       if(field.value == "Go")
         my_form = form
         throw :FoundForm
       end
     end
    end
end
-- 
Posted via http://www.ruby-forum.com/.