Okay...
Here's a specific example of when the code is "true" outside of the assert, but 
when wrapped in an assert it returns false. Wouldn't -> assert(true) return 
true?  Trying to be more specific... Could it be the set up of my testcase 
using test/unit??

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

$ie = Watir::IE.start("http://.........";)
$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_title
      assert($ie.span(:class=>"formText", :text=>"title").exists?)
    end 
        
  end #end class 

$ie.close
------------------------------------------------------------------------------------
gives the following results:
------------------------------------------------------------------------------------
>ruby debug05152007.rb
Found it! Title
true
Loaded suite debug05152007
Started
F
Finished in 0.046 seconds.

  1) Failure:
test_title(TC_personal_information) [debug05152007.rb:24]:
<false> is not true.

1 tests, 1 assertions, 1 failures, 0 errors
>Exit code: 0

----------------------------------------------------------------------------------------------------
Thanks again - Lauren
_______________________________________________
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to