Sha256: 0912c88c9e19049aa7f40d45d36261e62a7965cbf2576d33fd5157cfa06c7779

Contents?: true

Size: 1.27 KB

Versions: 23

Compression:

Stored size: 1.27 KB

Contents

# feature tests for Firefox Browser
 
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
require 'unittests/setup'
 
class TC_FirefoxBrowser < Test::Unit::TestCase
 
    def setup()
    end
    
    def close_all_firefox_browsers
        ff1 = Watir::Browser.new
        ff2 = Watir::Browser.new
        ff3 = Watir::Browser.new
        ff1.close_all
        result = true
        # After closing all the browsers we'll not be able to connect to the JSSh. So just check
        begin
            jssh_socket = TCPSocket::new(MACHINE_IP, "9997")
            result = false
        rescue
            result = true
        end
        assert_true(result)
    end
 
    def test_status
        # Create the browser as all browsers are closed in above test case.
        #browser = Watir::Browser.new
        goto_page("radioButtons1.html")
        status = browser.status
        assert_equal(status, "Done")
    end
    
    def test_element_html
	  # Create the browser as all browsers are closed in above test case.
        #browser = Watir::Browser.new
        goto_page("buttons1.html")
        html = browser.button(:id, "b7").html
        assert_equal(html, "Click Me2")
    end

    def teardown()
        
    end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
firewatir-1.7.0.rc1 unittests/ff_test.rb
firewatir-1.6.7 unittests/ff_test.rb
firewatir-1.6.7.rc1 unittests/ff_test.rb