Control Chromium, Firefox and WebKit with a single API, for founders and developers, with 3.4k+ GitHub stars
3,407 stars236 forksGoQuality 9/10Updated 6/29/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
1Import the playwright package in your Go file: `import ("github.com/playwright-community/playwright-go")`
2Launch a browser instance using `browser, err := playwright.Run()`
3Create a new browser context using `context, err := browser.NewContext()`
4Navigate to a webpage using `page, err := context.NewPage()` and `page.Goto("https://example.com")`
5Close the browser instance using `browser.Close()`
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
What's inside โ free to inspect
No purchase needed
Read the entire source before you build โ unlike paid marketplaces that hide it behind a buy button.