I want to use my browser as normal (headed), but also be able to interchangeably run small scripts (clj fns) from the repl or bb, to be able to use small in-context automations spontaneously.
Quite a while back I tried launching Etaoin with my personal chrome profile, and It seemed to work, but then my profile got corrupted. I asked about it here, but respondants weren’t sure why. I gave up pending more research.
Today I had a session with chatgpt to try understand the options (like do I need a different library like https://github.com/tatut/clj-chrome-devtools ?)
Here are my new understandings:
Chrome devtools protocol (CDP) allows this (headed) mixed use mode.
Etaoin uses CDP for Chrome.
Etaoin can start a Chrome session with my profile. But if the process crashes or quits, my profile can be corrupted.
Better to start Chrome session manually (from the command line), with my profile and remote-debugging on.
Then can connect Etaoin to that with (e/connect {:chrome {:host "localhost" :port xxxx}})
Then can switch between automation and manual control seamlessly.
And if the repl process quits, browser will stay open and profile will not be corrupted.
Basically the same holds true for Playwright (Wally lib), which also uses CDP..
I haven’t fully tested this yet, but it was encouraging info, and I’m posting to see if that matches other’s experience and expectations. And if that’s accurate, maybe add a note in documentation?
Sorry, I did not notice your message @chromalchemy. I don't trust AIs to give me good answers, but sometimes they make good guesses. I don't have experience here one way or the other. Have you found something that works reliably for you?