Action payload · devices:control
button
System button: home, back, app_switcher, wake, lock, volume_up or volume_down. iOS has no system Back; built-in WDA also does not support app_switcher. Wake does not bypass the lockscreen.
Payload
{
"type": "button",
"name": "home"
}Payload fields
typestringrequiredDiscriminator that selects the action or content shape.
"button"namestringrequiredName of the resource or operation. For commands with an enum, choose one of the listed values.
"home""back""app_switcher""wake""lock""volume_up""volume_down"Unknown fields are rejected.
View JSON Schema
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"button"
],
"description": "Discriminator that selects the action or content shape."
},
"name": {
"type": "string",
"enum": [
"home",
"back",
"app_switcher",
"wake",
"lock",
"volume_up",
"volume_down"
],
"description": "Name of the resource or operation. For commands with an enum, choose one of the listed values."
}
},
"required": [
"type",
"name"
],
"additionalProperties": false,
"description": "System button: home, back, app_switcher, wake, lock, volume_up or volume_down. iOS has no system Back; built-in WDA also does not support app_switcher. Wake does not bypass the lockscreen.",
"example": {
"type": "button",
"name": "home"
}
}REST wraps this payload inside {requestId, command}. The matching MCP tool takes sessionId and requestId plus these fields, without the type discriminator.
Contract
Submit this as command to POST /sessions/{sessionId}/actions, pass it as the CLI action JSON, or use the matching MCP convenience tool. Command objects are strict and reject unknown fields.
Execution
System button: home, back, app_switcher, wake, lock, volume_up or volume_down. iOS has no system Back; built-in WDA also does not support app_switcher. Wake does not bypass the lockscreen.
Action status and driver result remain separate. A completed result can still require a fresh screenshot or hierarchy check to prove the intended visible effect.
