Repository navigation
Releases
v0.2.0
WPF Locator Doctor now works from your AI assistant. The new MCP server lets Claude Code, GitHub Copilot in VS Code, Cursor and Claude Desktop score your WPF app's testability, fix its AutomationIds, and, on Windows, explore the running app.
MCP server, from the source code (any OS)
claude mcp add wpf-locator-doctor -- dnx wpf-locator-doctor-mcp --yesTools: score_source, list_problems, suggest_xaml_fixes (exact line edits with unique new IDs), compare_to_baseline, explain_rules. You need the .NET SDK, version 10 or newer.
MCP server with the running app (Windows)
Download wpf-locator-doctor-mcp-win-x64.mcpb below and open it in Claude Desktop, or unzip wpf-locator-doctor-mcp-win-x64.zip and use wpf-locator-doctor-mcp.exe as the command. It adds 9 tools:
open_app/close_app: start or attach to the app, and close it.snapshot_screen: what is on screen, with locator problems marked.recommend_locators: the best ways to find an element, ranked, with reasons and FlaUI / Appium code.check_locator: does a locator find exactly one element?act: click, type, select, expand, collapse or focus.wait_for,take_screenshot,score_live_app.
It needs the .NET 10 Desktop Runtime. To limit which apps it may touch, set WPF_LOCATOR_DOCTOR_ALLOWED_APPS.
Full guide: docs/mcp-server.md
Command-line tool
Unchanged, and now a regular (not preview) release:
dotnet tool install -g wpf-locator-doctorThe Windows live scan is still wpf-locator-doctor-live-win-x64.zip below.
v0.1.1-preview.1: Install from NuGet
The testability scorecard is now a one-line install.
Install
dotnet tool install -g wpf-locator-doctor --prerelease
wpf-locator-doctor scan-source path/to/YourWpfProjectThe NuGet package contains the source scan, which runs on Windows, macOS and Linux. You need the .NET SDK, version 10 or newer.
Live scan of a running app (Windows)
Download wpf-locator-doctor-live-win-x64.zip below, unzip it, and run:
wpf-locator-doctor.exe scan-live --exe path\to\YourApp.exe --source path\to\YourWpfProjectIt needs the .NET 10 Desktop Runtime. The zip also includes the source scan.
What changed since v0.1.0
- Published to NuGet as
wpf-locator-doctor. - The Windows live scan is now a ready-to-run download.
- The live scan now runs against a real app in CI on every push and fails the build if it breaks.
- The README shows a real sample report.
This is still an early preview. Commands and report formats may change before 1.0. The MCP server is coming next.
v0.1.0: Testability scorecard (preview)
First preview of WPF Locator Doctor. This release contains the testability scorecard only. The MCP server is coming next.
What it does
Checks whether the controls a tester needs (buttons, text boxes, lists, menus, tabs…) have good AutomationIds: are they there, set on purpose, unique, still the same as last time, and visible to test tools. Each screen and the whole app get a score from 0 to 100 and a grade from A to F. Every problem comes with the file, the line, and the line of XAML to add.
Two ways to scan
scan-sourcereads the project's XAML and C# files. Runs on Windows, macOS and Linux, and covers every screen, even ones nobody opened.scan-livereads the running app through Windows UI Automation, the same thing test tools use. Windows only.
Both write a Markdown report for people and a JSON report for tools. Pass the JSON as --baseline next time to catch IDs that disappeared, and use --min-score to fail a build pipeline when the score drops.
How to run it
You need the .NET SDK, version 10 or newer. Clone the repo and follow the Quick start. Try it first on the included practice app, which has one example of every problem.
Good to know
- This is an early preview. Commands, options and report formats may change before 1.0.
- It isn't on NuGet yet, so
dotnet tool installdoesn't work yet. - The source scan can't see controls created only in C# code.
- The live scan only sees open windows and the list rows on screen. It has been run in CI against the practice app on Windows, but not yet against large real-world apps.
Coming next
- An MCP server, so AI assistants (Claude Code, Copilot, Cursor…) can find locators for you.
- Self-healing for broken locators in FlaUI and Appium tests.
- Automatic pull requests that fix the test code or add the missing IDs to the app.
Feedback and bug reports are welcome in Issues.