Creator · microsoft
Last updated · Sep 3, 2026
Automated UI testing for Windows desktop apps — generate a batch test script with the `winapp ui` UI Automation harness, run all tests in one pass, read results. Covers element assertions, interactions, value checking (TextBox, ComboBox, ToggleSwitch), keyboard shortcuts and typi
Sandbox only
Install targets
Codex install prompt
Install the "winui-ui-testing" agent skill from https://github.com/microsoft/win-dev-skills/tree/main/plugins/winui/agent-plugin/skills/winui-ui-testing. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Automated UI testing for Windows desktop apps — generate a batch test script with the `winapp ui` UI Automation harness, run all tests in one pass, read results. Covers element assertions, interactions, value checking (TextBox, ComboBox, ToggleSwitch), keyboard shortcuts and typing (send-keys), hover, drag-and-drop, touch and pen input, file pickers, flyouts, dialogs, persistence, accessibility audits, and screenshot/video capture. Works on any Windows app (Win32, WPF, WinForms, WinUI 3, packaged or unpackaged). After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"microsoft-winui-ui-testing","task":"Install winui-ui-testing","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
GitHub automation
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add microsoft/win-dev-skills --skill winui-ui-testing
Maintenance
fresh
6d since push
Risk
Needs review
Permission surface may require sandboxing
GitHub quality
407
73/100 Quality · 76/100 Trust
Coverage tags
Review notes
Permission surface may require sandboxing · Quality score needs review
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
407 GitHub stars
Repo activity
407 stars, 31 forks
Maintenance
6d since push
License
MIT
Install
npx skills add microsoft/win-dev-skills --skill winui-ui-testing
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add microsoft/win-dev-skills --skill winui-ui-testingDo not use when
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20winui-ui-testing%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20winui-ui-testing%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/microsoft-winui-ui-testing/install
Agent should check
Copy prompt
Task: Use winui-ui-testing in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20winui-ui-testing%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/microsoft-winui-ui-testing/install
Install command: npx skills add microsoft/win-dev-skills --skill winui-ui-testing
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/microsoft-winui-ui-testing/install
LLM text format
/api/skills/microsoft-winui-ui-testing/install?format=text
Find alternatives
/api/skills/search?q=winui-ui-testing&limit=3
Agent prompt
Use winui-ui-testing for this task. Review https://www.openagentskill.com/api/skills/microsoft-winui-ui-testing/install, then install with: npx skills add microsoft/win-dev-skills --skill winui-ui-testingRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/microsoft-winui-ui-testing
LLM text
/api/registry/manifest/microsoft-winui-ui-testing?format=text
Install alias
/api/registry/install/microsoft-winui-ui-testing
Recommend
/api/registry/recommend?task=Use%20winui-ui-testing%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Shortlist this skill and compare it with close alternatives before production adoption.
Role in stack
Companion skill
Primary fit
Local desktop
Trust label
Strong shortlist
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO407 GitHub stars
Stars/forks activity
CHECK407 stars, 31 forks; issue activity unavailable in current metadata
Recent maintenance
PASS6d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Manage repositories
I need my agent to triage GitHub issues, review pull requests, and summarize repository changes.
Workflow fit
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.
🕵️♂️ Collect a dossier on a person by username from 3000+ sites
Nuclei is a fast, customizable vulnerability scanner powered by the global security community and built on a simple YAML-based DSL, enabling collaboration to tackle trending vulnerabilities on the internet. It helps you find vulnerabilities in your applications, APIs, networks, DNS, and cloud configurations.
Infisical is the open-source platform for secrets, certificates, and privileged access management.
--- name: winui-ui-testing description: "Automated UI testing for Windows desktop apps — generate a batch test script with the `winapp ui` UI Automation harness, run all tests in one pass, read results. Covers element assertions, interactions, value checking (TextBox, ComboBox, ToggleSwitch), keyboard shortcuts and typing (send-keys), hover, drag-and-drop, touch and pen input, file pickers, flyouts, dialogs, persistence, accessibility audits, and screenshot/video capture. Works on any Windows app (Win32, WPF, WinForms, WinUI 3, packaged or unpackaged)." ---
### Scope — any Windows app
`winapp ui` drives Windows **UI Automation (UIA)**, the accessibility layer every Windows UI framework exposes, so the AutomationId-based approach in this skill works on **any** Windows desktop app: Win32, WPF, WinForms, and WinUI 3, packaged or unpackaged. The file-picker tests below already drive the OS's Win32 file dialog through the same verbs. For a non-WinUI app, use the same verbs and script template and skip the WinUI-specific gotchas (x:Bind `LostFocus` commit, ContentDialog selectors, MSIX relaunch).
### Approach
The goal of this skill is to validate UI and app functionality automatically, without manual interaction, by exercising the app's UI elements, verifying their state, and asserting that the app behaves as expected under test conditions.
There are two main approaches: 1. Interactive exploration — manually run the app, use `winapp ui <command>` to explore the UI tree, find AutomationIds, verify element properties, and test functionality interactively. This is useful for discovery, but slow and expensive if repeated for every test iteration. 2. Scripted batch testing — generate a `ui-tests.ps1` script that exercises all UI elements and asserts expected behavior in one pass. This allows you to run the tests automatically, capture results, and iterate quickly without manually interacting with the app each time.
Unless the user asked for interactive exploration, or you are unfamiliar with the code/app or need to explore the UI tree to discover AutomationIds for hidden or dynamically generated elements (flyouts, dialogs, lazy-loaded content), **prefer scripted batch testing** — it is faster, repeatable, and produces a record of pass/fail results that can be reviewed and acted on.
### `winapp ui` Verbs
- **Query:** `status`, `list-windows`, `inspect`, `search`, `get-property`, `get-value`, `get-focused`, `wait-for` - **Interact:** `invoke`, `click`, `set-value`, `focus`, `scroll`, `scroll-into-view` - **Advanced input:** `send-keys` (synthetic keyboard + accelerators), `hover` (tooltips/flyouts), `drag` (drag-drop, reorder, sliders), `touch` (tap/swipe/pinch/stretch), `pen` (stylus ink, pressure/tilt/eraser) - **Capture:** `screenshot`, `record` (H.264 MP4 video)
Run `winapp ui --cli-schema` for the complete command structure as JSON, or `winapp ui <verb> --help` for any single verb.
### Step 1: Use the Running App
If the app is already running, use its PID. **Do NOT relaunch** — use the PID already captured from the build step. If the app is not running, build and launch it using the guidance in the winui-dev-workflow skill.
### Step 2: Write the Test Script
**If you wrote the code:** Skip inspect — you already know all the AutomationIds and control structure from the XAML and code-behind. Write tests directly from that knowledge. Inspect misses popups, flyouts, dialogs, and lazy-loaded content anyway.
**If you're verifying code you didn't write:** Run inspect first to discover the UI: ```powershell winapp ui inspect -a <PID> --interactive ``` Then read the XAML files to find AutomationIds that aren't currently visible (flyout items, dialog buttons, secondary pages).
Create a `ui-tests.ps1` file that tests all the app's requirements in one pass:
```powershell # ui-tests.ps1 param([Parameter(Mandatory)][int]$AppPid) # NOTE: Do NOT name the parameter $Pid — it's read-only in PowerShell
$ErrorActionPreference = 'Continue' $pass = 0; $fail = 0; $results = @()
# Get main window HWND (avoids PopupHost interference with JSON parsing) $windows = winapp ui list-windows -a $AppPid --json 2>$null | ConvertFrom-Json $hwnd = ($windows | Where-Object { $_.title -ne "PopupHost" } | Select-Object -First 1).hwnd
function Test-UI { param([string]$Name, [scriptblock]$Script) # IMPORTANT: Inside $Script, use 'throw' to signal failure — NOT 'exit 1' # (exit terminates the entire script, not just the test) try { $output = & $Script 2>&1 if ($LASTEXITCODE -eq 0) { $script:pass++; $script:results += @{ name = $Name; status = "PASS" } } else { $script:fail++; $script:results += @{ name = $Name; status = "FAIL"; detail = "$output" } } } catch { $script:fail++; $script:results += @{ name = $Name; status = "FAIL"; detail = "$_" } } }
# ─── Element Existence ─── Test-UI "NavHome exists" { winapp ui wait-for "NavHome" -a $AppPid -t 3000 } Test-UI "NavSettings exists" { winapp ui wait-for "NavSettings" -a $AppPid -t 3000 }
# ─── Navigation ─── Test-UI "Navigate to Settings" { winapp ui invoke "NavSettings" -a $AppPid } Test-UI "Settings page loaded" { winapp ui wait-for "TxtUserName" -a $AppPid -t 3000 }
# ─── Interactions ─── Test-UI "Set username" { winapp ui set-value "TxtUserName" "TestUser" -a $AppPid } Test-UI "Click Save" { winapp ui invoke "BtnSave" -a $AppPid } # commits the TextBox binding Test-UI "Username value set" { winapp ui wait-for "TxtUserName" -a $AppPid --value "TestUser" -t 2000 }
# ─── Value assertions for different control types ─── Test-UI "Theme is System default" { winapp ui wait-for "CmbTheme" -a $AppPid --value "System default" -t 2000 } Test-UI "Logging is off" { winapp ui wait-for "TglLogging" -a $AppPid --value "Off" -t 2000 }
# ─── Accessibility Audit ─── # Only audit controls in the app's main window (exclude OS picker/popup controls) $allElements = (winapp ui inspect -a $AppPid --interactive --json 2>$null | ConvertFrom-Json).elements $appElements = @($allElements | Where-Object { $_.type -match 'Button|TextBox|ComboBox|CheckBox|ToggleSwitch|TabItem|Edit' -and $_.name -notmatch 'Minimize|Maximize|Close|System' -and # window chrome $_.className -notmatch 'PickerHost|#32770|CabinetWClass' # OS dialogs }) $missingId = @($appElements | Where-Object { -not $_.automationId }) if ($missingId.Count -eq 0) { $pass++; $results += @{ name = "All app controls have AutomationId"; status = "PASS" } } else { $fail++ $names = ($missingId | ForEach-Object { "$($_.type) '$($_.name)'" }) -join ", " $results += @{ name = "AutomationId coverage"; status = "FAIL"; detail = "Missing: $names" } }
# ─── State Screenshots (capture each meaningful state for visual review) ─── New-Item -ItemType Directory -Force -Path "screenshots" | Out-Null winapp ui screenshot -a $AppPid -o "screenshots/01-initial.png" 2>$null # ...take more screenshots after key interactions above (mode switches, dialogs opened, etc.)
# ─── Final Screenshot ─── winapp ui screenshot -a $AppPid -o "test-screenshot.png" 2>$null
# ─── Results ─── Write-Host "`nPassed: $pass | Failed: $fail" $results | Where-Object { $_.status -eq "FAIL" } | ForEach-Object { Write-Host " FAIL: $($_.name) — $($_.detail)" -ForegroundColor Red } $results | ConvertTo-Json | Out-File "test-results.json" if ($fail -gt 0) { exit 1 } else { exit 0 } ```
### What to Test
Write tests for **every requirement** from the user's prompt:
| Requirement type | Test approach | |---|---| | "Has a button that does X" | `search` to verify exists, `invoke` to click, `wait-for --value` to check result | | "Text field shows value" | `wait-for "TxtName" --value "expected"` — works for TextBox, TextBlock, labels | | "Status bar contains text" | `wait-for "StatusBar" --value "words" --contains` — substring match for dynamic content | | "Dropdown is set to X" | `wait-for "CmbTheme" --value "Dark"` — reads the selected item automatically | | "Toggle is on/off" | `wait-for "TglFeature" --value "On"` — reads the toggle state | | "Navigation between pages" | `invoke` nav item, `wait-for` a page-specific element to appear | | "Open file dialog" | `invoke` trigger, `list-windows` to find picker HWND, interact with `-w` | | "Save file dialog" | Same as open — find picker with `list-windows`, `set-value` filename, `invoke` Save | | "Right-click context menu" | `click --right` on element, `invoke` the flyout MenuItem | | "Keyboard shortcut (Ctrl+S, etc.)" | `send-keys "ctrl+s" --via send-input` then `wait-for` the result | | "Type into a TextBox/RichEditBox" | `send-keys "text" --target "Id" --via send-input` (real per-key input) | | "Tooltip / hover flyout appears" | `hover` the element, then `wait-for` the tooltip/flyout | | "Drag to reorder / resize / slider" | `drag <from> <to>` then `wait-for --value` the new state | | "Touch gesture (swipe/pinch/stretch)" | `touch -g swipe/pinch/stretch` then assert the result | | "Capture a repro clip of a flow" | `record -a PID --duration-sec N -o clip.mp4` | | "Confirmation dialog" | `invoke` trigger, `search` for dialog buttons, `invoke` Primary/Secondary/Close | | "Data persists" | Set values, `invoke` a button (to commit bindings), verify data file on disk (`Get-Content` + `ConvertFrom-Json`) | | "All controls accessible" | `inspect --interactive --json` + check all have AutomationId |
### Step 3: Run and Read Results
```powershell .\ui-tests.ps1 -AppPid <PID> ```
Read `test-results.json` for structured pass/fail. Only fix code if tests fail.
### Step 3.5: Look at the Screenshots
UIA assertions don't see clipping, overlap, wrong theming, or controls bleeding past their container — UIA returns `PASS` while the app is visually broken. **Capture screenshots with `winapp ui screenshot` and view each PNG.**
Capture the initial state and any state after a major interaction (the State Screenshots block in the script template above handles this).
**Visual checklist — fail the run if any item is `no`:** - [ ] No unintended scrollbars - [ ] No text ending in `…` that shouldn't be - [ ] Hero elements fully visible (not sliced) - [ ] Right-edge controls fully visible - [ ] No overlapping rows - [ ] Content uses the available width — no asymmetric dead zones (e.g. content pinned to one edge leaving empty space on the other) - [ ] Spacing intentional — not cramped, not unintentionally vast - [ ] Theming matches the user's ask (Light/Dark/HighContrast if relevant) - [ ] Focus/hover/error states render if tested
If the checklist fails, it's a bug — fix before declaring done. Window too small → grow per `winui-design` Step 4.
### Step 4: Fix and Rerun (if the user asked for it)
If tests fail: 1. Read the failure details from `test-results.json` 2. Batch-fix all issues in one pass 3. Rebuild with `.\BuildAndRun.ps1` (blocking mode — shows crash info if the fix broke something) 4. Rerun `.\ui-tests.ps1 -AppPid <PID>` (parse PID from the `launched (PID: XXXXX)` output)
**Maximum 2 fix-and-rerun cycles.** If the same tests keep failing after 2 cycles, report them as known issues and move on — do not keep iterating.
### Assertion Reference
Use `wait-for --value` as the primary assertion — it uses a smart fallback chain that reads the right value for any control type:
| Control type | `--value` reads from | Example | |---|---|---| | TextBlock / Label | Name property | `wait-for "LblTitle" --value "Home"` | | TextBox / NumberBox | ValuePattern | `wait-for "TxtName" --value "John"` | | RichEditBox | TextPattern | `wait-for "Editor" --value "Hello"` | | ComboBox | Selected item (SelectionPattern) | `wait-for "CmbTheme" --value "Dark"` | | ToggleSwitch | Toggle state (On/Off) | `wait-for "TglDark" --value "On"` | | CheckBox | Toggle state (On/Off) | `wait-for "ChkAgree" --value "On"` |
**Full assertion commands:**
| Assertion | Command | |---|---| | Element exists | `winapp ui w
Source provenance
Decision snapshot
recent repository activity
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for winui-ui-testing, ready for a manual X post.
winui-ui-testing: Automated UI testing for Windows desktop apps — generate a batch test script with the `winapp... 407 stars https://www.openagentskill.com/skills/microsoft-winui-ui-testing?ref=x
Listing + install path for winui-ui-testing: https://www.openagentskill.com/skills/microsoft-winui-ui-testing?ref=x Install: npx skills add microsoft/win-dev-skills --skill winui-ui-testing
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to microsoft but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/microsoft-winui-ui-testing?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/microsoft-winui-ui-testing?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/microsoft-winui-ui-testing/audit)
[](https://www.openagentskill.com/skills/microsoft-winui-ui-testing?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)microsoft
@microsoft
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Wazuh
Wazuh - The Open Source Security Platform. Unified XDR and SIEM protection for endpoints and cloud workloads.
16.3K StarsMaigret
🕵️♂️ Collect a dossier on a person by username from 3000+ sites
32.9K StarsNuclei
Nuclei is a fast, customizable vulnerability scanner powered by the global security community and built on a simple YAML-based DSL, enabling collaboration to tackle trending vulnerabilities on the internet. It helps you find vulnerabilities in your applications, APIs, networks, DNS, and cloud configurations.
29.2K StarsInfisical
Infisical is the open-source platform for secrets, certificates, and privileged access management.
27.4K StarsPermission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness