unittests/setup/watir-unittest.rb in commonwatir-2.0.2 vs unittests/setup/watir-unittest.rb in commonwatir-2.0.3
- old
+ new
@@ -13,9 +13,12 @@
end
def browser
return $browser if $browser && $browser.exists?
$browser = Watir::Browser.new
end
+ def close_browser
+ $browser.close if $browser.exists?
+ end
def assert_class element, klass
assert_match(Regexp.new(klass, Regexp::IGNORECASE), element.class.to_s, "element class should be #{klass}; got #{element.class}")
end