Sha256: 0bae9d4f0e1870025fef87f029a7ba70e50dc8a66d55c0964f6e23b1c441b33a

Contents?: true

Size: 956 Bytes

Versions: 2

Compression:

Stored size: 956 Bytes

Contents

# feature tests for Links with multiple attributes

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

class TC_Links_Multi < Test::Unit::TestCase
  
  def setup
    goto_page 'links_multi.html'
  end
  
  def test_existing
    assert_match(/not.html/, browser.link(:class, 'Papa').href)
    assert_match(/mama.html/, browser.link(:text, 'click').href)
  end

  def test_class_alias
    assert_match(/not.html/, browser.link(:class_name, 'Papa').href)
  end
  
  def test_hash_syntax
    assert_match(/not.html/, browser.link(:class => 'Papa').href)
    assert_match(/mama.html/, browser.link(:text => 'click').href)
  end
  
  def test_class_and_text
    assert_match(/papa.html/, browser.link(:class => 'Papa', :text => 'click').href)
  end
  
  def test_class_and_index
    assert_match(/papa.html/, browser.link(:class => 'Papa', :index => 1).href)
  end  

end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
watir-classic-3.0.0 unittests/links_multi_test.rb
watir-3.0.0.rc3 unittests/links_multi_test.rb