Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

WPF Locator Doctor

Latest version: v0.2.1

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
MCP server Transport: stdio Publisher: swechhap
1 Stars
0 Forks
2 Versions
C# Repo language

Scan summary

WPF Locator Doctor was last scanned on 24 Nov 2026 at version 0.2.1. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published within 3 days (22–24 Nov 2026).
  • Findings: No rules fired in version 0.2.1.
  • MCP server: Runs over stdio.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.1 LATEST 24 Nov 2026 No rules fired
0.2.0 22 Nov 2026 No rules fired

No rules fired in 0.2.1

Findings

Findings for v0.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.1; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

WPF Locator Doctor

Diagnose, heal and fix the locators in your WPF UI automation tests.

Finding good locators in a WPF app usually means hours in inspect tools (Inspect.exe, FlaUInspect, Accessibility Insights), and tests still break when IDs are missing, duplicated or renamed. WPF Locator Doctor checks your app for you.

Today: the testability scorecard. It 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 actually visible to test tools. It gives each screen and the whole app 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.

New: an MCP server so AI assistants (Claude Code, Copilot, Cursor…) can score your project and add the missing IDs for you, and, on Windows, explore the running app: see the screen as test tools do, get ranked locators that are checked to find exactly one element, click, type, wait and take screenshots. See Use it from an AI assistant.

Coming next: self-healing for broken locators in FlaUI / Appium tests, and automatic pull requests that fix the test code or add the missing IDs to the app. See docs/research-analysis.md for the research and plan.

Works with any WPF app (.NET Framework or .NET). Built on Windows UI Automation and FlaUI.

Why it matters: the problems WPF automation testers face every day, how a score with exact fixes helps them agree with developers on what to change, and where the CLI and the MCP server fit: docs/why-it-matters.md.

What you get

This is a real scan of the included practice app (shortened):

$ wpf-locator-doctor scan-source samples/PracticeApp

Overall: grade B, score 86.5/100. Good. A few gaps to fix.

  ID coverage                 80.6%   25 of 31 controls have an AutomationId.
  ID quality                  90.4%   19 set on purpose, 5 borrowed from x:Name, 1 look generated.
  Uniqueness and rows         87.1%   1 ID(s) used more than once; 1 of 2 data lists have identifiable rows.
  Visible to test tools       93.8%   2 invisible control(s), 0 opaque area(s).
  Readable names              89.7%   26 of 29 controls have a readable name.

Screens (worst first):
  B     80.5  MainWindow  (21 controls, 14 problems)
  A     92.5  AddressPanel  (3 controls, 3 problems)
  A      100  SettingsWindow  (7 controls, 0 problems)

Problems: 18 (6 high, 4 medium, 8 low)
  HIGH   WT001 Button has no AutomationId.  [MainWindow.xaml:29]
  HIGH   WT004 "ActionButton" is used 2 times on this screen (line 44, line 45).  [MainWindow.xaml:44]
  HIGH   WT006 StarRating derives from Control and doesn't override OnCreateAutomationPeer, so test tools can't see it.  [Controls/StarRating.cs:13]
  MEDIUM WT003 Button "Clear" has the ID "Button_1", which looks machine-generated.  [MainWindow.xaml:27]
  MEDIUM WT005 Rows in ListBox "Recent orders" have no unique ID.  [MainWindow.xaml:57]
  …

The full report (testability-report.md) tells you exactly what to add:

  • High: Control has no AutomationId. Button has no AutomationId. (MainWindow.xaml:29)
    • Fix: Add AutomationProperties.AutomationId="RefreshButton" to this element.
  • Medium: ID looks machine-generated. Button "Clear" has the ID "Button_1", which looks machine-generated. (MainWindow.xaml:27)
    • Fix: Replace it with a meaningful ID, e.g. AutomationProperties.AutomationId="ClearButton".

Two ways to scan

Source scan (scan-source) Live scan (scan-live)
Reads The project's XAML and C# files The running app, through Windows UI Automation (the same thing test tools use)
Runs on Windows, macOS, Linux Windows only, with an unlocked desktop
Covers Every screen in the project, even ones nobody opened Only windows that are open, and list rows that are on screen
Good for Quick checks on every code change; exact file and line to fix The true picture of what tests will see, including third-party controls

Quick start

Source scan (Windows, macOS, Linux)

Install from NuGet. You need the .NET SDK, version 10 or newer:

dotnet tool install -g wpf-locator-doctor

Then scan a project:

wpf-locator-doctor scan-source path/to/YourWpfProject
Live scan (Windows)

Download wpf-locator-doctor-live-win-x64.zip from the latest release, unzip it, and run:

wpf-locator-doctor.exe scan-live --exe path/to/YourApp.exe --source path/to/YourWpfProject

It needs the .NET 10 Desktop Runtime. The Windows download also includes the source scan.

Run from the source code

Clone this repo and try it on the included practice app, which has one example of every problem:

dotnet run --project src/WpfLocatorDoctor.Cli -f net10.0 -- scan-source samples/PracticeApp

For the live scan from source, use -f net10.0-windows and scan-live instead.

