Skip to content

Commands reference ​

The protocol has 46 commands. Every one below is derived from the handler that implements it, so the parameters are the parameters the Runtime actually reads.

Required means the Runtime refuses the call without it. A parameter marked optional may still be needed for the command to do anything useful - the handler simply does not reject its absence.

Send {"method": "<command>", "params": {...}}; see the protocol for framing and errors for what can come back instead.

Extended automation (4) ​

invoke_method ​

Call a Q_INVOKABLE method or slot

python
await client.invoke_method(path: str, method: str)
ParameterTypeRequiredDefault
pathstringyes-
methodstringyes-

set_property ​

Write a property (triggers NOTIFY)

python
await client.set_property(path: str, property: str, value)
ParameterTypeRequiredDefault
pathstringyes-
propertystringyes-
valueanyyes-

wait_for_property ​

Block until a property reaches a value

python
await client.wait_for_property(path: str, property: str, value, *, timeout: int=5000, interval: int=100)
ParameterTypeRequiredDefault
pathstringyes-
propertystringyes-
valueanyyes-
timeoutintno5000
intervalintno100

wait_for_signal ​

Block until a signal fires once

python
await client.wait_for_signal(path: str, signal: str, *, timeout: int=5000)
ParameterTypeRequiredDefault
pathstringyes-
signalstringyes-
timeoutintno5000

Interaction (7) ​

drag ​

Drag source → target

python
await client.drag(path: str, from_x: int, from_y: int, to_x: int, to_y: int, *, button: str='left', modifiers: list[str] | None=None)
ParameterTypeRequiredDefault
from_xintyes-
from_yintyes-
to_xintyes-
to_yintyes-
buttonstringno-
pathstringyes-
modifiersanyno-

highlight_object ​

Overlay a coloured frame for debugging

python
await client.highlight_object(path: str, *, duration: int=2000, color: str='red')
ParameterTypeRequiredDefault
pathstringyes-
durationintno2000
colorstringnored

key_press ​

Press a single key (or chord like Ctrl+C)

python
await client.key_press(path: str, key: str, *, repeat: int=1)
ParameterTypeRequiredDefault
keystringyes-
repeatintno1
pathstringyes-

mouse_click ​

Click at object centre (button, count configurable)

python
await client.mouse_click(path: str, *, button: str='left', click_type: str='single', x: int | None=None, y: int | None=None, modifiers: list[str] | None=None)
ParameterTypeRequiredDefault
buttonstringno-
clickTypestringnosingle
xintno-
yintno-
pathstringyes-
modifiersanyno-

screenshot ​

PNG of a widget or whole window

python
await client.screenshot(path: str | None=None)
ParameterTypeRequiredDefault
pathstringno-

scroll ​

Wheel scroll on a widget

python
await client.scroll(path: str, *, dx: int=0, dy: int=0, modifiers: list[str] | None=None)
ParameterTypeRequiredDefault
dxintno0
dyintno0
pathstringyes-
modifiersanyno-

type_text ​

Type into a focusable widget

python
await client.type_text(path: str, text: str)
ParameterTypeRequiredDefault
textstringyes-
pathstringyes-

Mocking + multi-window (3) ​

clipboard ​

Read or write the system clipboard

python
await client.set_clipboard(text: str)
await client.get_clipboard()
ParameterTypeRequiredDefault
textstringno-

emit_signal ​

Programmatically emit a signal (test stub)

python
await client.emit_signal(path: str, signal: str, args: list | None=None)
ParameterTypeRequiredDefault
pathstringyes-
signalstringyes-
argsarrayno-

list_windows ​

Enumerate all top-level windows - each entry carries windowType (window/dialog/popup/tooltip...) and embedded (from 0.6.0)

python
await client.list_windows()

Takes no parameters.

Model / view data (2) ​

get_model_data ​

Cell values by index + role

python
await client.get_model_data(path: str, *, row: int | None=None, column: int | None=None, start_row: int | None=None, end_row: int | None=None, columns: list[int] | None=None, role: str='display')
ParameterTypeRequiredDefault
pathstringyes-
rolestringno-
rowintno-
columnintno-
start_rowintno0
end_rowintnototalRows - 1
columnsarrayno-

get_model_info ​

Row/column count + role names of a model

python
await client.get_model_info(path: str)
ParameterTypeRequiredDefault
pathstringyes-

Object discovery (10) ​

cancel_pick ​

Disarm picking (from 0.6.0)

Takes no parameters.

find_object ​

Resolve a single object by path, or search by name/class/properties within an optional root

python
await client.find_object(*, path: str | None=None, object_name: str | None=None, class_name: str | None=None, properties: dict | None=None, root: str | None=None, all_matches: bool=False)
ParameterTypeRequiredDefault
pathstringno-
objectNamestringno-
classNamestringno-
rootstringno-
propertiesobjectno-
allboolno-

get_children ​

Direct children of an object

python
await client.get_children(path: str, *, class_name: str | None=None)
ParameterTypeRequiredDefault
pathstringyes-
classNamestringno-

get_meta ​

What an object can do: class chain, signals, invokable methods, properties (from 0.6.0)

python
await client.get_meta(path: str)
ParameterTypeRequiredDefault
pathstringyes-

get_object_tree ​

Recursive subtree from a root

