Sha256: b421472cc6751a34dbc18038687af64e366a676e0c009edcb4ebea950f89eb96

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

module Watir
  module RowContainer

    #
    # Returns table row.
    #

    def row(*args)
      Row.new(self, extract_selector(args).merge(tag_name: "tr"))
    end

    #
    # Returns table rows collection.
    #

    def rows(*args)
      RowCollection.new(self, extract_selector(args).merge(tag_name: "tr"))
    end

    #
    # The table as a 2D Array of strings with the text of each cell.
    #
    # @return [Array<Array<String>>]
    #

    def strings
      wait_for_exists

      rows.inject [] do |res, row|
        res << row.cells.map(&:text)
      end
    end
    alias_method :to_a, :strings

  end # RowContainer
end # Watir

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
watir-6.10.1 lib/watir/row_container.rb