chromedp
chromedp is a Go package. It starts Chrome, or connects to a Chrome that runs already, and drives it: it loads pages, clicks, types, reads the page, takes screenshots, prints PDFs, and watches or changes the network. Programs use it to test web sites, to scrape them, and to make images and documents.
Play the recording below. It shows a program while it drives Chrome: the line of Go that runs, the page at that moment, and the messages of the protocol that the line sends.

tutorials/first-program/run.go in Chrome/158.0.8127.88. Step through it to see the line of Go, the page and the protocol messages of each step.The steps of the recording
- line 15
if err := chromedp.Do(ctx, chromedp.Navigate(url)); err != nil { - line 20
title, err := chromedp.Run(ctx, chromedp.Title()) - line 28
heading, err := chromedp.Run(ctx, chromedp.Text(chromedp.CSS("h1"))) - line 35
if err := chromedp.Do(ctx, chromedp.Click(chromedp.CSS("#greet"))); err != nil { - line 41
greeting, err := chromedp.Run(ctx, chromedp.Text(chromedp.CSS("#greeting"), chromedp.NodeVisible))
Learn chromedp
Section titled “Learn chromedp”- Install Go, Chrome and chromedp.
- Write your first program.
- Read the concepts: contexts, actions and selectors.
- Follow a tutorial: fill in a form, take screenshots and PDFs, read the console or intercept requests.
Every tutorial is a complete program in the repository of this site. A test runs each one in Chrome and checks its output.
For coding agents
Section titled “For coding agents”/llms.txt lists every page as Markdown, and
/llms-full.txt holds the whole site in one file. Add .md
to the address of a page to get its Markdown, such as
/start/install.md. See For coding agents.