Sha256: c5500188a8da4f798419c115984becc51a97425c9b3226090177157dd0661bf1

Contents?: true

Size: 588 Bytes

Versions: 12

Compression:

Stored size: 588 Bytes

Contents

module Watir
  module RowContainer
    #
    # Returns table row.
    #

    def row(*args)
      Row.new(self, extract_selector(args))
    end

    #
    # Returns table rows collection.
    #

    def rows(*args)
      RowCollection.new(self, extract_selector(args))
    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 to_a strings
  end # RowContainer
end # Watir

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
watir-6.19.1 lib/watir/row_container.rb
watir-6.19.0 lib/watir/row_container.rb
watir-6.18.0 lib/watir/row_container.rb
watir-6.17.0 lib/watir/row_container.rb
watir-6.16.5 lib/watir/row_container.rb
watir-6.16.4 lib/watir/row_container.rb
watir-6.16.3 lib/watir/row_container.rb
watir-6.16.2 lib/watir/row_container.rb
watir-6.16.1 lib/watir/row_container.rb
watir-6.16.0 lib/watir/row_container.rb
watir-6.15.1 lib/watir/row_container.rb
watir-6.15.0 lib/watir/row_container.rb