Sha256: d9c9084cf23f2dc92e16c02817005457e8e14eb64720cfbe3690623a38df8909
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
# feature tests for TextArea Fields # revision: $Revision$ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED require 'unittests/setup' class TC_FileField_XPath < Test::Unit::TestCase include Watir def setup goto_page "fileupload.html" end def test_file_field_Exists #test for existance of 4 file area assert(browser.file_field(:xpath, "//input[@name='file1']/").exists?) assert(browser.file_field(:xpath, "//input[@id='file2']/").exists?) #test for missing assert_false(browser.file_field(:xpath, "//input[@name='missing']/").exists?) assert_false(browser.file_field(:xpath, "//input[@name='totallybogus']/").exists?) #pop one open and put something in it. browser.file_field(:xpath, "//input[@name='file1']/").set($htmlRoot + "fileupload.html") #click the upload button browser.button(:xpath, "//input[@name='upload']/").click assert(browser.text.include?("PASS")) end def test_iterator assert_equal(6, browser.file_fields.length) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
watir-1.6.5 | unittests/filefield_xpath_test.rb |