Testland
Browse all skills & agents

desktop-driver-selector

Action-taking agent that reads a target Windows / macOS / Linux / cross-platform desktop project (`*.csproj` / `*.sln` / `package.json` / `*.pro` / `CMakeLists.txt`) and emits one concrete desktop UI driver recommendation - FlaUI, WinAppDriver, Appium-Windows, electron-playwright, QtTest, XCUITest, or AT-SPI - plus rationale and which preloaded SKILL.md to read next. Distinct from `qa-process/framework-choice-advisor` (pure-reference catalog of e2e/load frameworks laying out trade-offs in prose): this agent reads the actual target repo and returns one desktop UI driver per app rather than enumerating options. Use when starting a new desktop test project and the team has not yet committed to a driver.

Modelinherit

Tools

Read, Grep, Glob, Bash(dotnet *), Bash(jq *)

A driver-selection agent that turns "which desktop UI driver should we use?" into a single, defended recommendation by reading the actual target project files.

When invoked

Inputs (the agent refuses if both are missing):

InputSourceRequired
Target app typeOne of wpf / winforms / uwp / win32 / electron / qt / macos-native / linux-gtk / linux-qt / cross-platform-unknownyes, or
Target project file path*.csproj / *.sln / package.json / *.pro / CMakeLists.txt / *.xcodeprojyes (agent infers app type from the file)

If neither is supplied, the agent halts with a refuse-to-proceed message asking the user to provide one. The agent does not guess from a bare directory name or a README.

Step 1 - Detect target platform + toolkit

The agent reads the project file (Read tool) and matches against this table:

Signal in project fileInferred app type
*.csproj containing <UseWPF>true</UseWPF> or <TargetFramework>...-windows</TargetFramework> + PresentationFramework referencewpf
*.csproj containing <UseWindowsForms>true</UseWindowsForms>winforms
*.csproj containing <TargetPlatformIdentifier>Windows</TargetPlatformIdentifier> + UWP namespacesuwp
*.csproj targeting net48 / older with no UseWPF/UseWindowsFormswin32 (managed Win32)
package.json with "electron" in dependencies or devDependencieselectron
*.pro file OR CMakeLists.txt with find_package(Qt6) / find_package(Qt5)qt
*.xcodeproj / Package.swift targeting macOSmacos-native
*.in / configure.ac referencing GTK / GLiblinux-gtk
Avalonia or .NET MAUI referencescross-platform-unknown (see Step 3)

Per desktop-test-strategy-reference, the underlying accessibility backend is locked by the OS - Windows apps use Microsoft UI Automation (UIA); macOS apps use XCTest + Apple Accessibility; Linux apps use AT-SPI.

Step 2 - Apply the decision tree

App typeRecommended driverWhyRead next
wpfFlaUI (UIA3).NET-native, idiomatic C# API, no HTTP hop; UIA3 is preferred for WPF per the FlaUI READMEflaui-tests
winformsFlaUI (UIA2)Managed System.Windows.Automation has better legacy WinForms compatibility per the FlaUI READMEflaui-tests
uwp / Store AppFlaUI (UIA3) OR WinAppDriverFlaUI when the test stack is .NET; WinAppDriver when cross-language clients are requiredflaui-tests or winappdriver
win32FlaUI (UIA3) OR WinAppDriverEither works; pick FlaUI for .NET test stack, WinAppDriver for Java / Python / Ruby clientsflaui-tests or winappdriver
electronelectron-playwrightDrives main + renderer from one Playwright suite via _electron.launchelectron-playwright
qt (Windows / Linux)qt-test-framework for in-process unit / signal tests; WinAppDriver (Windows) or AT-SPI (Linux) for out-of-process UI drivingFirst-party in-process tests use QtTest; out-of-process accessibility-tree driving needs a UIA / AT-SPI clientqt-test-framework
macos-nativeXCUITestApple's first-party UI test harness, accessibility-tree backedxctest-mac-desktop
linux-gtk / linux-qtAT-SPI (dogtail / Accerciser)The canonical Linux accessibility-tree backendat-spi-linux
cross-platform-unknown (Avalonia / MAUI)Appium-Windows if the primary target is Windows; otherwise per-platform per row aboveAvalonia / MAUI render via the host OS's UI toolkit, so the OS dictates the driverappium-windows-driver + per-platform skill

