unittests/links_test.rb in watir-1.5.4 vs unittests/links_test.rb in watir-1.5.5
- old
+ new
@@ -1,17 +1,17 @@
# feature tests for Links
-# revision: $Revision: 1277 $
+# revision: $Revision: 1348 $
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'unittests/setup'
require 'cgi'
class TC_Links < Test::Unit::TestCase
- include Watir
+ include Watir::Exception
def setup
- $ie.goto($htmlRoot + "links1.html")
+ goto_page "links1.html"
end
def test_bad_attribute
assert_raises(MissingWayOfFindingObjectException) { $ie.link(:bad_attribute, 199).click }
begin
@@ -117,20 +117,20 @@
index+=1
end
end
def test_div_xml_bug
- $ie.goto($htmlRoot + "div_xml.html")
+ goto_page "div_xml.html"
assert_nothing_raised {$ie.link(:text, 'Create').exists? }
end
end
class TC_Frame_Links < Test::Unit::TestCase
- include Watir
+ include Watir::Exception
def setup
- $ie.goto($htmlRoot + "frame_links.html")
+ goto_page "frame_links.html"
end
def test_links_in_frames
assert($ie.frame("linkFrame").link(:text, "test1").exists?)
assert(!$ie.frame("linkFrame").link(:text, "missing").exists?)
@@ -150,10 +150,10 @@
require 'unittests/iostring'
class TC_showlinks < Test::Unit::TestCase
include MockStdoutTestCase
def test_showLinks
- $ie.goto($htmlRoot + "links1.html")
+ goto_page "links1.html"
$stdout = @mockout
$ie.showLinks
expected = [/^index name +id +href + text\/src$/,
get_path_regex(1, "links2.html", "test1"),
get_path_regex(2, "link_pass.html", "test1"),