patrols

patrols

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/3 runs 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
  • :telemetry instrumentation 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.

Showing Posts 1 to 3

felix-starman

felix-starman

Hey, just curious if there was anything in particular missing that you needed that Bibbidi did not have?

I’m trying to make sure that Bibbidi can be resilient and bulletproof for everyone regardless of browser

patrols

patrols OP

Hey Felix! honest answer: I didn’t know about Bibbidi when I started. When I looked around, most of what I found either wrapped ChromeDriver/WebDriver or pulled in a full Playwright/Puppeteer-style layer, and I wanted something small that talks CDP directly, mainly for a scraping pipeline I run in production. So it wasn’t a specific feature Bibbidi was missing; I just didn’t find it when I searched, and by the time I might have, I’d already built the thing.

I’ll take a proper look at Bibbidi though, curious how you approached it

felix-starman

felix-starman

All good.

Version 0.4 is basically ready but I’m adding usage docs to a bunch of modules.

And then I have a plan for library called Bobbidi that is more high level but would still be like a middleware for an RPA library

— All posts loaded —

Where Next? Top

Trending in Announcing Top

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
woylie
Phoenix components for pagination, sortable tables and filter forms with Flop and (optionally) Ecto. pagination cursor pagination sorta...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews