Sha256: bf93c31abf63915f6631a356abac18371b667e3d3d2673849fa064f52bee0cde

Contents?: true

Size: 625 Bytes

Versions: 2

Compression:

Stored size: 625 Bytes

Contents

module Watir
  class TableRow < HTMLElement

    #
    # Get the n'th <td> of this element
    #
    # @return Watir::TableDataCell
    #

    def [](idx)
      td(:index, idx)
    end

    private

    def locate
      if @parent.kind_of?(Watir::Table)
        @parent.assert_exists
        TableRowLocator.new(@parent.wd, @selector, self.class.attribute_list).locate
      else
        super
      end
    end

  end # TableRow


  class TableRowCollection < ElementCollection
    private

    def locator_class
      @parent.kind_of?(Watir::Table) ? TableRowLocator : super
    end

  end # TableRowCollection
end # Watir

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
watir-webdriver-0.0.9 lib/watir-webdriver/elements/table_row.rb
watir-webdriver-0.0.8 lib/watir-webdriver/elements/table_row.rb