Sha256: f353b68c8b45ff5c57f5512b7068a7baeacb0ed802c21b1db1c3380dd7f42de1

Contents?: true

Size: 890 Bytes

Versions: 10

Compression:

Stored size: 890 Bytes

Contents

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

class TC_BaseIndex < Test::Unit::TestCase
  include Watir::Exception
  
  def setup
    goto_page "multiple_specifiers.html"
  end

  def test_default_index
    assert "one", browser.table.row.cell.class_name
    assert "testcell", browser.table.row.cell.name
  end

  def test_zero_based_indexing
    assert "one", browser.button(:index => 0).class_name
    assert "two", browser.button(:index => 1).class_name    

    Watir::IE.zero_based_indexing = false

    assert "one", browser.button(:index => 1).class_name
    assert "two", browser.button(:index => 2).class_name    

    Watir::IE.zero_based_indexing = true

    assert "one", browser.button(:index => 0).class_name
    assert "two", browser.button(:index => 1).class_name    
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

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