Window methods, browser sessions serve 0, phone sessions 0 and computer sessions 8. A method marked not served answers StrategyUnavailable on that kind of session; check the handshake’s capabilities before relying on one.
Window.list
Browser: not served
Phone: not served
Computer: served
The desktop’s top-level windows as the taskbar lists them (visible, titled, not tool windows), front to back. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
windows | WindowInfo[] |
Window.focus
Browser: not served
Phone: not served
Computer: served
Bring a window to the front with the keyboard focus, restoring it first if it is minimized. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.setBounds
Browser: not served
Phone: not served
Computer: served
Move and resize a window’s visible frame in screen pixels; an omitted field keeps its value, and a maximized window is restored first. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
x | integer | No | |
y | integer | No | |
width | integer | No | |
height | integer | No | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.minimize
Browser: not served
Phone: not served
Computer: served
Minimize a window. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.maximize
Browser: not served
Phone: not served
Computer: served
Maximize a window. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.restore
Browser: not served
Phone: not served
Computer: served
Restore a minimized or maximized window to its normal size. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.close
Browser: not served
Phone: not served
Computer: served
Ask a window to close, as its close button does. The result has no window once it has closed; a window that asks first (unsaved changes) stays open. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
windowId | string | Yes | |
idempotencyKey | string | No | Makes a re-send after a reconnect safe: a repeated key returns the recorded response without acting again. See Idempotency keys. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |
Window.waitFor
Browser: not served
Phone: not served
Computer: served
Wait until a window whose title contains title (case-insensitive) and, when given, whose process is process exists, and return it. Running out of timeoutMs (default 5000, at most 60000) is ActionTimeout. Computer sessions only.
| Param | Type | Required | Description |
|---|---|---|---|
title | string | No | Part of the title, case-insensitive. |
process | string | No | The image name, such as notepad.exe. |
timeoutMs | integer | No | From 0 to 60000. |
| Field | Type | Description |
|---|---|---|
window | WindowInfo | The window after the action; absent once it no longer exists. |