Class: PageObject::Elements::TableRow
- Includes:
- Enumerable
- Defined in:
- lib/page-object/elements/table_row.rb
Instance Attribute Summary
Attributes inherited from Element
Instance Method Summary collapse
-
#[](what) ⇒ Object
Return the PageObject::Elements::TableCell for the index provided.
-
#columns ⇒ Object
Returns the number of columns in the table.
-
#each(&block) ⇒ Object
iterator that yields with a PageObject::Elements::TableCell.
Methods inherited from Element
#==, #check_exists, #check_visible, #children, #disabled?, #drag_and_drop_on, #following_sibling, #following_siblings, #initialize, #method_missing, #name, #parent, plural_form, #preceding_sibling, #preceding_siblings, #present?, #respond_to_missing?, #siblings, #wait_until, #when_not_present, #when_present
Methods included from NestedElements
Constructor Details
This class inherits a constructor from PageObject::Elements::Element
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class PageObject::Elements::Element
Instance Method Details
#[](what) ⇒ Object
Return the PageObject::Elements::TableCell for the index provided. Index is zero based. If the index provided is a String then it will be matched with the text from the columns in the first row. The text can be a substring of the full column text.
21 22 23 24 |
# File 'lib/page-object/elements/table_row.rb', line 21 def [](what) idx = find_index(what) idx && cell_items[idx] end |
#columns ⇒ Object
Returns the number of columns in the table.
29 30 31 |
# File 'lib/page-object/elements/table_row.rb', line 29 def columns cell_items.size end |
#each(&block) ⇒ Object
iterator that yields with a PageObject::Elements::TableCell
11 12 13 |
# File 'lib/page-object/elements/table_row.rb', line 11 def each(&block) cell_items.each(&block) end |