Skip to content

Commit

Permalink
Merge branch '0.9.x' of github.com:calabash/calabash-ios into 0.9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
krukow committed Jun 4, 2013
2 parents 32e7e78 + 94d0327 commit 2433231
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions calabash-cucumber/lib/calabash-cucumber/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,31 @@ def scroll_to_cell(options={:query => "tableView",
views_touched
end


def scroll_to_row_with_mark(row_id, options={:query => 'tableView',
:scroll_position => :middle,
:animate => true})
uiquery = options[:query] || 'tableView'

args = []
if options.has_key?(:scroll_position)
args << options[:scroll_position]
else
args << 'middle'
end
if options.has_key?(:animate)
args << options[:animate]
end

views_touched=map(uiquery, :scrollToRowWithMark, row_id, *args)

if views_touched.empty? or views_touched.member? '<VOID>'
msg = options[:failed_message] || "Unable to scroll: '#{uiquery}' to: #{options}"
screenshot_and_raise msg
end
views_touched
end

def pinch(in_out, options={})
file = "pinch_in"
if in_out.to_sym==:out
Expand Down

0 comments on commit 2433231

Please sign in to comment.