CDPEx: drive Chrome from Elixir over CDP — no ChromeDriver, no zombie processes
CDPEx is a Chrome DevTools Protocol client for Elixir. It drives a real Chrome directly over CDP, with no ChromeDriver, Selenium, or WebDriver layer in between.
You launch a Chrome (or connect to one that’s already running, local or remote), drive the page, and the OS process is reaped for you on teardown, so there are no orphaned Chrome processes left behind.
What it does:
-
with_page/3that guarantees teardown when you’re done - Real, trusted input: clicks and keystrokes dispatched as genuine user gestures, not synthetic events
-
Connect to a remote or already-running Chrome over
ws(s)://, not just a local launch -
Navigation,
evaluate, screenshots, and PDF rendering - Network observation, including waiting for the network to go idle
- Proxy support with authentication
-
:telemetryinstrumentation and an optional warm browser pool
It runs in production today as the only browser engine behind a concert-listing app, rendering JS-heavy and Cloudflare-gated pages (a real browser running real JS, no stealth tricks).
Hex: https://hex.pm/packages/cdp_ex
Repo and docs: https://github.com/patrols/cdp_ex
It’s pre-1.0, so the API may still change, but it’s been stable under daily load. Feedback welcome.
Read next LiveView JS commands playlist in dual audio (🇧🇷,🇺🇸)
