Module: Bewildr::ControlTypeAdditions::ScrollAdditions
- Defined in:
- lib/bewildr/control_type_additions/scroll_additions.rb
Overview
:nodoc: all
Instance Method Summary collapse
-
#load_all_items_hack ⇒ Object
required because when a list is displayed, UI Automation only knows about the visible items.
-
#page_down_to_bottom_of_scroll_bar ⇒ Object
Scrolls down to the bottom, page by page.
Instance Method Details
#load_all_items_hack ⇒ Object
required because when a list is displayed, UI Automation only knows about the visible items. This method stores where the scroll value is, then moves the scroller to the top of the scroll bar and proceeds to page-down until the bottom of the scroll bar is reached. At this point, UI Automation knows about all the items in the list and we can put the scroll back where it was before we started this nonsense.
12 13 14 15 16 17 18 19 20 |
# File 'lib/bewildr/control_type_additions/scroll_additions.rb', line 12 def load_all_items_hack return unless scrollable? initial_scroll_value = vertical_scroll_percent scroll_to 0.0 scroll_to initial_scroll_value end |
#page_down_to_bottom_of_scroll_bar ⇒ Object
Scrolls down to the bottom, page by page
23 24 25 |
# File 'lib/bewildr/control_type_additions/scroll_additions.rb', line 23 def scroll_down_one_page while vertical_scroll_percent < 99.99 end |