Sha256: ed6972163c86d4f90ecce51ec1ed79aebb138b8a1562cd5b3d2a908f79f44d94

Contents?: true

Size: 1.06 KB

Versions: 4

Compression:

Stored size: 1.06 KB

Contents

# feature tests for TextArea Fields
# revision: $Revision: 1.0 $

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
require 'unittests/setup'

class TC_FileField_XPath < Test::Unit::TestCase
    

  def gotoPage
 	goto_page("fileupload.html")
  end
  
  def test_file_field_Exists
	gotoPage()
	#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='file3']").set($htmlRoot + "fileupload.html")	
	#click the upload button
	browser.button(:xpath, "//input[@name='upload']").click

	assert(browser.text.include?("PASS"))	
    end

    #def test_iterator
    #    gotoPage()
    #    assert_equal(6, browser.file_fields.length)
    #end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
firewatir-1.6.6 unittests/filefield_xpath_test.rb
firewatir-1.6.6.rc2 unittests/filefield_xpath_test.rb
firewatir-1.6.6.rc1 unittests/filefield_xpath_test.rb
firewatir-1.6.2 unittests/filefield_xpath_test.rb