---
title: Puppeteer with Chromedp testing | TestingBot
description: Using golang and Puppeteer to connect with a Chrome browser in our cloud
  via Chromedp
source_url:
  html: https://testingbot.com/support/web-automate/puppeteer/chromedp
  md: https://testingbot.com/support/web-automate/puppeteer/chromedp.md
---

# Chromedp

chromedp is a golang package which allows you to automate a Chrome browser with Golang using Puppeteer syntax.

To find out more about this package, please see the [chromedp documentation](https://pkg.go.dev/github.com/chromedp/chromedp).

## Installation

Installing chromedp is very easy:

```bash
go get -u github.com/chromedp/chromedp
```

## Your first Test

To get started, please see this simple example:

```golang
package main

import (
  "context"
  "flag"
  "github.com/chromedp/chromedp"
  "log"
)

func main() {
  var devToolWsUrl string
  var title string

  flag.StringVar(&devToolWsUrl, "devtools-ws-url", "wss://cloud.testingbot.com?key=API_KEY&secret=API_SECRET&browserName=chrome&browserVersion=latest", "DevTools Websocket URL")
  flag.Parse()

  actxt, cancelActxt := chromedp.NewRemoteAllocator(context.Background(), devToolWsUrl)
  defer cancelActxt()

  ctxt, cancelCtxt := chromedp.NewContext(actxt) // create new tab
  defer cancelCtxt() // close tab afterwards

  if err := chromedp.Run(ctxt,
    chromedp.Navigate("https://testingbot.com"),
    chromedp.Title(&title),
  ); err != nil {
    log.Fatalf("Failed getting title of testingbot.com: %v", err)
  }

  log.Println("Got title of:", title)
}
```

This will connect with a Chrome browser running in the TestingBot cloud, go to the TestingBot homepage and print its title.

## Specifying browser and version

To specify on which browser and version your Chromedp test should run, you can include both a `browserName` and `browserVersion` in the `browserWSEndpoint` URL.

  ![OS selected](https://testingbot.com/assets/environments/svg/windows11-0e1b28bc0fdd5034d3e4d3dc8d346c500a8c6522facf4b45d0da56537c1f1c6d.svg) Windows 11 › ![Browser selected](https://testingbot.com/assets/environments/svg/chrome-c4081ff447d2d898d4afcb8f074a907c960e6f007716c1a1d119eee6803c4042.svg) Chrome 139 

Loading environments...

Please wait while we load the available browsers and platforms.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new) [Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
