Sha256: da6be7ad1fb419d190ff446775cf2bd4ccbe5c057fd8a8606ebe6073d2904796

Contents?: true

Size: 1.42 KB

Versions: 23

Compression:

Stored size: 1.42 KB

Contents

# feature tests for Javascript redirect

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

class TC_Redirect < Test::Unit::TestCase
    
  def setup
    goto_page("redirect.html")
  end
  
  def goto_multiple_redirect
    goto_page("redirect1.html")
  end

  tag_method :test_single_redirect, :fails_on_ie
  def test_single_redirect
    assert_raises(UnknownObjectException) {browser.div(:id , "div77").click }
    assert_raises(UnknownObjectException) {browser.div(:title , "div77").click }
    
    assert(browser.text_field(:name, "text1").verify_contains("0") )  
    browser.div(:id , "div3").click
    assert(browser.text_field(:name, "text1").verify_contains("1") )  
    browser.div(:id , "div4").click
    assert(browser.text_field(:name, "text1").verify_contains("0") )  
  end
  
  tag_method :test_multiple_redirect, :fails_on_ie
  def test_multiple_redirect
    goto_multiple_redirect()
    assert_raises(UnknownObjectException) {browser.div(:id , "div77").click }
    assert_raises(UnknownObjectException) {browser.div(:title , "div77").click }
    
    assert(browser.text_field(:name, "text1").verify_contains("0") )  
    browser.div(:id , "div3").click
    assert(browser.text_field(:name, "text1").verify_contains("1") )  
    browser.div(:id , "div4").click
    assert(browser.text_field(:name, "text1").verify_contains("0") )  
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
firewatir-1.9.4 unittests/redirect_test.rb
firewatir-1.9.3 unittests/redirect_test.rb
firewatir-1.9.2 unittests/redirect_test.rb
firewatir-1.9.2.rc1 unittests/redirect_test.rb
firewatir-1.9.1 unittests/redirect_test.rb
firewatir-1.9.1.rc1 unittests/redirect_test.rb
firewatir-1.9.0 unittests/redirect_test.rb
firewatir-1.9.0.rc7 unittests/redirect_test.rb
firewatir-1.9.0.rc6 unittests/redirect_test.rb
firewatir-1.9.0.rc5 unittests/redirect_test.rb
firewatir-1.9.0.rc4 unittests/redirect_test.rb
firewatir-1.9.0.rc3 unittests/redirect_test.rb
firewatir-1.9.0.rc2 unittests/redirect_test.rb
firewatir-1.9.0.rc1 unittests/redirect_test.rb
firewatir-1.8.1 unittests/redirect_test.rb
firewatir-1.8.1.rc1 unittests/redirect_test.rb
firewatir-1.8.0 unittests/redirect_test.rb
firewatir-1.8.0.rc1 unittests/redirect_test.rb
firewatir-1.7.1 unittests/redirect_test.rb
firewatir-1.7.0 unittests/redirect_test.rb