Sha256: 33409751681d3c260c419fbf508821a0ecd97855f61f18411767022774d33bbf

Contents?: true

Size: 620 Bytes

Versions: 4

Compression:

Stored size: 620 Bytes

Contents

# frozen_string_literal: true

module Watir
  class TableRow < HTMLElement
    include CellContainer
    include Enumerable

    #
    # Yields each TableCell associated with this row.
    #
    # @example
    #   row = browser.tr
    #   row.each do |cell|
    #     puts cell.text
    #   end
    #
    # @yieldparam [Watir::TableCell] element Iterate through the cells for this row.
    #

    def each(&block)
      cells.each(&block)
    end

    #
    # Get the n'th cell (<th> or <td>) of this row
    #
    # @return Watir::Cell
    #

    def [](idx)
      cell(index: idx)
    end
  end # TableRow
end # Watir

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watir-7.3.0 lib/watir/elements/table_row.rb
watir-7.2.2 lib/watir/elements/table_row.rb
watir-7.2.1 lib/watir/elements/table_row.rb
watir-7.2.0 lib/watir/elements/table_row.rb