Saltar al contenido
Skillpedia
Pruebas280 mil · #435

windows-desktop-e2e

Qué hace

Esta herramienta te ayuda a probar programas hechos para Windows. Comprueba que los botones, cuadros de texto y otras partes del programa funcionen como se espera, usando una tecnología llamada UI Automation.

Cuándo usarla

  • ✓Cuando estás creando pruebas para un programa de Windows.
  • ✓Cuando tus pruebas automáticas de programas de Windows fallan.
  • ✓Cuando quieres que un programa de Windows sea más fácil de probar.

Link de la skill

https://github.com/affaan-m/ECC/blob/main/skills/windows-desktop-e2e/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/affaan-m/ECC/blob/main/skills/windows-desktop-e2e/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Cómo puedo probar si el botón de inicio de sesión de mi programa de Windows funciona?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta usa UI Automation, una función integrada de Windows, para encontrar e interactuar con los elementos visuales del programa. Permite que las pruebas hagan clic en botones y escriban texto, igual que lo haría una persona.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Windows Desktop E2E Testing

End-to-end testing for Windows native desktop applications using pywinauto backed by Windows UI Automation (UIA). Covers WPF, WinForms, Win32/MFC, and Qt (5.x / 6.x) — with Qt-specific guidance as a dedicated section.

When to Activate

  • Writing or running E2E tests for a Windows native desktop application
  • Setting up a desktop GUI test suite from scratch
  • Diagnosing flaky or failing desktop automation tests
  • Adding testability (AutomationId, accessible names) to an existing app
  • Integrating desktop E2E into a CI/CD pipeline (GitHub Actions windows-latest)

When NOT to Use

  • Web applications → use e2e-testing skill (Playwright)
  • Electron / CEF / WebView2 apps → the HTML layer needs browser automation, not UIA
  • Mobile apps → use platform-specific tools (UIAutomator, XCUITest)
  • Pure unit or integration tests that don't need a running GUI

Core Concepts

All Windows desktop automation relies on UI Automation (UIA), a Windows-built-in accessibility API. Every supported framework exposes a tree of UIA elements with properties Claude can read and act on:

Your test (Python)
    └── pywinauto (UIA backend)
        └── Windows UI Automation API   ← built into Windows, framework-agnostic
            └── App's UIA provider      ← each framework ships its own
                └── Running .exe

UIA quality by framework:

Framework AutomationId Reliability Notes
WPF 5/5 Excellent x:Name maps directly to AutomationId
WinForms 4/5 Good AccessibleName = AutomationId
UWP / WinUI 3 5/5 Excellent Full Microsoft support
Qt 6.x 5/5 Excellent Accessibility enabled by default; class names change to Qt6*
Qt 5.15+ 4/5 Good Improved Accessibility module
Qt 5.7–5.14 3/5 Fair Needs QT_ACCESSIBILITY=1; objectName manual
Win32 / MFC 3/5 Fair Control IDs accessible; text matching common

Setup & Prerequisites

# Python 3.8+, Windows only
pip install pywinauto pytest pytest-html Pillow pytest-timeout
# Optional: screen recording
# Install ffmpeg and add to PATH: https://ffmpeg.org/download.html

Verify UIA is reachable:

from pywinauto import Desktop
Desktop(backend="uia").windows()  # lists all top-level windows

Install Accessibility Insights for Windows (free, from Microsoft) — your DevTools equivalent for inspecting the UIA element tree before writing any test.

Testability Setup (by Framework)

The single most impactful thing you can do is give every interactive control a stable AutomationId before writing tests.

WPF

<!-- XAML: x:Name becomes AutomationId automatically -->
<TextBox x:Name="usernameInput" />
<PasswordBox x:Name="passwordInput" />
<Button x:Name="btnLogin" Content="Login" />
<TextBlock x:Name="lblError" />

WinForms

// Set in designer or code
usernameInput.AccessibleName = "usernameInput";
passwordInput.AccessibleName = "passwordInput";
btnLogin.AccessibleName = "btnLogin";
lblError.AccessibleName = "lblError";

Win32 / MFC

// Control resource IDs in .rc file are exposed as AutomationId strings
// IDC_EDIT_USERNAME -> AutomationId "1001"
// Prefer SetWindowText for Name; add IAccessible for richer support

Qt — see dedicated section below


Page Object Model

tests/
├── conftest.py          # app launch fixture, failure screenshot
├── pytest.ini
├── config.py
├── pages/
│   ├── __init__.py      # required for imports
│   ├── base_page.py     # locators, wait, screenshot helpers
│   ├── login_page.py
│   └── main_page.py
├── tests/
│   ├── __init__.py
│   ├── test_login.py
│   └── test_main_flow.py
└── artifacts/           # screenshots, videos, logs

base_page.py

import os, time
from pywinauto import Desktop
from config import ACTION_TIMEOUT, ARTIFACT_DIR

class BasePage:
    def __init__(self, window):
        self.window = window

    # --- Locators (priority order) ---

    def by_id(self, auto_id, **kw):
        """AutomationId — most stable. Use as first choice."""
        return self.window.child_window(auto_id=auto_id, **kw)

    def by_name(self, name, **kw):
        """Visible text / accessible name."""
        return self.window.child_window(title=name, **kw)

    def by_class(self, cls, index=0, **kw):
        """Control class + index — fragile, avoid if possible."""

…
Preguntas frecuentes

¿Puedo usarla para probar sitios web?

No, esta herramienta es solo para programas instalados en Windows. Para sitios web, usa herramientas de pruebas de navegador.

¿Necesito ser programador experimentado para usarla?

No, la herramienta está pensada para ser sencilla. Ayuda a automatizar tareas de pruebas que antes requerían conocimientos técnicos profundos.

¿Qué es 'UI Automation'?

Es una tecnología de Windows que permite a los programas (y a las herramientas de pruebas) entender e interactuar con los elementos visuales de otros programas, como botones y cuadros de texto.

Detalles

Descripción original del autor

E2E testing for Windows native desktop apps (WPF, WinForms, Win32/MFC, Qt) using pywinauto and Windows UI Automation. Use when writing E2E tests for a Windows native desktop app with pywinauto or UI Automation.

repo: affaan-m/ECC

Popularidad

Estrellas en GitHub
280 mil
Posición en el ranking
#435
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas