This skill should be used when the user asks to "test UI with screenshots", "screenshot testing", "visual testing", "compare UI screenshots", "verify UI layout", "take screenshot for testing", or...
A guide for conducting effective UI testing using screenshots. This skill covers the screenshot-mcp tools, testing workflows, and comparison strategies for native application testing.
Check for plugin settings at .claude/screenshot.local.md before taking screenshots.
Settings file format:
---
default_save_dir: /path/to/screenshots
---
When settings file exists:
default_save_dirsave_dir when user wants to save screenshotsWhen settings file does not exist:
The screenshot MCP server provides 5 tools:
| Tool | Purpose | Key Parameters |
|---|---|---|
list_windows |
Discover all visible windows | None |
list_displays |
List all monitors/displays | None |
screenshot_window |
Capture specific window | window_id or window_title, save_dir |
screenshot_screen |
Capture entire display | display_id, save_dir |
screenshot_region |
Capture screen region | x, y, width, height, save_dir |
Before capturing, identify the correct window:
1. Call list_windows to get all visible windows
2. Find target by app name or title
3. Note the window ID for screenshot_window
Window matching strategies:
app field (e.g., "Electron", "Simulator")window_title parameter for fuzzy matchingbounds to identify window by size/positionChoose the appropriate capture method:
screenshot_window with window ID or titlescreenshot_screen for entire displayscreenshot_region for precise coordinatesAfter capturing, analyze the screenshot for:
For detecting UI changes between versions:
save_dir parameter{save_dir}/YYYY-MM-DD/YYYYMMDD_HHMMSS.pngWhen comparing screenshots:
Report findings with specific observations about what changed.
For applications spanning multiple monitors:
list_displays to see all available displaysscreenshot_screen with specific display_id| Platform | Status | Notes |
|---|---|---|
| macOS | Supported | Requires Screen Recording permission |
| Windows | Planned | Future release |
| Linux | Planned | Future release |
On macOS, grant Screen Recording permission in System Settings > Privacy & Security > Screen Recording.
list_windows before screenshot_window to get fresh window IDswindow_title for more stable identificationsave_dir parameter for regression testingFor practical testing examples, see:
examples/electron-app-testing.md - Testing an Electron application login flowFor detailed patterns:
references/testing-patterns.md - Common UI testing patterns and strategies