[Wtr-general] Can anyone solve this problem..???????
Dhamodharan
forum-watir-users at openqa.org
Wed Dec 6 06:21:58 EST 2006
# you were trying to use an undefined local variable in your test method
# here is an example that uses an instance variable for IE
# the test runs, but fails -- I don't know what you are looking for :-)
require 'watir'
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
class TC_Fields < Test::Unit::TestCase
include Watir
def setup
puts "Set URL variable"
test_site = 'http://www.yahoo.com'
puts "Start New Browser"
@ie = IE.new
puts "Setup: go to the test site: " + test_site
@ie.goto(test_site)
#puts "Assertion Test in Position A"
#assert(@ie.text_field(:id, "v1").exists?)
end
def test1
puts "Assertion Test in Position B"
assert(@ie.text_field(:id, "v1").exists?)
end
end
------------------------------------------------------------------------------
Hi i got thi error ..
Can anyone solve this ..
Loaded suite C:/Apps/PowerSeller Test Scripts/carl_textfields_test Started
Set URL variable Start New Browser
Setup: go to the test site: http://www.yahoo.com Assertion Test in Position
B E Finished in 1.082 seconds.
1) Error:
test1(TC_Fields):
NameError: undefined local variable or method `ie' for
#<TC_Fields:0x2b7fb48>
C:/Apps/PowerSeller Test Scripts/carl_textfields_test.rb:33:in `test1'
1 tests, 0 assertions, 0 failures, 1 errors
My gut is telling me it is something with my development environment. If
someone has a moment please copy and execute this script in your
environment.
thanks and regards ,
M.Dhamodharan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=5636&messageID=15712#15712
More information about the Wtr-general
mailing list