FlaUI for Python
The complete FlaUI Windows UI Automation API — made Pythonic, typed, and batteries-included.

Automate any Windows application — WinForms, WPF, Win32, or Store apps — from Python with a clean, fully typed API that maps 1:1 to the battle-tested FlaUI C# library. No driver binaries to manage, no framework lock-in.
Get started API Reference Why FlaUI for Python?
Installation
FlaUI for Python targets Python 3.10–3.14 on Windows (the bundled FlaUI DLLs require the Windows UI Automation stack). All C# dependencies ship inside the wheel — there are no external drivers to install.
Trying a beta
We publish 1.0.0bN betas on the road to v1.0. Pre-releases are not installed by default —
opt in explicitly:
See Road to v1.0 for the beta-soak plan and how to give feedback.
Get Started
Why the C# examples?
Upstream FlaUI has limited written documentation, so throughout these docs we pair each Python snippet with the equivalent C# code for reference. If you have seen a pattern in the original C# library, the side-by-side tabs make it easy to map it onto the Python API.
# Standard initialization
from flaui.lib.pythonnet_bridge import setup_pythonnet_bridge
setup_pythonnet_bridge()
from flaui.modules.automation import Automation
from flaui.lib.enums import UIAutomationTypes
automation = Automation(UIAutomationTypes.UIA3)
main_window = automation.application.launch("notepad.exe").get_main_window(automation)
main_window.find_first_by_x_path("//Button[@Name='OK']").as_button().invoke()
Why FlaUI for Python?
-
Native UI Automation
Built on Microsoft's UI Automation (UIA) so you can inspect and drive any Windows application — WinForms, WPF, Win32, and Store apps alike.
-
Modern & Typed
Every element, pattern, and coordinate is backed by Pydantic — giving you autocompletion, IDE intellisense, and validation before calls cross the interop boundary.
-
Batteries Included
Zero-configuration setup. All FlaUI DLLs are bundled in the wheel — no driver binaries or external runtimes to manage.
-
Dual-Backend Support
Switch seamlessly between UIA3 (COM-based, for modern apps) and UIA2 (managed, for legacy apps) with a single argument.
-
Advanced Element Search
Find elements by Accessibility ID, Name, XPath, or arbitrary
ConditionFactorylogic — plus a full set of UIA patterns (Toggle, Select, Expand, Scroll, …). -
Resilient & Debuggable
Built-in
Retry, dynamic timeouts, and input waiting keep tests stable; on-screen overlays, capture, and video recording make failures easy to diagnose.
Works with any test framework
No lock-in to a single runner. Use FlaUI for Python with pytest, unittest, Robot Framework, Behave, TestPlan, or your own harness — see the Examples.
Bundled Library Versions
FlaUI Binary Versions
| Library | Version | Framework | Dependency | License |
|---|---|---|---|---|
| Core | 5.0 | .Net Framework 4.8 | System.CodeDom.dll | MIT |
| UIA3 | 5.0 | .Net Framework 4.8 | System.CodeDom.dll | MIT |
| UIA2 | 5.0 | .Net Framework 4.8 | Interop.UIAutomationClient.dll, System.CodeDom.dll | MIT |
Inspirations & Credits
- FlaUI: The core logic and test applications are derived from the upstream C# project.
- robotframework-flaui (GDATA): The prior-art Python integration for FlaUI that influenced this project's direction.
- Python.NET: The interop bridge that makes calling FlaUI from Python possible.
- Playwright /
pytest-playwrightand FlaUIRecorder: Inspirations for the planned recorder and pytest tooling. - Community: Special thanks to the contributors of FlaUI and the Python.NET team.
Next Steps
- Basics: Learn the core workflow: Initialize → Launch → Find → Interact.
- Advanced Concepts: Master XPath, ConditionFactory, and Caching.
- API Reference: Explore the full method documentation for every control.
- Troubleshooting: Resolve common setup and finding issues.
- Road to v1.0: See how the project gets to a stable
v1.0.0, how to test betas, and how docs are versioned.