Application
Use the Application object to launch your application and establish a connection with the Slint UI testing framework.
Construct the Application with the following parameters:
- args: The elements of the command line to launch. Application passes them to
subprocess.Popen. - ssh_destination: To launch the application on a remote host through SSH, set this to a
user@hostname-style string. The Application sets up the ssh command line and assumes that the program that’s the first element ofargsexists on the remote machine. IfNone, the application is launched locally without SSH. - env: A dictionary of optional environment variables as key/value pairs to set when launching.
- launch_timeout: How many seconds Application waits for the program to launch and connect back.
Use Application with Python’s with statement ↗ to manage the lifetime of the subprocess and the network connection:
import slint_testing
with slint_testing.Application(["/path/to/app"]) as aut: # ...
# After leaving the above block, the application is terminated.Entering the with block raises ApplicationConnectionError if the application exits or does
not connect back within launch_timeout; the application is then terminated. Any later request raises it
if the connection to the application is lost, or if an earlier request was interrupted, for example by
Ctrl-C.
Leaving the with block asks the application to terminate, and kills it if it hasn’t exited after
10 seconds. An Application can be used in a with statement only once.
Properties
Section titled “Properties”first_window
Section titled “first_window”first_window: Window | NoneRead-only property that holds a reference to the first visible Slint Window. Use this as the entry point to obtain UI elements and test their state and interaction.
windows
Section titled “windows”windows: list[Window]Read-only property that returns a list of all visible Slint windows. Pick an element from the returned list and use this as the entry point to obtain UI elements and test their state and interaction.
Methods
Section titled “Methods”wait(timeout = None) -> int | NoneWaits until the AUT exits. Returns the exit code. Use this when you instructed the process to terminate through your own means.
© 2026 SixtyFPS GmbH