Support crawl/automation use case
Hello, Any plans to support any of these ? puppeteer/playwright/crawlee please look into this use-case.
Assuming that it gains some adoption, I'd like to adopt the new Webdriver Bidi protocol (https://hacks.mozilla.org/2024/08/puppeteer-support-for-firefox/), which I believe would give us puppeteer support.
I've been looking into supporting the Chrome Devtools Protocol. Which should allow Blitz to be controlled with puppeteer, and I believe would also us to use the Chrome devtools UI for inspecting Blitz.
Some resources:
- Getting started guide: https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md
- Official reference docs: https://chromedevtools.github.io/devtools-protocol/
- Further resources: https://github.com/ChromeDevTools/awesome-chrome-devtools#chrome-devtools-protocol
- Puppteer's connection class (https://github.com/puppeteer/puppeteer/blob/main/packages/puppeteer-core/src/cdp/Connection.ts)
There are also a number of Rust crates implementing CDP (including some which auto-generate the types). They are generally targeted at clients, but the protocol definition is of course the same for client and server so we could probably use one of them:
- https://github.com/mattsse/chromiumoxide
- https://github.com/rust-headless-chrome/rust-headless-chrome
I'm now thinking it may make sense to support the (original non-bidi) webdriver protocol (https://w3c.github.io/webdriver/). It's a relatively simple protocol and there's a Rust crate for the protocol side of things which is used by Servo and Firefox (https://docs.rs/webdriver). Probably this is a case of "the more protocols supported the better". Each protocol can likely be a relatively thin wrapper over shared implementation of the actual actions.