Automate a Windows-only LOB app that has no API
When to use: Internal app vendor won't expose an API; you need Claude to enter daily data.
Prerequisites
- Windows 10/11 with the target app installed — Standard install
- Python 3.10+ for uvx — winget install Python.Python.3.12
Flow
-
Inspect the UI treeLaunch the app
BookingSystem.exe, then dump the UI tree of the main window. I want to see automation IDs.✓ Copied→ Tree shows controls with AutomationId — not just nameless buttons -
Drive a happy path onceNow: open the New Booking dialog, fill customer 'Acme Inc', date 2026-05-12, save. Take a screenshot at the end.✓ Copied→ Booking saved; screenshot confirms
-
Generalize and loopRead /work/bookings.csv. For each row, repeat the booking flow. Save screenshots into /work/runs/.✓ Copied→ Each row processed; screenshots per booking
Outcome: Headless automation of a vendor app, replayable from a CSV.
Pitfalls
- App uses custom controls (e.g. WinForms ListView with no AutomationId) — Fall back to coordinate clicks on a fixed window position; document the brittleness
- Modal dialog steals focus mid-loop — Always check active window before send_keys; abort if unexpected