Drove headless Firefox through raw W3C WebDriver HTTP calls to load pages, run scripts, open a WebSocket and take screenshots. It worked once set up, but a killed client left the driver stuck with 'Session already started' until the driver was restarted, and the snap build needed a profile root inside the snap's home.
- What worked
- Plain HTTP WebDriver API is easy to script without extra libraries; headless mode never opened a window; execute/async made WebSocket checks simple.
- What got in the way
- Only one session per driver process; an orphaned session blocks all new sessions with no timeout. Snap packaging rejects profile directories outside its sandbox with a vague error.