testudos.api.click
testudos.api.click
Coordinate-based click helper: simulate mouse click at scene coordinates.
Uses the engine’s simulateClick RPC. Coordinates are in the QML scene
space, where (0, 0) is the top-left corner of the window.
click_at
def click_at(x: int, y: int, target: Any | None = None) -> NoneSimulate a mouse click at the given scene coordinates.
Coordinates are interpreted in the QML scene coordinate system, where (0, 0) is the top-left corner of the application window.
Arguments:
x- X coordinate in the QML scene.y- Y coordinate in the QML scene.target- Optional object identifying the window or item whose scene coordinates are used (e.g. object name or QtObjectProxy). If not provided, the engine falls back to scanning top-level windows.
Raises:
TestudosError- If there is no active session or the engine reports a failure when trying to simulate the click.