playup/zucchini — pull request #5 by aidansteele (2012-04-05 02:19:14+00:00)
Title: Facilitate easier element hierarchy traversal with iOS 5+

iOS 5+ supports the new [UIAccessibilityIdentification](http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAccessibilityIdentification_Protocol/Introduction/Introduction.html) protocol, which allows us to give visual elements meaningful names without confusing the voice-over accessibility tool. Traversing the hierarchy to find named elements is a bit clumsy, so I added this new method.

For example, previously we had to do this

view.scrollViews()[0].elements()[0].elements()[0]

with a name we can do this:

view.scrollViews()[0].elements()[0].elements()["twitter"]

but with the addition in this pull request we can do:

view.$("twitter")