Skip to main content
When to use it. Your agent has to reach a screen behind a button, fill a field or check what is on screen without reading pixels. box ui lists what is on the simulator screen and taps, types and swipes in the app

Run it

box ui describe lists the screen, box ui tap --id add presses Add, box ui find shows 4 items

Each line is one element: its role, label, value and the ref tap --id takes. This is what box printed for SwiftieDev/SwiftUI-ToDos-App (MIT); the lines without a label are left out
The ToDos home screen box described: Reminders, My Lists, No Reminders and the Add Reminder button
The screen box saved with that job, made smaller for this page. Then tap an element by its label

Commands

  • box ui describe lists the elements, --tree nests them under their parent, --json prints all fields
  • box ui find TEXT prints the one element whose label, value or ref contains TEXT
  • box ui tap --label TEXT, --id REF or a point X Y
  • box ui type "text" types into the focused field
  • box ui swipe X1 Y1 X2 Y2, box ui button home (or lock, side, siri)
  • box ui screen out.png saves a picture of the screen
Start with box run to keep the app open between commands