Hi,
I have a bit of a code structure problem, I wonder if any-one can help?
I instantiate the IE class and assign it to a global object
$ie = Watir::IE.new
def browser;$ie;end
I go through an Object Map using Module constants
module Login
USERNAME = browser.text_field(:name, 'user_name')
PASSWORD = browser.text_field(:name, 'password')
# etc
end
I use Test::Unit setup and teardown methods
include Login
#the setup method is executed before each test method
def setup
browser.goto('http://missiontesting.updatelog.com')
browser.bring_to_front
browser.maximize
end
#the teardown method is executed after each test method
def teardown
browser.close
end
However, after the first test method, the browser is closed,
so Ruby cannot find the goto method (above in setup)
How best can I structure this?
aidy
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general