# feature tests for Forms # revision: $Revision: 1201 $ $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") end def test_Form_Exists assert($ie.form(:xpath , "//form[@name='test2']/").exists?) assert(!$ie.form(:xpath , "//form[@name='missing']/").exists?) assert($ie.form(:xpath , "//form[@method='get']/").exists?) assert(!$ie.form(:xpath , "//form[@method='missing']/").exists?) assert($ie.form(:xpath , "//form[@action='pass.html']/").exists?) assert(!$ie.form(:xpath , "//form[@action='missing']/").exists?) end def test_ButtonInForm assert($ie.form(:xpath , "//form[@name='test2']/").button(:caption , "Submit").exists?) end end require 'unittests/iostring' class TC_Form_Display < Test::Unit::TestCase include MockStdoutTestCase def test_showforms $ie.goto($htmlRoot + "forms2.html") $stdout = @mockout $ie.show_forms assert_equal(<