lib/page-object/elements/table.rb in page-object-0.5.1 vs lib/page-object/elements/table.rb in page-object-0.5.2

- old
+ new

@@ -18,9 +18,27 @@ for index in 1..self.rows do yield self[index-1] end end + # + # return the first row + # + # @return PageObject::Elements::TableRow + # + def first_row + self[0] + end + + # + # return the last row + # + # @return PageObject::Elements::TableRow + # + def last_row + self[-1] + end + protected def child_xpath ".//child::tr" end