calabash/calabash-ios-server — pull request #18 by jmoody (2013-05-24 10:18:02+00:00)
Title: adds support for scroll to rows in table view by mark (access id, access label, and text)

adds LPScrollToRowWithMarkOperation which allows calabash-cucumber to send queries using `:scrollToRowWithMark`. this allows testers to scroll to a row using a mark instead of using an index (path).

supports searching for cells by:

* accessibilityIdentifier (iOS 5+)
* accessibilityLabel
* subviews in the cell's contentView that match:
* accessibilityIdentifier (iOS 5+)
* accessibilityLabel
* text (UILabel and UITextView)

for more details see:

* calabash/calabash-ios#128 for more details
* pull request: https://github.com/calabash/calabash-ios-server/pull/17

**WARNING:** not tested on iOS 4, but calls to `accessibilityIdentifier` are guarded by calls to `respondsToSelector:@selector(accessibilityIdentifier)`

here is an example of how to use the `:scrollToRowWithMark` on the calabash-cucumber side:

```
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? ''
screenshot_and_raise "Unable to scroll: '#{uiquery}' to: #{options}"
end
views_touched
end
```