4 ms·
You can run puppeteer with any chromium binary, including non-headless mode. You can also just start chromium with debugging active `--remote-debugging-port=92
by phiresky 8y ago
You can run puppeteer with any chromium binary, including non-headless mode.
You can also just start chromium with debugging active `--remote-debugging-port=9222` and then connect to that port and send any dev console commands.
- TicklishTiger 8y agoHow do you send dev console commands to that port?
- phiresky 8y agoIt uses the devtools protocol, see here https://chromedevtools.github.io/devtools-protocol/ https://chromedevtools.github.io/devtools-protocol/ Looks like it's a REST protocol. You have to connect to a tab and then call e.g. Runtime.evaluate {expression: "console.log('test')"}
- phiresky 8y agoAlso, you can apparently connect the puppeteer client to a running chrome instance [1]. That way you can use the nice and statically typed puppeteer api and you should have pretty much zero overhead. [1] https://github.com/GoogleChrome/puppeteer/issues/238 https://github.com/GoogleChrome/puppeteer/issues/238