Metadata-Version: 2.4
Name: flaui-uiautomation-wrapper
Version: 1.0.0b17
Summary: Tool to perform UI Automation on Windows desktop applications using an underlying FlaUI wrapper.
Keywords: automation,desktop automation,flaui,qa,testing,ui,ui-automation,windows,windows automation,windows testing
Author: Amruth VVKP, Varshith VVS, Tejaswani Sathish Kumar
Author-email: Amruth VVKP <amruthvvkp@gmail.com>, Varshith VVS <svvarsham@gmail.com>, Tejaswani Sathish Kumar <tejaswani12.92@gmail.com>
License-Expression: LGPL-3.0-or-later
License-File: COPYING
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: arrow>=1.3.0
Requires-Dist: pillow>=10.4.0
Requires-Dist: psutil>=6.1.1
Requires-Dist: pydantic>=2.10.6
Requires-Dist: pydantic-settings>=2.7.1
Requires-Dist: pythonnet==3.2.1
Requires-Dist: coverage>=7.17.5 ; extra == 'coverage'
Requires-Dist: pytest-sugar>=1.0.0 ; extra == 'pytest-sugar'
Requires-Python: >=3.11, <3.16
Project-URL: Changelog, https://github.com/amruthvvkp/flaui-uiautomation-wrapper/releases
Project-URL: Documentation, https://amruthvvkp.github.io/flaui-uiautomation-wrapper
Project-URL: Homepage, https://amruthvvkp.github.io/flaui-uiautomation-wrapper
Project-URL: Issues, https://github.com/amruthvvkp/flaui-uiautomation-wrapper/issues
Project-URL: Repository, https://github.com/amruthvvkp/flaui-uiautomation-wrapper
Provides-Extra: coverage
Provides-Extra: pytest-sugar
Description-Content-Type: text/markdown

# FlaUI for Python

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

[![PyPI - Version](https://img.shields.io/pypi/v/flaui-uiautomation-wrapper)](https://pypi.org/project/flaui-uiautomation-wrapper/)
[![PyPI - Python Version](https://img.shields.io/badge/python-3.11%20%7C%203.12%20%7C%203.13%20%7C%203.14%20%7C%203.15-blue)](https://pypi.org/project/flaui-uiautomation-wrapper/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/flaui-uiautomation-wrapper)](https://pypi.org/project/flaui-uiautomation-wrapper/)
[![License](https://img.shields.io/github/license/amruthvvkp/flaui-uiautomation-wrapper)](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/blob/master/LICENSE)

[![Build Status](https://dev.azure.com/amruthvvkp/amruthvvkp/_apis/build/status%2Fflaui-uiautomation-wrapper-ci?branchName=master)](https://dev.azure.com/amruthvvkp/amruthvvkp/_build/latest?definitionId=1&branchName=master)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
![Interrogate](badges/interrogate_badge.svg)
[![Docs](https://img.shields.io/badge/docs-zensical-blue)](https://amruthvvkp.github.io/flaui-uiautomation-wrapper)

[FlaUI](https://github.com/FlaUI/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](https://github.com/pythonnet/pythonnet), 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](https://docs.pytest.org/),
[Behave](https://behave.readthedocs.io/), [TestPlan](https://github.com/morganstanley/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.

```bash
pip install flaui-uiautomation-wrapper
```

```bash
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](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/blob/master/docs/troubleshooting.md#installation-problems).

## Quick start

```python
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](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/blob/master/docs/performance.md#compared-with-pywinauto).

## Documentation

Full documentation lives at
**[amruthvvkp.github.io/flaui-uiautomation-wrapper](https://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](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/milestone/1) and the
full [`ROADMAP.md`](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](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/discussions).

## Inspirations & Credits

- **[FlaUI](https://github.com/FlaUI/FlaUI)** — the C# library this project wraps; its core logic and
  test applications are the foundation of FlaUI for Python.
- **[robotframework-flaui](https://github.com/GDATASoftwareAG/robotframework-flaui)** (GDATA) — the
  prior-art Python integration for FlaUI that influenced this project's direction.
- **[Python.NET](https://github.com/pythonnet/pythonnet)** — the interop bridge that makes calling
  FlaUI from Python possible.
- **[Playwright](https://playwright.dev/python/)** / **[`pytest-playwright`](https://github.com/microsoft/playwright-pytest)**
  and **[FlaUIRecorder](https://github.com/twenzel/FlaUIRecorder)** — inspirations for the planned
  recorder and pytest tooling.

## Contributing

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

## Security

Please report vulnerabilities **privately** through
[GitHub Security Advisories](https://github.com/amruthvvkp/flaui-uiautomation-wrapper/security/advisories/new),
not as public issues. See [SECURITY.md](SECURITY.md) for supported versions, scope, and response
targets.

## License

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