Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



How do you send dev console commands to that port?


It uses the devtools protocol, see here 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')"}


Also, 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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: