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