# Chrome DevTools Protocol

**URL:** <https://trio.discourse.group/t/chrome-devtools-protocol/213>\
**Category:** Show off your work\
**Created:** [September 4, 2019, 1:49pm UTC](https://trio.discourse.group/t/chrome-devtools-protocol/213 "2019-09-04T13:49:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mehaase](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/mehaase/32/30_2.png) [@mehaase](https://trio.discourse.group/u/mehaase)\
**Post date:** [September 4, 2019, 1:49pm UTC](https://trio.discourse.group/t/chrome-devtools-protocol/213/1 "2019-09-04T13:49:29Z")

</div>

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](https://github.com/HyperionGray/python-chrome-devtools-protocol) and contains Python wrappers around CDP’s data types. It doesn’t do any I/O.

The [Trio CDP library](https://github.com/HyperionGray/trio-chrome-devtools-protocol) is a thin wrapper that opens a websocket, multiplexes messages on that socket, and delegates the rest of the protocol to PyCDP.

---

<div class="post-metadata">

**Author:** ![njs](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/njs/32/11_2.png) [@njs](https://trio.discourse.group/u/njs)\
**Post date:** [September 5, 2019, 7:27am UTC](https://trio.discourse.group/t/chrome-devtools-protocol/213/2 "2019-09-05T07:27:28Z")

</div>

Whoa, that’s awesome.

And you should send a PR to add PyCDP to the list of sans-io libraries here 🙂 [https://github.com/brettcannon/sans-io/edit/master//index.rst](https://github.com/brettcannon/sans-io/edit/master//index.rst)

---

<div class="post-metadata">

**Author:** ![belm0](https://yyz2.discourse-cdn.com/free1/user_avatar/trio.discourse.group/belm0/32/69_2.png) [@belm0](https://trio.discourse.group/u/belm0)\
**Post date:** [September 8, 2019, 7:27am UTC](https://trio.discourse.group/t/chrome-devtools-protocol/213/3 "2019-09-08T07:27:47Z")

</div>

corrected link: [https://github.com/brettcannon/sans-io/blob/master/index.rst](https://github.com/brettcannon/sans-io/blob/master/index.rst)
