workflowstacks
devtools

Playwright-go: Automate Browsers

Control Chromium, Firefox and WebKit with a single API, for founders and developers, with 3.4k+ GitHub stars
3,466 stars239 forksGoHealth Score 9/10Updated 7/17/2026100% free · open source
What it does

Playwright-go is a browser automation library that allows you to control Chromium, Firefox, and WebKit with a single API, enabling automated browsing and testing across multiple browsers.

Install / run
go get github.com/playwright-community/playwright-go
When to use it
  • When you need to automate web browsing for data scraping or monitoring
  • When you want to write end-to-end tests for your web application across multiple browsers
  • When you need to generate screenshots or PDFs of web pages programmatically
Quick start
  1. 1Import the playwright package in your Go file: `import ("github.com/playwright-community/playwright-go")`
  2. 2Launch a browser instance using `browser, err := playwright.Run()`
  3. 3Create a new browser context using `context, err := browser.NewContext()`
  4. 4Navigate to a webpage using `page, err := context.NewPage()` and `page.Goto("https://example.com")`
  5. 5Close the browser instance using `browser.Close()`
Ready-to-paste prompt
page, err := context.NewPage(); page.Goto("https://example.com"); page.Click("text=Login"); page.Fill("input[name="username"]", "your_username"); page.Fill("input[name="password"]", "your_password"); page.Click("text=Submit")
Heads up: Make sure you have the required browser binaries installed on your system, as playwright-go will not download them automatically; you can use the `playwright.BinaryDownloadURL` variable to specify the download URL
Saves to your device

Topics

automation
browser-automation
chromium
firefox
go
golang
hacktoberfest
headless
headless-chrome
playwright
selenium
webkit
How Playwright-go: Automate Browsers works
Codeflow
Free to inspect

Playwright-go: Automate Browsers is a medium Go project (~15k lines across 100 code files, plus 72 test files). Expect some technical setup — comfortable with a terminal, or ask a developer. Last commit this month, MIT license, has a test suite.

Size
Medium codebase
~15k lines · 100 code files · ~2 h to skim
Setup
Some technical setup
Comfortable with a terminal? 20–40 min. Otherwise ask a dev.
Runs on
Go
No API keys detected
Go 96%HTML 3%Shell 1%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    CLAUDE.md
    The instructions the AI actually follows
  3. 3
    run.go
    Where the program starts running
  4. 4
    go.mod
    Dependencies and the commands it exposes
  5. 5
    internal/safe/map.go
    Inside internal/ — the main logic begins here
What's in each folder
internal/Core code — the actual logic1 files
cmd/Command-line entry points1 files
examples/Examples you can copy11 files
docs/Documentation2 files
scripts/Helper scripts5 files
patches/Patches1 files
tests/Tests — proof it works244 files
.claude/Editor / agent settings7 files
READMEHas testsDocumentedCI checksExamples includedMIT licenseUpdated this month
Quick Actions
Details
Creator
playwright-community
Language
Go
Category
devtools
Published
8/16/2020

Are you the creator of this tool? Claim your listing → and earn 85% of every sale.