Reports

Both scans write two files into ./testability-report/:

  • testability-report.md: the report for people (grade, what each check found, every problem with its fix).
  • testability-report.json: the same data for tools. Pass it as --baseline next time to check that no IDs disappeared.

Use it from an AI assistant (MCP server)

The MCP server gives your AI assistant tools to work on your app's locators. Then just ask, for example: "Score src/MyApp and add the missing AutomationIds to the worst screen." or "Start the app, open the settings window and give me the best locator for its OK button."

Where Tools Get it
Any OS (reads source code) score_source, list_problems, suggest_xaml_fixes (exact line edits with unique new IDs), compare_to_baseline, explain_rules NuGet package wpf-locator-doctor-mcp, run with dnx
Windows (adds the running app) all of the above, plus open_app, snapshot_screen, recommend_locators, check_locator, act, wait_for, take_screenshot, score_live_app, close_app wpf-locator-doctor-mcp-win-x64.zip or .mcpb on the releases page

Add it to Claude Code (VS Code and Cursor are similar; see the guide):

claude mcp add wpf-locator-doctor -- dnx wpf-locator-doctor-mcp --yes

On Windows, point it at the downloaded server instead:

claude mcp add wpf-locator-doctor -- C:\tools\wpf-locator-doctor-mcp\wpf-locator-doctor-mcp.exe

If your shell can't find dnx (for example with .NET from Homebrew), use dotnet dnx instead. The server is also listed in the MCP Registry as io.github.swechhap/wpf-locator-doctor. Full guide, with VS Code and Cursor setup, safety settings and example answers: docs/mcp-server.md.

Using it in a build pipeline

wpf-locator-doctor scan-source src/MyApp --min-score 75 --baseline last-report.json --quiet

Exit codes: 0 OK · 1 score below --min-score · 2 wrong usage · 3 the scan failed.

How the score works

Each check gives a percentage. The score is the weighted average of the checks that could be measured.

Check Weight What it asks
ID coverage 30 Of everything a user can click, type into or select, how much has an AutomationId?
ID quality 15 Were IDs set on purpose (best), borrowed from x:Name (OK), borrowed from x:Uid, or do they look machine-generated like Button_12 (bad)?
Uniqueness and rows 20 Is each ID used once per screen? Can the rows in each list be told apart?
Stability 15 Are the IDs from the previous report still there? (Only measured with --baseline.)
Visible to test tools 10 Are there custom controls that test tools can't see at all?
Readable names 10 Does each control have a readable label? (Also matters for screen-reader users.)

Grades: A 90+ · B 75–89 · C 60–74 · D 40–59 · F below 40.

Run wpf-locator-doctor rules to list every problem type (WT001–WT012) with a plain-English explanation.

Why "where the ID came from" matters

When a test asks a WPF control for its AutomationId, WPF returns the first of these that is set:

  1. AutomationProperties.AutomationId: set on purpose for testing. Best.
  2. x:Uid: meant for translation tools, often auto-generated (Button_12), so it changes.
  3. x:Name: the developer's own name for the control, which they may rename without knowing a test uses it.
Why some controls are invisible to test tools

A custom control built directly on Control, ContentControl, ButtonBase, RangeBase, TextBoxBase or HeaderedContentControl doesn't announce itself to UI Automation unless it overrides OnCreateAutomationPeer. Test tools can't see it, and any AutomationId set on it goes nowhere. The source scan reads the C# code to find these.

Project layout

src/WpfLocatorDoctor.Core     The engine: XAML + C# scanning, scoring, reports, and the rules for judging
                              each element of a running app. No Windows dependency, so it runs (and is tested) anywhere.
src/WpfLocatorDoctor.Live     A thin Windows-only layer: starts or attaches to the app, reads its UI and carries out
                              actions through FlaUI, and hands everything to the Core rules.
src/WpfLocatorDoctor.Cli      The wpf-locator-doctor command (CliApp.cs holds the logic; Program.cs only starts it).
src/WpfLocatorDoctor.Mcp      The MCP server for AI assistants. Only describes the tools; the answers come from Core (Assistant/).
                              Built twice: cross-platform (source tools, NuGet) and Windows (adds the live tools).
samples/PracticeApp           A small WPF app with one example of each problem (and good examples).
tests/                        Automated tests (run with: dotnet test WpfLocatorDoctor.slnx).
benchmark/                    Runs the tool on 11 open-source WPF apps and checks it against UI Automation (docs/benchmark.md).
docs/benchmark.md             Benchmark results: crashes, speed, precision, live agreement, and follow-ups.
docs/why-it-matters.md        Why testability matters, for testers and the developers they work with.
docs/mcp-server.md            How to set up and use the MCP server.
docs/research-analysis.md     Research behind this project.

The rule of thumb: anything that makes a decision lives in Core and has tests. The Windows-only layer only reads values from the screen, so as little as possible depends on having Windows to test it.

Tests and code quality

dotnet test WpfLocatorDoctor.slnx

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • MCP Registry io.github.swechhap/wpf-locator-doctor

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Frame 2085668439 (1)
Group 1261154229