Sha256: a85ac1f52af63eac2e7f38629291a7a7d1cc0dd62068c139e77250009fb0e957

Contents?: true

Size: 838 Bytes

Versions: 2

Compression:

Stored size: 838 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
  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

2 entries across 2 versions & 2 rubygems

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