Sha256: d3406687304a4eb56ab79ecae350f49f23e2ea1e3bb664139dbf8a0688cd3c2f

Contents?: true

Size: 1.24 KB

Versions: 31

Compression:

Stored size: 1.24 KB

Contents

# feature tests for navigation

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

class TC_Navigate < Test::Unit::TestCase
  tags :fails_on_firefox
  def test_navigation
    browser.clear_url_list
    goto_page 'buttons1.html'
    assert_equal(($htmlRoot + 'buttons1.html').gsub(" ","%20").downcase, browser.url.downcase)  

    assert_equal(1, browser.url_list.length)
    assert_equal(browser.url, browser.url_list[0])
    
    goto_page 'checkboxes1.html'
    assert_equal("Test page for Check Boxes", browser.title) 

    assert_equal(2, browser.url_list.length)
    assert_equal(browser.url, browser.url_list[1])
    
    browser.clear_url_list
    assert_equal(0, browser.url_list.length )
    
    browser.back
    assert_equal("Test page for buttons", browser.title)   
    
    browser.forward
    assert_equal("Test page for Check Boxes", browser.title)   
    browser.checkbox(:name, "box1").set
    assert(browser.checkbox(:name, "box1").isSet?)   
    
    browser.refresh
    # Not sure how we test this. Text fields and checkboxes dont get reset if you click the browser refresh button
    # -- this could be tested with the add-row page.
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
watir-3.0.0.rc2 unittests/navigate_test.rb
watir-3.0.0.rc1 unittests/navigate_test.rb
watir-2.0.4 unittests/navigate_test.rb
watir-2.0.3 unittests/navigate_test.rb
watir-2.0.2 unittests/navigate_test.rb
watir-2.0.2.rc1 unittests/navigate_test.rb
watir-2.0.1 unittests/navigate_test.rb
watir-2.0.0 unittests/navigate_test.rb
watir-2.0.0.rc3 unittests/navigate_test.rb
watir-2.0.0.rc2 unittests/navigate_test.rb
watir-1.9.2 unittests/navigate_test.rb
watir-1.9.2.rc1 unittests/navigate_test.rb
watir-1.9.1 unittests/navigate_test.rb
watir-1.9.1.rc1 unittests/navigate_test.rb
watir-1.9.0 unittests/navigate_test.rb
watir-1.9.0.rc7 unittests/navigate_test.rb
watir-1.9.0.rc6 unittests/navigate_test.rb
watir-1.9.0.rc5 unittests/navigate_test.rb
watir-1.9.0.rc4 unittests/navigate_test.rb
watir-1.9.0.rc3 unittests/navigate_test.rb