Method: XPath::HTML#table

Defined in:
lib/xpath/html.rb

#table(locator, options = {}) ⇒ Object



78
79
80
81
82
# File 'lib/xpath/html.rb', line 78

def table(locator, options={})
  xpath = descendant(:table)[attr(:id).equals(locator) | descendant(:caption).contains(locator)]
  xpath = xpath[table_rows(options[:rows])] if options[:rows]
  xpath
end