Class: UICollectionView

Inherits:
UIBase
  • Object
show all
Defined in:
lib/calios-uikit-extension/ui_collection_view.rb

Class Method Summary collapse

Methods inherited from UIBase

accessibility_identifier, accessibility_label, class_name, double_tap, enabled?, flash, help, parse_query, property, query, touch

Class Method Details

.empty?(aIdOrIndex = nil) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/calios-uikit-extension/ui_collection_view.rb', line 17

def empty?(aIdOrIndex=nil)
  q = self.parse_query(aIdOrIndex)
  Calabash::Cucumber::Core.query(q).empty?
end

.number_of_items_in_section(aSection = 0) ⇒ Object



5
6
7
# File 'lib/calios-uikit-extension/ui_collection_view.rb', line 5

def number_of_items_in_section(aSection=0)
  Calabash::Cucumber::Core.query("#{self.class_name}", numberOfItemsInSection:aSection).first
end

.scroll(aDirection) ⇒ Object



13
14
15
# File 'lib/calios-uikit-extension/ui_collection_view.rb', line 13

def scroll(aDirection)
  Calabash::Cucumber::Core.scroll(self.class_name, aDirection)
end

.scroll_to_item(aItem, aSection, aScrollPosition) ⇒ Object



9
10
11
# File 'lib/calios-uikit-extension/ui_collection_view.rb', line 9

def scroll_to_item(aItem, aSection, aScrollPosition)
  scroll_to_collection_view_item(aItem, aSection, {scroll_position: aScrollPosition})
end