Use PyQtAuto to automate and test PySide6 applications. PyQtAuto works like Playwright for web browsers, but for Qt/PySide6 desktop applications. Screenshots can be grabbed to see what is going on.
This document describes how to use PyQtAuto to automate and test PySide6 applications. PyQtAuto works like Playwright for web browsers, but for Qt/PySide6 desktop applications.
In your project's pyproject.toml, add pyqtauto as a local source dependency:
[project]
dependencies = [
"pyside6>=6.5.0",
]
[tool.uv.sources]
pyqtauto = { path = "/Users/guilhem/Documents/projects/github/pyqtauto" }
[project.optional-dependencies]
dev = [
"pyqtauto",
]
Then install the dev dependencies:
uv sync --extra dev
Add the server import with a try/except to make it optional (recommended for production code):
# Optional import - pyqtauto may not be installed in production