unittests/windows/close_window_test.rb in watir-1.5.6 vs unittests/windows/close_window_test.rb in watir-1.6.2
- old
+ new
@@ -1,9 +1,9 @@
# feature tests for closed windows
# revision: $Revision: 958 $
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..') if $0 == __FILE__
+$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..') unless $SETUP_LOADED
require 'unittests/setup'
class TC_CloseWindow < Watir::TestCase
execute :sequentially
@@ -11,10 +11,10 @@
goto_page "new_browser.html"
end
# reproduces defect http://jira.openqa.org/browse/WTR-16
def test_close_window_with_button
- $ie.link(:text, 'New Window').click
+ browser.link(:text, 'New Window').click
ie_new = Watir::IE.attach(:title, 'Pass Page')
assert(ie_new.text.include?('PASS'))
assert_nothing_raised {ie_new.close}
end
end
\ No newline at end of file