Module: Watir::TableContainer
- Included in:
- Table, TableSection
- Defined in:
- lib/watir-classic/table.rb
Instance Method Summary collapse
-
#[](index) ⇒ TableRow
A row in the Table.
-
#strings ⇒ Array<String>
Array of table element texts.
Instance Method Details
#[](index) ⇒ TableRow
Returns a row in the Watir::Table.
7 8 9 10 |
# File 'lib/watir-classic/table.rb', line 7 def [](index) assert_exists TableRow.new(self, :ole_object => @o.rows.item(index)) end |
#strings ⇒ Array<String>
Returns array of table element texts.
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/watir-classic/table.rb', line 14 def strings assert_exists rows_memo = [] @o.rows.each do |row| cells_memo = [] row.cells.each do |cell| cells_memo << TableCell.new(self, :ole_object => cell).text.gsub("\r\n","") end rows_memo << cells_memo end rows_memo end |