flutter-windows-ui-testing
Installation
SKILL.md
Flutter Windows Desktop UI Testing via Win32 API
Overview
Flutter desktop apps on Windows render everything inside a single FLUTTERVIEW pane — the Windows UI Automation accessibility tree only exposes this single element. Therefore, coordinate-based automation via user32.dll is the practical approach.
Architecture
PowerShell Script
├── Add-Type (C# interop for user32.dll)
├── Process → MainWindowHandle (HWND)
├── Focus: AttachThreadInput + BringWindowToTop + SetForegroundWindow
├── Coordinates: GetClientRect + ClientToScreen (excludes title bar)
├── Click: SetCursorPos + mouse_event
├── Key: keybd_event
└── Screenshot: System.Drawing.Graphics.CopyFromScreen