CDPEx is a Chrome DevTools Protocol client for Elixir. It drives a real Chrome straight over CDP, with no ChromeDriver, Selenium, or WebDriver sitting in between. I wrote it to replace Wallaby/ChromeDriver in a production scraping app, and it’s now the only browser engine that app runs on.
You launch a Chrome, drive a page, and CDPEx reaps the OS process for you when the page is done, so you don’t end up with a pile of orphaned Chrome processes.
CDPEx.with_page([], fn page ->
{:ok, _} = CDPEx.Page.navigate(page, "https://example.com")
CDPEx.Page.wait_for_network_idle(page)
CDPEx.Page.screenshot(page, path: "shot.png")
end)
# Chrome launched, driven, and cleaned up. Nothing left running.
What it does:
with_page/3runs your code with a fresh page and guarantees teardown, even if your function raises- Real, trusted input: clicks and keystrokes go through Chrome as genuine user gestures (
event.isTrusted == true), not synthetic JS events - Connects to a remote or already-running Chrome over
ws(s)://, as well as launching one locally - 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’s running in production right now, rendering JS-heavy pages, including ones behind JS challenges and Cloudflare. It’s a real browser running real JS, so no stealth tricks are involved.
It’s pre-1.0, so the API can still change, and stealth or anti-bot evasion is out of scope on purpose. It has held up well under daily load so far.
The package is on Hex and the docs are on HexDocs. Happy to answer questions or hear what you think is missing.






















