O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

let btns = app.buttons.matching( NSPredicate(format: "title like[c] 'Button'"))

From

Cover of iOS 11 Swift Programming Cookbook

Note

let btns = app.buttons.matching(NSPredicate(format:"enabled == false"))