Class: Watir::RowCollection

Inherits:
TableRowCollection show all
Defined in:
lib/watir/elements/row.rb

Overview

Row

Instance Method Summary collapse

Methods inherited from ElementCollection

#==, #[], #browser, #build, #each, #first, #initialize, #last, #locate, #reset!

Methods included from Locators::ClassHelpers

#class_from_string, #element_class_name, #element_matcher_class, #locator, #locator_class, #selector_builder, #selector_builder_class

Methods included from Waitable

#wait_until, #wait_while

Methods included from JSSnippets

#execute_js

Constructor Details

This class inherits a constructor from Watir::ElementCollection

Instance Method Details

#to_aObject



12
13
14
15
16
# File 'lib/watir/elements/row.rb', line 12

def to_a
  # we do this craziness since the xpath used will find direct child rows
  # before any rows inside thead/tbody/tfoot...
  @to_a ||= super.sort_by { |e| e.attribute_value(:rowIndex).to_i }
end