flaui-tests
БесплатноБез исполняемых скриптовНе проверенUse for any task that writes, fixes or reviews UI tests for a Windows desktop app (WPF or WinForms) in C# or .NET, even a single test, including tests that…
от testland★ 18 звёзд на GitHubОб этом скилле
flaui-tests
Overview
FlaUI is a .NET library for automated UI testing of Windows applications
(flaui) that wraps Microsoft UI Automation (UIA) - the Windows
accessibility tree covered in desktop-test-strategy-reference - behind an
idiomatic C# API. It supports "Win32, WinForms, WPF, and Store Apps" via two
bindings: UIA2 (managed System.Windows.Automation,
Microsoft Learn - UI Automation Overview) and UIA3 (COM interop).
v5.0.0 released February 2025; MIT-licensed and actively maintained
(flaui).
Disambiguation - FlaUI vs winappdriver
FlaUI is a .NET library that links into the test process and
calls UIA directly. By contrast, winappdriver is an
HTTP/JSON service that exposes a W3C-WebDriver endpoint on
127.0.0.1:4723; tests speak Selenium-style protocol over the wire,
the driver is language-agnostic, and it can be invoked either
directly or through the Appium 2.x wrapper (gestures / multi-window
helpers / PowerShell hooks - both paths in that skill).
Pick FlaUI when the test stack is already C# / .NET-first and you
want in-process UIA calls without an HTTP hop. Pick winappdriver
when you need a Selenium client in another language or the Appium
feature surface.
When to use
- Test code lives in a C# / .NET project alongside the application
(a
dotnet testsolution). - Application under test is WPF, WinForms, Win32, or a Windows Store app - the four classes FlaUI documents support for (flaui).
- The team prefers strongly-typed control wrappers (
AsButton(),AsTextBox()) over WebDriver's stringly-typed locators. - No HTTP wire protocol required between test and driver (in-process testing minimises a moving part).
For cross-language test stacks (Java / Python / Ruby clients), use
winappdriver instead.
Authoring
NuGet packages
Per flaui, three packages cover the surface:
| Package | Purpose |
|---|---|
FlaUI.Core |
Base library - element abstractions, Application, ConditionFactory, Retry, control patterns |
FlaUI.UIA3 |
COM-based UIA binding - recommended for WPF and Store Apps (flaui) |
FlaUI.UIA2 |
Managed UIA binding using System.Windows.Automation (msuia2) - better legacy WinForms compatibility (flaui) |
Reference both FlaUI.Core and one of UIA2 / UIA3 from the test
project. Mixed-mode authoring (UIA2 and UIA3 in the same process) is
unsupported - see FlaUInspect which requires the
inspector mode to be picked at startup.
Launching the application under test
Per the FlaUI wiki - Application page:
using FlaUI.Core;
using FlaUI.UIA3;
// Launch a fresh process
var app = Application.Launch(@"C:\Path\To\MyApp.exe");
// Attach to an already-running process by name or PID
var existing = Application.Attach("MyApp");
// Best-effort: attach if running, launch otherwise
var aol = Application.AttachOrLaunch(new ProcessStartInfo(@"C:\Path\To\MyApp.exe"));
// For a Windows Store app, pass the AUMID
var store = Application.LaunchStoreApp("Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
using var automation = new UIA3Automation();
var window = app.GetMainWindow(automation);
Per flauiapp: "When the application object is disposed,
the application itself is closed as well." Pair the Application
lifecycle with the test harness's fixture scope so child processes
are cleaned up after each test class.
Finding elements with ConditionFactory
The lambda form is the shortest and is the upstream convention (flauisearch):
var loginButton = window.FindFirstDescendant(cf => cf.ByAutomationId("LoginButton"));
Prefer ByAutomationId (developer-set, locale- and theme-independent per
msuia2); fall back to ByControlType + a nested condition, then
ByName as a last resort. The equivalent ConditionFactory / PropertyCondition
forms, the FindFirst* / FindAll* families, and the full condition-constructor
list are in references/flaui-api.md.
Interacting with elements
Per flaui:
// Strongly-typed wrappers
var button = window.FindFirstDescendant(cf => cf.ByAutomationId("Submit")).AsButton();
button.Invoke();
var textbox = window.FindFirstDescendant(cf => cf.ByAutomationId("Username")).AsTextBox();
textbox.Enter("[email protected]");
var listbox = window.FindFirstDescendant(cf => cf.ByControlType(ControlType.List)).AsListBox();
listbox.Select(2);
AsButton().Invoke() calls the UIA InvokePattern on the element -
the accessibility-canonical "press" action, distinct from a synthetic
mouse click ([ms
Установить flaui-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flaui-tests?
Use for any task that writes, fixes or reviews UI tests for a Windows desktop app (WPF or WinForms) in C# or .NET, even a single test, including tests that click before the window is ready: FlaUI UIA2 and UIA3 packages, launching or attaching to the app, ConditionFactory locators by AutomationId, Retry waits and xUnit, NUnit or MSTest. For the WebDriver protocol use winappdriver.
Как установить скилл flaui-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flaui-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic