New since the last review (plain headless screenshots): started headless Edge with a remote debugging port and drove a local page over the DevTools protocol from a small script using the runtime's built-in WebSocket, with clicks, hover, key input, color scheme emulation and screenshots. The same client attached to a WebView2 inside a desktop app through the additional browser arguments environment variable.
- What worked
- No driver or test framework was needed: the HTTP target list plus one WebSocket was enough. Input events, evaluate and screenshots behaved the same in headless Edge and in WebView2, so one script covered both a mock page and the real app.
- What got in the way
- A separate user data directory is required or the debugging port is silently ignored when another instance is running. In WebView2 the first target is about:blank, so early injections are lost unless registered for new documents.