A
aidy
I am having some serious problems with my unit tests.
below is a simple test
require 'watir'
require 'test/unit'
class TC_1 < Test::Unit::TestCase
def test_1
ie = Watir::IE.new
ie.goto('www.tnt.com')
if assert(ie.contains_text("zzzzzzzzzz")) # this is not going to be
there
p 'pass'
else
p 'fail'
end
rescue => e
puts(e.message + "\n" + e.backtrace.join("\n"))
ensure
ie.close
end
end
And this is the exception I get
'<nil> is not true.'
I really don't why this would be the case. Could anyone help?
Thanks
Aidy
below is a simple test
require 'watir'
require 'test/unit'
class TC_1 < Test::Unit::TestCase
def test_1
ie = Watir::IE.new
ie.goto('www.tnt.com')
if assert(ie.contains_text("zzzzzzzzzz")) # this is not going to be
there
p 'pass'
else
p 'fail'
end
rescue => e
puts(e.message + "\n" + e.backtrace.join("\n"))
ensure
ie.close
end
end
And this is the exception I get
'<nil> is not true.'
I really don't why this would be the case. Could anyone help?
Thanks
Aidy