Download Game! Currently 82 players. Last logged in:FloppySentenceStompZeteo

Blitzer's Blog >> 72743

Back to blogs index
Posted: 23 Sep 2026 18:42 [ permalink ]
x@hauki-office:~$ python3 test_dogtail.py
Creating logfile at /tmp/dogtail-x/logs/test_dogtail_20260923-150010_debug ...
Warning: AT-SPI's desktop is visible but it has no children. Are you running
any AT-SPI-aware applications?
Launching Zenity dialog window in the background...

--- Listing Active Applications via AT-SPI ---
 -> Found: zenity

--- Interacting with Zenity ---
[SUCCESS] Found Zenity application wrapper!
Found 'OK' button widget. Clicking it now...
Clicking on [push button | OK]
Mouse button 1 click at (1054.5,586.0)
[SUCCESS] Dialog closed successfully via Dogtail!
x@hauki-office:~$

Awesome

==

That is brilliant!
The output shows everything working flawlessly:

   1. -> Found: zenity: This confirms that your Xvfb display session, D-Bus
connection, and the AT-SPI registry daemon are communicating properly.
   2. Mouse button 1 click at (1054.5,586.0): Dogtail successfully scanned the
virtual coordinate space, discovered where Fluxbox rendered the button, and
executed a simulated mouse click on your headless desktop.

You now have a fully operational, headless Linux GUI automation pipeline
running on Debian 12.
## Useful Tips as You Begin Writing Tests:

* Use app.dump() to spy on elements: If you are testing a complex app and
don't know what a button or text field is called, run print(zenity_app.dump()).
 It will output the complete text-based tree of every widget, its name, and
its structural role (e.g., [text entry | Username]).
* Handling slower UI rendering: Sometimes heavy apps take a moment to paint a
window. Instead of hardcoded time.sleep(), use Dogtail's built-in wait
functions to keep your tests fast and reliable:

from dogtail.predicate import GenericPredicate# Wait for a specific child
window or button to exist up to 10 secondsok_button = zenity_app.child('OK',
roleName='push button', retry=True, timeout=10)


What kind of desktop application are you planning to build or test next with
Dogtail? I can show you how to handle more complex elements like typing text
or navigating nested application menus!