Module: FindTableRow
- Defined in:
- lib/rspec_tapas/locators/find_table_row.rb
Defined Under Namespace
Classes: TableRowFinder
Instance Method Summary collapse
- #find_table_cell(column_index_or_name, *column_expectations) ⇒ Object
- #find_table_row(*column_expectations) ⇒ Object
Instance Method Details
#find_table_cell(column_index_or_name, *column_expectations) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rspec_tapas/locators/find_table_row.rb', line 9 def find_table_cell(column_index_or_name, *column_expectations) expectations_hash = column_expectations. finder = TableRowFinder.new(self, expectations_hash) row = finder.call column_index = finder.header_key_to_column_index(column_index_or_name) row.find(:xpath, "./td[#{column_index + 1}]") end |
#find_table_row(*column_expectations) ⇒ Object
4 5 6 7 |
# File 'lib/rspec_tapas/locators/find_table_row.rb', line 4 def find_table_row(*column_expectations) expectations_hash = column_expectations. TableRowFinder.call(self, expectations_hash) end |