Class: Watir::Table

Inherits:
Element
  • Object
show all
Defined in:
lib/watirspec/watir.rb

Instance Method Summary collapse

Instance Method Details

#to_aObject

This method returns multi-dimensional array of the text’s in table.

It works with tr, th, td elements, colspan, rowspan and nested tables.



103
104
105
106
107
108
109
110
# File 'lib/watirspec/watir.rb', line 103

def to_a
  assert_exists
  y = []
  @o.rows.each do |row|
    y << TableRow.new(@container, :ole_object, row).to_a
  end
  y
end