Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

FlaUI for Python

Pythonic, type-safe Windows UI automation — the full FlaUI API in Python.

PyPI - Version PyPI - Python Version PyPI - Downloads License

Build Status Ruff Interrogate Docs

FlaUI is a .NET library for UI automated testing of Windows desktop applications — Win32, WinForms, WPF, and Store apps — built on top of Microsoft's UI Automation technology. FlaUI for Python brings the complete FlaUI API to Python via Python.NET, so you get the full power of FlaUI without leaving the Python ecosystem.

Unlike existing Python integrations that are tied to a single test runner, FlaUI for Python is plug-and-play and works with any Python framework — pytest, Behave, TestPlan, unittest, or your own tooling — with first-class IDE intellisense backed by Pydantic models.

Key Differentiators

  • Complete feature parity — a 1:1 mapping of FlaUI's exposed C# API, not a thin subset.
  • Type safety — every input/output is backed by Pydantic models for validation and IDE autocompletion.
  • Any test framework — pytest, unittest, Behave, TestPlan, or none at all.
  • Pythonic API — snake_case methods and Python-native types while preserving the C# structure.

Installation

Windows-only · Python 3.11–3.15. FlaUI for Python is published on PyPI as flaui-uiautomation-wrapper. The required C# DLLs are bundled in the wheel, so there are no separate driver binaries to manage.

pip install flaui-uiautomation-wrapper
uv add flaui-uiautomation-wrapper

Requires 64-bit CPython 3.11–3.15 and the .NET Framework 4.8 runtime (built into current Windows). If the install or the first setup_pythonnet_bridge() call fails, see Installation problems.

Quick start

from flaui.lib.pythonnet_bridge import setup_pythonnet_bridge

# MUST run before importing any C#-backed modules
setup_pythonnet_bridge()

from flaui.lib.enums import UIAutomationTypes
from flaui.modules.automation import Automation

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()

Performance

Measured median
Overhead over calling FlaUI C# directly None measurable (under the 5 ms gate on every operation)
Element lookup vs pywinauto's uia backend 1.5–5.6× faster (35 ms vs 198 ms by name on WinForms)
Mouse click vs pywinauto 4.5–5× faster (127 ms vs 566 ms on WinForms)¹

Setup: Windows 11, Python 3.11, the bundled WinForms and WPF test apps, wrapper on UIA3, 100 runs, default timings on both sides. ¹ pywinauto waits out the double-click time before every click. pywinauto's win32 backend beats both libraries' UIA paths on finds and checkbox/radio actions where it applies (WinForms only, no AutomationId); its clicks take as long as uia's. Full numbers: Performance.

Documentation

Full documentation lives at amruthvvkp.github.io/flaui-uiautomation-wrapper, including:

  • Basics & Advanced guides (Initialize → Launch → Find → Interact, XPath, ConditionFactory, caching) with side-by-side Python/C# examples.
  • API Reference auto-generated for every control and pattern.
  • Examples for pytest, unittest, Behave, TestPlan, and Robot Framework.
  • Contributing guides for development, testing, and porting C# tests.

Roadmap

This project is in active development toward its first major release. Track progress on the v1.0.0 milestone and the full ROADMAP.md, which also outlines post-v1 companion tooling (a record-and-generate recorder, an MCP server, a pytest-flaui plugin, and FlaUI agent skills).

Have an idea or feature request? Join the GitHub Discussions.

Inspirations & Credits

  • FlaUI — the C# library this project wraps; its core logic and test applications are the foundation of FlaUI for Python.
  • 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-playwright and FlaUIRecorder — inspirations for the planned recorder and pytest tooling.

Contributing

Contributions are welcome! See docs/contributing.md for the development workflow, coding standards, and testing guidelines.

Security

Please report vulnerabilities privately through GitHub Security Advisories, not as public issues. See SECURITY.md for supported versions, scope, and response targets.

License

Licensed under the LGPL-3.0-or-later. The LGPL adds permissions to the GNU GPL v3, whose text is in COPYING.

Metadata

Release files for flaui-uiautomation-wrapper 1.0.0b16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flaui-uiautomation-wrapper 1.0.0b16
File Size Uploaded Provenance Actions
flaui_uiautomation_wrapper-1.0.0b16.tar.gz 382.5 kB Without provenance Details for flaui_uiautomation_wrapper-1.0.0b16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flaui-uiautomation-wrapper 1.0.0b16
File Interpreter ABI Platform Actions
flaui_uiautomation_wrapper-1.0.0b16-py3-none-any.whl Python 3 none any Details for flaui_uiautomation_wrapper-1.0.0b16-py3-none-any.whl

Total release size: 783.2 kB

Release files / flaui_uiautomation_wrapper-1.0.0b16.tar.gz

Download URL flaui_uiautomation_wrapper-1.0.0b16.tar.gz
Size 382.5 kB
Tags Source
SHA-256 checksum
How to use checksums
65d8e6d63a8d9b7469fad54499f56d8e4c148d3d3e4f32d31947ad4b70c22d52
BLAKE2b-256 checksum
How to use checksums
0d474f59ad276bdc1169495572f3c33e2d24a274b5f220c9fae56f5100b7588d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / flaui_uiautomation_wrapper-1.0.0b16-py3-none-any.whl

Download URL flaui_uiautomation_wrapper-1.0.0b16-py3-none-any.whl
Size 400.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38efad62380381c366a94fa0d96c42fa01acc3eecca4cbe65cb5dddb50d346a7
BLAKE2b-256 checksum
How to use checksums
5ad784561d0619ae608fb6f76bc780ac5e34efb897f48207a87fdc8d4bcf9d10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for flaui-uiautomation-wrapper 1.0.0b16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page