Sha256: 7f7d941ef7cbfa46e8459b6fa1560b4b6d4d3a29614b045236851f82c7e5e331

Contents?: true

Size: 774 Bytes

Versions: 32

Compression:

Stored size: 774 Bytes

Contents

# feature tests for navigation errors

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', '..') unless $SETUP_LOADED
require 'unittests/setup'
require 'watir/contrib/page_checker' 
#  To add checkers, call the ie.add_checker method
#
#  ie.

class TC_NavigateException < Test::Unit::TestCase
  include Watir
  
  def setup
    browser.add_checker(PageCheckers::NAVIGATION_CHECKER)
  end
  def teardown
    browser.disable_checker(PageCheckers::NAVIGATION_CHECKER)
  end
  
  def test_http_errors
    assert_raises(NavigationException) { browser.goto('http://localhost:3001') }        # Cannot find server or DNS Error
    assert_raises(NavigationException) { browser.goto('http://www.fxruby.org/dfdf' ) }  # HTTP 404 - File not found
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

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