unittests/form_xpath_test.rb in watir-1.5.4 vs unittests/form_xpath_test.rb in watir-1.5.5
- old
+ new
@@ -1,14 +1,14 @@
# feature tests for Forms
-# revision: $Revision: 1201 $
+# revision: $Revision: 1348 $
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__
require 'unittests/setup'
class TC_Forms2_XPath < Test::Unit::TestCase
def setup
- $ie.goto($htmlRoot + "forms2.html")
+ goto_page "forms2.html"
end
def test_Form_Exists
assert($ie.form(:xpath , "//form[@name='test2']/").exists?)
assert(!$ie.form(:xpath , "//form[@name='missing']/").exists?)
@@ -27,11 +27,11 @@
require 'unittests/iostring'
class TC_Form_Display < Test::Unit::TestCase
include MockStdoutTestCase
def test_showforms
- $ie.goto($htmlRoot + "forms2.html")
+ goto_page "forms2.html"
$stdout = @mockout
$ie.show_forms
assert_equal(<<END_OF_MESSAGE, @mockout)
There are 4 forms
Form name:
@@ -54,11 +54,11 @@
end
end
class TC_Forms3 < Test::Unit::TestCase
def setup
- $ie.goto($htmlRoot + "forms3.html")
+ goto_page "forms3.html"
end
def test_Form_Exists
assert($ie.form(:xpath , "//form[@name='test2']/").exists?)
assert(!$ie.form(:xpath , "//form[@name='missing']/").exists?)
@@ -147,11 +147,11 @@
end
end
class TC_Forms4 < Test::Unit::TestCase
def setup
- $ie.goto($htmlRoot + "forms4.html")
+ goto_page "forms4.html"
end
def test_find_text_field_ignoring_form
assert_equal($ie.text_field(:name, 'name').value, 'apple') # should it raise a not-unique error instead?
end
@@ -172,10 +172,10 @@
end
end
class TC_Hidden_Fields < Test::Unit::TestCase
def setup
- $ie.goto($htmlRoot + "forms3.html")
+ goto_page "forms3.html"
end
def test_hidden
# test using index