Sha256: 0dbb0be1458af4c08d41852140e5f654b9e26b5afe038b48bfbaf3fda0b8d91c

Contents?: true

Size: 850 Bytes

Versions: 10

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, 0).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

10 entries across 10 versions & 1 rubygems

Version Path
watir-3.0.0.rc2 unittests/lists_test.rb
watir-3.0.0.rc1 unittests/lists_test.rb
watir-2.0.4 unittests/lists_test.rb
watir-2.0.3 unittests/lists_test.rb
watir-2.0.2 unittests/lists_test.rb
watir-2.0.2.rc1 unittests/lists_test.rb
watir-2.0.1 unittests/lists_test.rb
watir-2.0.0 unittests/lists_test.rb
watir-2.0.0.rc3 unittests/lists_test.rb
watir-2.0.0.rc2 unittests/lists_test.rb