My company has released a Trio library for the Chrome DevTools Protocol (CDP). For you web devs out there, CDP is the protocol that Chrome’s web inspector speaks to introspect the browser. If you start Chrome with the argument
--remote-debugging-port=9000, it will open up a WebSocket server that you can connect to and speak the same protocol.
The protocol can be used for integration testing, performance testing, etc. It is similar to Selenium, but it has low overhead and allows a very deep control of the browser (at the expense of not being cross-browser compatible).
The base library is called PyCDP and contains Python wrappers around CDP’s data types. It doesn’t do any I/O.
The Trio CDP library is a thin wrapper that opens a websocket, multiplexes messages on that socket, and delegates the rest of the protocol to PyCDP.