Sha256: 25457bd39119575a864794a07f88454be66acf28298b5a5d98a535029f53e80e
Contents?: true
Size: 1.24 KB
Versions: 37
Compression:
Stored size: 1.24 KB
Contents
require 'calabash-cucumber' module Briar module Picker_Shared def picker_current_index_for_column (column) arr = query('pickerTableView', :selectionBarRow) arr[column] end # methods common to generic and date pickers def picker_current_index_for_column_is(column, val) picker_current_index_for_column(column) == val end def previous_index_for_column (column) picker_current_index_for_column(column) - 1 end def picker_next_index_for_column (column) picker_current_index_for_column(column) + 1 end def picker_scroll_down_on_column(column) new_row = previous_index_for_column column #scroll_to_row("pickerTableView index:#{column}", new_row) query("pickerTableView index:'#{column}'", [{:selectRow => new_row}, {:animated => 1}, {:notify => 1}]) end def picker_scroll_up_on_column(column) new_row = picker_next_index_for_column column query("pickerTableView index:'#{column}'", [{:selectRow => new_row}, {:animated => 1}, {:notify => 1}]) end end end
Version data entries
37 entries across 37 versions & 1 rubygems