Sha256: dbaa24b4e454bd9464b1b94bfe52c38145b3f5a7b9b11d830bcb705cb293d4fa

Contents?: true

Size: 779 Bytes

Versions: 2

Compression:

Stored size: 779 Bytes

Contents

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

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

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

end 

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watir-1.5.5 unittests/lists_test.rb
watir-1.5.6 unittests/lists_test.rb