Sha256: a05724473645e75741c60c90562eb70993dd21a87d189c94531301d49752e42c

Contents?: true

Size: 1.41 KB

Versions: 2

Compression:

Stored size: 1.41 KB

Contents

# feature tests for Javascript redirect
# revision: $Revision: 1.0 $

$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

2 entries across 2 versions & 2 rubygems

Version Path
mk_firewatir-1.6.5 unittests/redirect_test.rb
firewatir-1.6.5 unittests/redirect_test.rb