Screenshot Capture Testing

Cross-platform desktop and application screenshot capture for visual testing, UI verification, and automated visual comparison across macOS, Linux, and Windows.

97 stars

Best use case

Screenshot Capture Testing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Cross-platform desktop and application screenshot capture for visual testing, UI verification, and automated visual comparison across macOS, Linux, and Windows.

Teams using Screenshot Capture Testing should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/screenshot-capture/SKILL.md --create-dirs "https://raw.githubusercontent.com/PramodDutta/qaskills/main/seed-skills/screenshot-capture/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/screenshot-capture/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Screenshot Capture Testing Compares

Feature / AgentScreenshot Capture TestingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Cross-platform desktop and application screenshot capture for visual testing, UI verification, and automated visual comparison across macOS, Linux, and Windows.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Screenshot Capture Testing

Cross-platform screenshot capture for visual testing, UI verification, and automated comparison. Supports full screen, specific app/window, and pixel region captures.

## Tool Priority

- Prefer tool-specific screenshot capabilities when available (Playwright for browsers, Figma MCP for designs)
- Use this skill for whole-system desktop captures or when tool-specific capture cannot get what you need
- Default for desktop apps without a better-integrated capture tool

## macOS Capture

### Full screen

```bash
screencapture -x output/screen.png
```

### Pixel region (x,y,w,h)

```bash
screencapture -x -R100,200,800,600 output/region.png
```

### Specific window by ID

```bash
screencapture -x -l12345 output/window.png
```

### Interactive selection

```bash
screencapture -x -i output/interactive.png
```

## Linux Capture

### Using scrot

```bash
# Full screen
scrot output/screen.png

# Pixel region
scrot -a 100,200,800,600 output/region.png

# Active window
scrot -u output/window.png
```

### Using gnome-screenshot

```bash
gnome-screenshot -f output/screen.png
gnome-screenshot -w -f output/window.png
```

### Using ImageMagick

```bash
import -window root output/screen.png
import -window root -crop 800x600+100+200 output/region.png
```

## Windows Capture (PowerShell)

```powershell
# Full screen
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1

# Pixel region
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1 -Region 100,200,800,600

# Active window
powershell -ExecutionPolicy Bypass -File take_screenshot.ps1 -ActiveWindow
```

## Visual Testing Workflow

1. **Capture baseline** — Take reference screenshots of correct UI state
2. **Capture current** — Take screenshots of current UI state after changes
3. **Compare** — Diff the screenshots to detect visual regressions
4. **Report** — Generate visual diff reports with highlighted changes

## Multi-Display Behavior

- **macOS:** Full-screen captures save one file per display with multiple monitors
- **Linux/Windows:** Full-screen captures use virtual desktop (all monitors in one image)
- Use `--region` to isolate a single display when needed

## Error Handling

- On macOS, check Screen Recording permission before window/app capture
- On Linux, verify tool availability: `command -v scrot`, `command -v gnome-screenshot`
- If saving fails with permission errors, check directory permissions
- Always report the saved file path in the response

## Best Practices

- Use consistent viewport sizes for comparable screenshots
- Mask dynamic content (timestamps, animations) before comparison
- Set appropriate diff thresholds for anti-aliasing tolerance
- Store baseline screenshots in version control
- Run visual tests in consistent environments (same OS, resolution, DPI)

Related Skills

Zod Schema Testing

97
from PramodDutta/qaskills

Comprehensive testing patterns for Zod schemas covering validation testing, transform testing, error message verification, and integration with API endpoints and forms

YARA Rule Testing

97
from PramodDutta/qaskills

Writing and testing YARA rules for malware detection, threat hunting, and file classification with rule validation and false-positive rate testing.

xUnit.net Testing

97
from PramodDutta/qaskills

Comprehensive xUnit.net testing skill for writing reliable unit, integration, and acceptance tests in C# with [Fact], [Theory], fixtures, dependency injection, and parallel execution strategies.

XSS Testing Patterns

97
from PramodDutta/qaskills

Cross-site scripting vulnerability testing covering reflected, stored, and DOM-based XSS with sanitization validation and CSP bypass detection.

XCUITest iOS Testing

97
from PramodDutta/qaskills

iOS UI testing with XCUITest framework covering element queries, gesture simulation, accessibility testing, and Xcode test plan configuration.

Advanced WebSocket Testing

97
from PramodDutta/qaskills

WebSocket testing including connection lifecycle, reconnection logic, message ordering, backpressure handling, and binary frame testing.

Webhook Testing

97
from PramodDutta/qaskills

Testing webhook implementations including delivery verification, retry logic, signature validation, idempotency, and failure handling patterns.

Core Web Vitals Testing

97
from PramodDutta/qaskills

Testing and monitoring Core Web Vitals (LCP, FID, CLS, INP, TTFB) to ensure web performance meets Google search ranking thresholds.

WCAG Accessibility Testing

97
from PramodDutta/qaskills

Automated WCAG 2.2 AA/AAA compliance testing with axe-core, Pa11y, and manual testing patterns for keyboard navigation, screen readers, and color contrast.

WebAssembly Testing

97
from PramodDutta/qaskills

Testing WebAssembly modules including compilation verification, memory management, interop testing, and performance benchmarking of WASM components.

Vue Test Utils Testing

97
from PramodDutta/qaskills

Vue.js component testing using Vue Test Utils with mount/shallow mount, event simulation, Vuex/Pinia store testing, and composition API testing.

Voice Assistant Testing

97
from PramodDutta/qaskills

Testing voice-activated applications including speech recognition accuracy, intent detection, dialog flow testing, and multi-language support.