Module: PageObject::Platforms::WatirWebDriver::Table

Defined in:
lib/page-object/platforms/watir_webdriver/table.rb

Instance Method Summary collapse

Instance Method Details

#[](idx) ⇒ PageObject::Elements::TableRow

Return the PageObject::Elements::TableRow for the index provided. Index is zero based.



13
14
15
# File 'lib/page-object/platforms/watir_webdriver/table.rb', line 13

def [](idx)
  Object::PageObject::Elements::TableRow.new(element[idx], :platform => :watir_webdriver)
end

#rowsObject

Returns the number of rows in the table.



20
21
22
# File 'lib/page-object/platforms/watir_webdriver/table.rb', line 20

def rows
  element.wd.find_elements(:xpath, child_xpath).size
end