Need help with chromedp?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

6.0K Stars 501 Forks MIT License 528 Commits 89 Opened issues


A faster, simpler way to drive browsers supporting the Chrome DevTools Protocol.

Services available


Need anything else?

Contributors list

About chromedp GoDoc

Package chromedp is a faster, simpler way to drive browsers supporting the Chrome DevTools Protocol in Go without external dependencies (like Selenium or PhantomJS).


Install in the usual Go way:

go get -u


Refer to the GoDoc page for the documentation and examples. Additionally, the examples repository contains more complex examples.

Frequently Asked Questions

I can't see any Chrome browser window

By default, Chrome is run in headless mode. See

, and an example to override the default options.

I'm seeing "context canceled" errors

When the connection to the browser is lost,

cancels the context, and it may result in this error. This occurs, for example, if the browser is closed manually, or if the browser process has been killed or otherwise terminated.

Chrome exits as soon as my Go program finishes

On Linux,

is configured to avoid leaking resources by force-killing any started Chrome child processes. If you need to launch a long-running Chrome instance, manually start Chrome and connect using

Executing an action without

results in "invalid context"

By default, a

context does not have an executor, however one can be specified manually if necessary; see issue #326 for an example.

I can't use an

because it returns many values

Wrap it with an

chromedp.Run(ctx, chromedp.ActionFunc(func(ctx context.Context) error {
    _, err := domain.SomeAction().Do(ctx)
    return err

I want to use chromedp on a headless environment

The simplest way is to run the Go program that uses chromedp inside the chromedp/headless-shell image. That image contains

, a smaller headless build of Chrome, which
is able to find out of the box.


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.