> I've had mixed success trying to [open "|chrome --headless"] -- I'm missing the ability to wait for a page to finish loading.
What is your expectation exactly? Just by starting chrome in --headless mode, there is no instrumentation triggered unless you use the predefined CLI flags (PDF printing, making screenshots etc.) page loading?
IIRC, one would have to start one chrome instance in debugging mode (w/ or w/o --headless) listening on a given or chosen TCP port (as the DevTools protocol server):
--remote-debugging-port=9222 O
One then has to write a (minimal) DevTools protocol client communicating via ws + JSON with the server.
Alternatively, have a look at:
https://sourceforge.net/projects/selenium-tcl/
Cheers, Stefan