qmetrics.net

chromedp

Go library for Chrome DevTools Protocol browser control

chromedp drives Chrome and compatible browsers from Go via the DevTools Protocol without an external WebDriver. It starts browsers over a pipe by default and supports headless or visible automation.

Overview

chromedp is a Go package that controls browsers implementing the Chrome DevTools Protocol. It needs no separate driver: the module launches Chrome and communicates through a pipe, using only the standard library plus cdproto types. A related remote subpackage adds WebSocket connectivity when attaching to an already running browser or hosted debugging endpoint.

Automation centers on actions run against a browser tab context created with chromedp.NewContext. chromedp.Run and chromedp.Do execute navigation, DOM queries, form input, network introspection, screenshots, and direct protocol commands via chromedp.Call. Page events expose iterator-style subscriptions so tests can trigger and await specific browser signals.

By default Chrome runs headless; visible windows opt in through allocator options or environment variables, with Linux requiring a display or Wayland session. Programs can keep browsers open after exit, connect to remote containers, or run inside the chromedp/headless-shell image on headless servers. Parallel work uses separate tab contexts per goroutine rather than sharing one context.

Cross-site iframes require attaching to separate targets or deliberately disabling site isolation for trusted pages. Companion examples and termcast utilities stream screencasts to capable terminals. Documentation covers migration from older APIs and protocol edge cases such as Enter key handling in rich text editors.

Key features

  • DevTools Protocol from Go
  • No external WebDriver required
  • Default pipe-based browser launch
  • Headless and visible window modes
  • Remote WebSocket browser attach
  • Multi-tab parallel contexts
  • Direct cdproto command calls
  • headless-shell container support

Use cases

  • Go integration and UI tests
  • Headless page scraping and forms
  • DevTools event-driven automation
  • Remote browser debugging workflows
  • Terminal screencast demos

Tags

Similar software

Puppeteer

JavaScript library for automating Chrome and Firefox

Puppeteer exposes a high-level JavaScript API to drive Chrome or Firefox through the DevTools Protocol or WebDriver BiDi. It defaults to headless browser control for scripts and tests.

★ 95.9k⟳ yesterdayApache-2.0

jsdom

Node.js implementation of web DOM and HTML standards

jsdom emulates browser DOM and HTML APIs in Node.js for testing and scraping real web apps. The JSDOM constructor parses HTML and exposes a window object with configurable behavior.

★ 21.8k⟳ 2 days agoMIT · open core

Playwright Go

Go library for cross-browser Chromium, Firefox, and WebKit automation

Playwright for Go drives Chromium, Firefox, and WebKit through one API for scraping, testing, and browser workflows. Headless and headed modes are supported on Linux, macOS, and Windows.

★ 3.5k⟳ 22 days agoMIT

Panther

PHP browser testing and web scraping library

Symfony Panther drives real Chrome or Firefox browsers via WebDriver for end-to-end tests and website scraping in PHP applications.

★ 3.1k⟳ 1 month agoMIT

Puppeteer Puppeteer

Node.js API for headless Chrome and Firefox automation

Puppeteer is a JavaScript library that automates Chrome and Firefox via Chrome DevTools Protocol and WebDriver BiDi. Use it for UI testing, PDFs, screenshots, and scripted browsing.

★ 2.4k⟳ yesterdayApache-2.0

Browserless

Headless Chrome driver layer on Puppeteer for Node.js

Browserless wraps Puppeteer to drive headless Chrome or Chromium from Node.js. It adds helpers for HTML, text, PDF, and screenshots with retries, ad blocking, and CLI access.

★ 1.8k⟳ yesterdayMIT