A Clojure library for controlling headless Chrome via the Chrome DevTools Protocol, with auto-generated low-level commands and higher-level automation utilities.
clj-chrome-devtools is a Clojure library that provides an API for controlling headless Chrome via the Chrome DevTools Protocol. It solves the problem of browser automation, web scraping, and testing by offering auto-generated low-level protocol commands and higher-level automation utilities. The library enables Clojure developers to programmatically interact with web pages, inspect DOM elements, and run tests in a headless Chrome environment.
Clojure developers who need to automate headless Chrome for tasks like web scraping, browser testing, or ClojureScript test execution. It's particularly useful for those building automation scripts, testing frameworks, or data extraction tools.
Developers choose clj-chrome-devtools because it provides a stable, auto-generated low-level API that stays in sync with Chrome DevTools Protocol updates, combined with practical higher-level utilities. Its integration with Clojure test fixtures and support for Babashka scripts make it versatile for both production automation and lightweight scripting.
Clojure API for controlling a Chrome DevTools remote
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
All low-level commands are automatically generated from official Chrome DevTools Protocol JSON files, ensuring accuracy and easy updates as the protocol evolves, as stated in the README.
Includes a test fixture for running tests with headless Chrome, supporting both Clojure and ClojureScript test suites without extra plugins, demonstrated in the README example.
Provides a quick-start script for Babashka, enabling lightweight automation without a full Clojure environment, ideal for scripting tasks as highlighted in the README.
Functions support both explicit connection parameters and a global context, offering flexibility for REPL usage and production code, as shown in the connection examples.
The README admits the automation utilities are 'rudimentary' and still under development, limiting out-of-the-box functionality for complex tasks.
Using the low-level API requires manually implementing event handlers for data Chrome sends, adding boilerplate and complexity compared to more abstracted libraries.
Being Clojure-specific, it has a smaller user base and fewer resources than mainstream tools like Puppeteer, which can affect community support and integration options.