一键导入
uno-testing-ui
Automates UI testing for Uno Platform applications using the Uno App MCP server tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Automates UI testing for Uno Platform applications using the Uno App MCP server tools.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Create and use commands in MVUX for user interactions.
Create and use IFeed<T> for async data in MVUX.
Display async feed data with FeedView control.
Create and use IListFeed<T> for reactive collections in MVUX.
Create and use IListState<T> for mutable reactive collections in MVUX.
Use messaging to sync MVUX states with entity changes.
基于 SOC 职业分类
| name | uno-testing-ui |
| description | Automates UI testing for Uno Platform applications using the Uno App MCP server tools. |
| when_to_use | Use this skill when performing automated UI testing, visual validation, interaction testing, or end-to-end testing of Uno Platform cross-platform applications. Covers app lifecycle management, visual tree inspection, element interaction, screenshot capture, and test assertions. |
| compatibility | Requires the Uno App MCP server to be configured and available. Works with Uno Platform applications targeting desktop (Windows, macOS, Linux), WebAssembly, iOS, and Android. |
| metadata | {"author":"uno-platform","version":"1.3","category":"testing"} |
Prerequisite: This skill requires the Uno App MCP (the
uno_app_*tools), provided by the Uno tooling. It is a separate server from the documentation MCP used by other skills. Before proceeding, confirm theuno_app_*tools are available; if they are not, stop and tell the user to enable the Uno tooling rather than attempting to test without them.
This skill enables automated UI testing of Uno Platform applications using the Uno App MCP server tools. It provides comprehensive guidance for launching apps, inspecting UI elements, simulating user interactions, and validating visual output.
The Uno App MCP server exposes a set of tools that allow agents to:
net9.0-desktop, net9.0-browserwasm)For most UI testing scenarios, follow this workflow:
uno_app_startuno_app_get_runtime_infouno_app_get_screenshotuno_app_visualtree_snapshotuno_app_element_peer_default_action or input toolsuno_app_close| Tool | Description |
|---|---|
uno_app_start | Starts the application in debug mode with Hot Reload |
uno_app_get_runtime_info | Gets runtime info (PID, window title, platform, uptime) |
uno_app_close | Terminates the running application (desktop only) |
| Tool | Description |
|---|---|
uno_app_get_screenshot | Captures a screenshot for visual validation |
uno_app_visualtree_snapshot | Gets XML visual tree snapshot with element handles |
uno_app_get_element_datacontext | Gets the DataContext of a specific element |
| Tool | Description |
|---|---|
uno_app_element_peer_default_action | Invokes the default automation action on an element |
uno_app_element_peer_action | Invokes a specific automation peer action |
uno_app_pointer_click | Performs pointer click at coordinates |
uno_app_key_press | Presses a keyboard key |
uno_app_type_text | Types text using keyboard simulation |
| Tool | Description |
|---|---|
uno_app_get_memory_counters | Gets memory diagnostics for the running app |
Use uno_app_start to launch the application:
Tool: uno_app_start
Parameters:
- projectPath: Full path to the .csproj file (must be within MCP working directory)
- targetFramework: Target framework moniker (e.g., "net9.0-desktop", "net9.0-browserwasm")
- args: Optional command-line arguments (array)
Example scenarios:
targetFramework = "net9.0-desktop"targetFramework = "net9.0-browserwasm"Important: Always verify the app started successfully by calling uno_app_get_runtime_info afterward.
Use uno_app_visualtree_snapshot to get an XML representation of the UI:
Tool: uno_app_visualtree_snapshot
Parameters:
- justMyCode: Filter to user-defined elements only (default: true)
- includeBounds: Include element bounds for coordinate-based interaction (default: false)
- includeHidden: Include hidden/collapsed elements (default: false)
The returned XML contains element handles (refs) that can be used with interaction tools. Each element includes:
Tip: Set justMyCode: true to reduce noise from framework elements and focus on application UI.
Preferred approach: Use automation peers when element handles are available.
Default Action (most common):
Tool: uno_app_element_peer_default_action
Parameters:
- elementRef: Handle from visual tree snapshot
This invokes the natural action (click for buttons, toggle for checkboxes, etc.)
Specific Action (for advanced scenarios):
Tool: uno_app_element_peer_action
Parameters:
- elementRef: Handle from visual tree snapshot
- action: Specific automation action name
- actionParameters: Optional parameters array
Fallback approach: Use coordinate-based input when handles aren't suitable.
Pointer Click:
Tool: uno_app_pointer_click
Parameters:
- x: Absolute physical X coordinate
- y: Absolute physical Y coordinate
- button: "left", "middle", or "right"
- clickCount: Number of clicks (default: 1)
- delayBetweenPresseAndReleaseInMs: Delay in milliseconds (default: 10)
Keyboard Input:
Tool: uno_app_key_press
Parameters:
- virtualKey: VirtualKey name (e.g., "Enter", "Tab", "A")
- virtualKeyModifiers: Optional modifiers ("control", "shift", "menu", "windows")
- unicodeKey: Optional explicit unicode character
Text Entry:
Tool: uno_app_type_text
Parameters:
- text: String of text to type
- intervalInMs: Delay between key presses
Use uno_app_get_screenshot for visual validation:
Tool: uno_app_get_screenshot
Parameters:
- fileType: "png" or "jpeg"
- quality: Image quality 1-100 (default: 75)
- path: Optional file path to save the screenshot
Screenshots are essential for:
Use uno_app_get_element_datacontext to inspect bound data:
Tool: uno_app_get_element_datacontext
Parameters:
- elementRef: Handle from visual tree snapshot
Returns an XML representation of the element's DataContext, useful for verifying:
uno_app_element_peer_default_action with its handleuno_app_element_peer_default_action to focusuno_app_type_text to enter datauno_app_get_screenshotjustMyCode: true to filter framework elementsx:Name or AutomationProperties.AutomationIduno_app_get_runtime_info before testinguno_app_get_element_datacontext for data validationuno_app_close at the end of tests (desktop)uno_app_start to launch the appincludeHidden: true)For detailed implementation patterns, see: