I figured it out:

It was the: *$ie.close*
Wrapping it in a method solved the problem. (See below for example)
------

require 'watir'
require 'test/unit'
require 'test/unit/testcase'

$ie = 
Watir::IE.start("http://cashwest.com/TestTheForm/Form/?reset=1&test=1&cf=8143&forcePage=1";)
$ie.bring_to_front

if
$ie.span(:class=>"formText", :text=>"title").exists?
puts("Found it! Title")
else
  puts("...back to the drawing board...")
end

titleExist = $ie.span(:class=>"formText", :text=>"title").exists?
puts titleExist
 
  class TC_personal_information < Test::Unit::TestCase
    include Watir
           
    def test_completely_unique_method_name
      assert($ie.span(:class=>"formText", :text=>"title").exists?)
    end 
       
  end #end class 

*def close*
$ie.close
*end*
--------------------
ruby debug05152007.rb
Found it! Title
true
Loaded suite debug05152007
Started
.
Finished in 0.0 seconds.

1 tests, 1 assertions, 0 failures, 0 errors
Exit code: 0
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to