python
await client.get_object_tree(*, root: str | None=None, depth: int=-1)
ParameterTypeRequiredDefault
rootstringno-
depthintno-1

get_parent ​

The parent of an object

python
await client.get_parent(path: str)
ParameterTypeRequiredDefault
pathstringyes-

get_properties ​

Read N properties of an object

python
await client.get_properties(path: str, properties: list[str] | None=None)
ParameterTypeRequiredDefault
pathstringyes-
propertiesarrayno-

list_objects ​

Find objects by class_name / object_name

python
await client.list_objects(*, object_name: str | None=None, class_name: str | None=None, root: str | None=None, recursive: bool=True)
ParameterTypeRequiredDefault
objectNamestringno-
classNamestringno-
rootstringno-
recursiveboolno-

object_at ​

Hit-test a point against the live tree - the Inspector picker (from 0.6.0)

python
await client.object_at(x: float, y: float, *, window: str | None=None)
ParameterTypeRequiredDefault
xnumberyes-
ynumberyes-
windowstringno-

pick_element ​

Arm native element picking - pushes element_hovered/element_picked (from 0.6.0)

ParameterTypeRequiredDefault
highlightboolnotrue

Performance (3) ​

frame_time ​

FPS + min/avg/max frame duration over a window

python
await client.frame_time(path: str | None=None, duration_ms: int=1000)
ParameterTypeRequiredDefault
duration_msintno1000
pathstringno-

memory_snapshot ​

Process RSS / VSize / threads / heap

python
await client.memory_snapshot()

Takes no parameters.

paint_count ​

Count paint events on a widget over a window

python
await client.paint_count(path: str, duration_ms: int=1000)
ParameterTypeRequiredDefault
pathstringyes-
duration_msintno1000

Protocol (4) ​

echo ​

Returns {"text": <input>} - diagnostic only

python
await client.echo(text: str)
ParameterTypeRequiredDefault
textstringyes-

handshake ​

Negotiate protocol version + auth - mandatory first message

ParameterTypeRequiredDefault
min_versionintno1
max_versionintno1
tokenstringno-

ping ​

Health check, returns {"pong": true}

python
await client.ping()

Takes no parameters.

version ​

Runtime version, protocol version, Qt version, and one status line per toolkit backend

python
await client.version()

Takes no parameters.

Push subscriptions (5) ​

list_subscriptions ​

List active subscriptions on this connection

python
await client.list_subscriptions()

Takes no parameters.

subscribe_destroyed ​

Push one object_destroyed when the QObject is destroyed

python
await client.subscribe_destroyed(path: str, callback=None)
ParameterTypeRequiredDefault
pathstringyes-

subscribe_property ​

Push property_changed events for a property

python
await client.subscribe_property(path: str, property: str, callback=None)
ParameterTypeRequiredDefault
pathstringyes-
propertystringyes-

subscribe_signal ​

Push signal_emitted events for a signal

python
await client.subscribe_signal(path: str, signal: str, callback=None)
ParameterTypeRequiredDefault
pathstringyes-
signalstringyes-

unsubscribe ​

Cancel a subscription

python
await client.unsubscribe(subscription_id: str)
ParameterTypeRequiredDefault
subscription_idstringyes-

Recording (2) ​

start_recording ​

Begin recording user interactions

python
await client.start_recording()

Takes no parameters.

stop_recording ​

End recording, return the script

python
await client.stop_recording()

Takes no parameters.

Touch & gestures (5) ​

multi_touch ​

Arbitrary multi-finger sequence

python
await client.multi_touch(path: str, touches: list[dict])
ParameterTypeRequiredDefault
touchesanyyes-
pathstringyes-

pinch ​

Two-finger pinch with scale + optional rotation

python
await client.pinch(path: str, start_distance: int, end_distance: int, *, center_x: int | None=None, center_y: int | None=None, rotation: float=0.0, duration: int=300)
ParameterTypeRequiredDefault
start_distanceintyes-
end_distanceintyes-
durationintno300
stepsintno10
rotationnumberno0.0
center_xintno-
center_yintno-
pathstringyes-

swipe ​

Directional swipe

python
await client.swipe(path: str, from_x: int, from_y: int, to_x: int, to_y: int, *, duration: int=300, steps: int=10)
ParameterTypeRequiredDefault
from_xintyes-
from_yintyes-
to_xintyes-
to_yintyes-
durationintno300
stepsintno10
pathstringyes-

touch_long_press ​

Long press with configurable duration

python
await client.touch_long_press(path: str, *, x: int | None=None, y: int | None=None, duration: int=800)
ParameterTypeRequiredDefault
durationintno800
xintno-
yintno-
pathstringyes-

touch_tap ​

Single-finger tap

python
await client.touch_tap(path: str, *, x: int | None=None, y: int | None=None, duration: int=50)
ParameterTypeRequiredDefault
durationintno50
xintno-
yintno-
pathstringyes-

Visual verification (1) ​

screenshot_compare ​

Diff a widget against a baseline PNG

python
await client.screenshot_compare(baseline: str, *, path: str | None=None, threshold: float=0.02)
ParameterTypeRequiredDefault
baselinestringyes-
thresholdnumberno0.02
channel_toleranceintno10
pathanyno-

Released under a commercial licence. Privacy · Terms