Sha256: 8495f1ae9b0dcff3146de19eb68cc04bd77df30cc6c091ccc9f495a815832527

Contents?: true

Size: 850 Bytes

Versions: 24

Compression:

Stored size: 850 Bytes

Contents

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
require 'unittests/setup'
  
class Lists_Tests < Watir::TestCase
  
  def setup
    goto_page 'lists.html'
  end        

  def test_list_items_exist
    assert(browser.li(:id, 'list1').exists?)
    assert(browser.li(:id, 'list2').exists?)
    assert(browser.li(:id, 'list3').exists?)    
    assert(browser.li(:id, 'ordered1').exists?)    
    assert_equal('Coffee', browser.li(:index, 1).text)
  end

  def test_list_item_exists_by_name
    assert(browser.li(:name, 'x1').exists?)
    assert ! (browser.li(:name, 'maptest02').exists?)
  end  
  
  def test_li_length
    assert_equal(6, browser.lis.length)
  end
  
  def test_multiple_attributes
    assert_equal('Phil', browser.li(:id => 'ordered1', :name => 'x1').text)
  end

end 

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
watir-1.9.2 unittests/lists_test.rb
watir-1.9.2.rc1 unittests/lists_test.rb
watir-1.9.1 unittests/lists_test.rb
watir-1.9.1.rc1 unittests/lists_test.rb
watir-1.9.0 unittests/lists_test.rb
watir-1.9.0.rc7 unittests/lists_test.rb
watir-1.9.0.rc6 unittests/lists_test.rb
watir-1.9.0.rc5 unittests/lists_test.rb
watir-1.9.0.rc4 unittests/lists_test.rb
watir-1.9.0.rc3 unittests/lists_test.rb
watir-1.9.0.rc2 unittests/lists_test.rb
watir-1.9.0.rc1 unittests/lists_test.rb
watir-1.8.1 unittests/lists_test.rb
watir-1.8.1.rc1 unittests/lists_test.rb
watir-1.8.0 unittests/lists_test.rb
watir-1.8.0.rc1 unittests/lists_test.rb
watir-1.7.1 unittests/lists_test.rb
watir-1.7.0 unittests/lists_test.rb
watir-1.7.0.rc1 unittests/lists_test.rb
watir-1.6.7 unittests/lists_test.rb