Method: PageObject::Accessors#cell
- Defined in:
- lib/page-object/accessors.rb
#cell(name, identifier = {:index => 0}, &block) ⇒ Object Also known as: td
adds three methods - one to retrieve the text from a table cell, another to return the table cell element, and another to check the cell’s existence.
631 632 633 634 635 636 637 |
# File 'lib/page-object/accessors.rb', line 631 def cell(name, identifier={:index => 0}, &block) standard_methods(name, identifier, 'cell_for', &block) define_method("#{name}") do return platform.cell_text_for identifier.clone unless block_given? self.send("#{name}_element").text end end |