-
Notifications
You must be signed in to change notification settings - Fork 16
API
GET /health
Hopefully prints a nice, welcoming message.
POST /session {
"bundleID" : "com.companyname.example",
"bundlePath" : "/abs/path/to/MyApp.app", // optional if app already installed
"launchArgs" : [ "arg1", "arg2", ... ], // optional
"environment" : { "key" : "val", ... } // optional
}
Starts/launches the specified app
POST /tap/coordinates {
"x" : Number,
"y" : Number
}
Performs a tap gesture at OpenGL position x, y on the main screen. The coordinate space is the resolution of the screen, not the size of the app window (e.g. on an iPad, if your app is running at 1x, the coordinates for an element will be different than if it is running at 2x. The boundaries of the screen would be 0,0,1024,768).
GET /tree
Returns a JSON dump of the current view hierarchy. It's not super informative, as the XCUIElements are really just proxy representations of the native views and thus don't contain a lot of information. However, you can glean basic knowledge about what's present. A typical element looks like:
{
"enabled": true,
"id": "Settings",
"title": "",
"rect": {
"y": 20,
"x": 0,
"height": 44,
"width": 375
},
"label": "",
"value": "",
"type": 21, //we can stringify this at some point, the numbers correspond to more informative 'XCUIElemenTypes'
"children" : [ ... ] //only present if there are children.
}
GET /query/marked/:text
Returns an array of elements with value, label, or title == :text. Format is the same as /tree/, minus the children.
GET /query/id/:id
Returns an array of elements with identifier or accessibilityIdentifier == :id. Format is the same as /tree/, minus the children.