# feature tests for Forms # revision: $Revision: 1.29 $ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') if $0 == __FILE__ require 'unittests/setup' class TC_Forms2 < Test::Unit::TestCase def setup() $ie.goto($htmlRoot + "forms2.html") end def test_Form_Exists assert($ie.form(:name, "test2").exists?) assert_false($ie.form(:name, "missing").exists?) assert($ie.form("test2").exists?) assert_false($ie.form( "missing").exists?) assert($ie.form(:index, 1).exists?) assert_false($ie.form(:index, 88).exists?) assert($ie.form(:method, "get").exists?) assert_false($ie.form(:method, "missing").exists?) assert($ie.form(:action, "pass.html").exists?) assert_false($ie.form(:action, "missing").exists?) end def test_ButtonInForm assert($ie.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.showForms assert_equal(<