Created
September 27, 2012 04:58
-
-
Save jonathanpenn/3792241 to your computer and use it in GitHub Desktop.
Using to-many predicates with UIAutomation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on this discussion: | |
// https://twitter.com/listrophy/statuses/251074683594747904 | |
// To setup: | |
// Create an application that has a tableView with a couple cells in it, one of | |
// which has the "coffee" in it's label | |
var target = UIATarget.localTarget(); | |
var app = target.frontMostApp(); | |
var window = app.mainWindow(); | |
var stuff = window.elements().firstWithPredicate("ANY cells.name like 'coffee'"); | |
// `stuff` now contains the *tableView* that has any cells with name like 'coffee' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment