def _all_pred(opts)
      predicate = opts[:predicate]
      raise 'predicate must be provided' unless predicate

      visible = opts.fetch :visible, true
      %($.mainApp().getAllWithPredicate("#{predicate}", #{visible});)
    end
def _all_pred(opts)
      predicate = opts[:predicate]
      raise 'predicate must be provided' unless predicate

      visible = opts.fetch :visible, true
      %($.mainApp().getAllWithPredicate("#{predicate}", #{visible});)
    end
predicate - the predicate to evaluate on the main app

 visible - if true, only visible elements are returned. default true