Class: Rufus::Accessors::Table
- Defined in:
- lib/rufus/accessors/table.rb
Instance Method Summary collapse
- #children ⇒ Object
-
#click_on(what) ⇒ Object
start with this method.
- #sorted? ⇒ Boolean
- #sorted_ascending? ⇒ Boolean
- #sorted_descending? ⇒ Boolean
Methods inherited from View
#class, #click, #displayed?, #enabled?, #exists?, #initialize, #locator, #send_keys, #text, #what
Methods included from Rufus
#click, #displayed_after_wait?, #displayed_hash_after_wait?, #elements_of_type, #enabled_after_wait?, #enabled_hash_after_wait?, #exists_after_wait?, #exists_hash_after_wait?, #find, included, #page_source, #scroll_to
Constructor Details
This class inherits a constructor from Rufus::Accessors::View
Instance Method Details
#children ⇒ Object
7 8 9 |
# File 'lib/rufus/accessors/table.rb', line 7 def children selenium.cells locator end |
#click_on(what) ⇒ Object
start with this method
23 24 25 26 27 28 29 30 |
# File 'lib/rufus/accessors/table.rb', line 23 def click_on(what) if what.is_a? Integer child_elements = children child_elements[what - 1].click if what - 1 <= child_elements.count else click_label what end end |
#sorted? ⇒ Boolean
11 12 13 |
# File 'lib/rufus/accessors/table.rb', line 11 def sorted? elements_sorted children end |
#sorted_ascending? ⇒ Boolean
15 16 17 |
# File 'lib/rufus/accessors/table.rb', line 15 def sorted_ascending? ascending? children end |
#sorted_descending? ⇒ Boolean
19 20 21 |
# File 'lib/rufus/accessors/table.rb', line 19 def sorted_descending? descending? children end |