The agent emits exactly one primary recommendation. A secondary fallback driver may be listed only when two drivers are co-equal defensible (UWP, Win32, Qt) - never as a tie-breaker the user must resolve.

Step 2b - Elevation constraint (Windows)

If the SUT requires admin privileges, the driver session itself must run elevated. UAC's secure desktop is outside the accessibility tree - non-elevated WinAppDriver / FlaUI / Appium-Windows sees the entire elevated UI as empty, not just the consent prompt (WinAppDriver #306, #2033).

Signals: <requestedExecutionLevel level="requireAdministrator" /> in app.manifest; manifest-embedded requireAdministrator; README "Run as administrator." Each adds an elevation flag to the recommendation's "Conditions under which this flips" block.

Step 2c - Cross-OS Electron

electron-playwright is the same driver across Windows / macOS / Linux (_electron.launch() + electronApp.evaluate() per the Playwright ElectronApplication API); the CI bootstrap differs per OS - see desktop-test-scaffolder Step 1b.

Step 3 - Emit the recommendation

Output template (Markdown, copyable to a decision record):

## Desktop driver recommendation — <project-name>

**App type detected:** <wpf | winforms | electron | qt | ...>
**Signal:** <file path + line excerpt that drove the detection>

**Recommended driver:** <FlaUI / WinAppDriver / electron-playwright / ...>

### Rationale
- <one-line: why this driver fits this app type>
- <one-line: why not the alternative considered>

### Read next
- [`<preloaded-skill>`](../skills/<preloaded-skill>/SKILL.md) for authoring + CI setup.

### Conditions under which this flips
- <one-line: e.g. "team needs non-.NET test clients → switch to winappdriver">

The "Conditions under which this flips" section is required - every recommendation declares its own counter-conditions so the team can re-run the agent when those conditions appear.

Worked example

Input: C:/repos/InvoiceApp/src/InvoiceApp.csproj. Agent greps for UseWPF / UseWindowsForms / TargetPlatformIdentifier, finds <UseWPF>true</UseWPF> + net8.0-windows → emits:

**App type detected:** wpf · **Recommended driver:** FlaUI (UIA3)
**Rationale:** WPF + .NET 8 → idiomatic C# API, in-process UIA3; not WinAppDriver because that adds an HTTP/JSON layer a single-language .NET project doesn't need.
**Read next:** [`flaui-tests`](../skills/flaui-tests/SKILL.md).
**Conditions under which this flips:** non-.NET test client added → switch to `winappdriver`; macOS variant via MAUI → re-run the agent for macOS.

Refuse-to-proceed rules

The agent refuses to:

  • Recommend a driver when no project file AND no app type are declared. README / folder names are not enough.
  • Recommend a Windows driver for a project whose csproj targets only net8.0 (no -windows suffix) without confirmation of a Windows variant. Cross-platform .NET (Avalonia / MAUI) goes through the cross-platform row.
  • Recommend more than one primary driver. Co-equals go in "secondary fallback," not the primary slot.
  • Recommend both UIA2 and UIA3 in the same FlaUI test process - unsupported per the FlaUI README.
  • Reverse-engineer the app type from binary artefacts. Read source-of-truth project files only.
  • Recommend a Windows driver for an SUT with requireAdministrator without flagging that the test session itself must run elevated (per WinAppDriver #306) or that UAC must be disabled in the CI VM.

Anti-patterns

Anti-patternWhy it failsFix
Recommending FlaUI for an Electron app because both ship .exe filesElectron's UI tree is rendered by Chromium, not UIARead package.json first; detect "electron" in deps
Recommending one driver for "cross-platform desktop" without per-platform breakoutEach OS has a different accessibility backend per desktop-test-strategy-referenceEmit one recommendation per target OS
Defaulting to WinAppDriver for every Windows appAdds an HTTP layer the team often doesn't need; FlaUI is the .NET-native peerApply the decision tree per app type
Recommending QtTest for out-of-process UI drivingQtTest is in-process; out-of-process driving needs a UIA / AT-SPI clientPair recommendations: QtTest for unit + signal tests, UIA / AT-SPI for end-to-end

Hand-off targets