Sha256: 05e6200d51ddddd5767c569cb63e62709c085f035065a535f347dfcda59c19be
Contents?: true
Size: 520 Bytes
Versions: 12
Compression:
Stored size: 520 Bytes
Contents
# encoding: utf-8 module Watir class Table < HTMLElement # # The table as an 2D Array of strings with the text of each cell. # # @return [Array<Array<String>>] # def to_a assert_exists trs.inject [] do |res, row| res << row.wd.find_elements(:xpath, ".//td | .//th").map { |cell| cell.text } end end # # Get the n'th row of this table. # # @return Watir::TableRow # def [](idx) row(:index, idx) end end # Table end # Watir
Version data entries
12 entries across 12 versions & 1 rubygems