Class: SK::Table

Inherits:
Element show all
Defined in:
lib/table.rb

Instance Attribute Summary

Attributes inherited from Element

#el, #locator

Instance Method Summary collapse

Methods inherited from Element

#children, #displayed?, #enabled?, #exists?, #find, #find_child_el, #html, #initialize, #parent_el, #search, #text, #to_s

Constructor Details

This class inherits a constructor from SK::Element

Instance Method Details

#rowsObject



48
49
50
51
52
53
54
# File 'lib/table.rb', line 48

def rows
  rs = self.el.find_elements({tag_name: 'tr'})
  SK::Trace.debug "SK::Table el rows length = #{rs.length}"
  ws = rs.map.with_index { |r,i| SK::Row.new(r,i) } 
  SK::Trace.debug "SK::Table wt rows length = #{ws.length}"
  ws # returned
end