qmetrics.net

Playwright for Go

Go library for cross-browser Chromium, Firefox, and WebKit automation

Playwright for Go screenshot

Playwright for Go drives Chromium, Firefox, and WebKit through one API for scraping, testing, and browser workflows. Headless and headed modes are supported on Linux, macOS, and Windows.

Overview

Playwright for Go is a client library that automates Chromium, Firefox, and WebKit from Go programs. It follows the same cross-browser automation model as other Playwright language ports, with documentation concepts shared across languages.

Installation pulls in a language-specific driver that communicates with a bundled Node.js-based Playwright runtime and downloads matching browser builds. Locators such as role, label, placeholder, text, and test-id based queries replace brittle CSS-only selection. Actions wait for elements to become actionable, and assertion helpers retry until conditions hold.

Browser contexts provide isolated profiles with negligible overhead, and storage state can be saved for reuse. Tracing, network routing, mobile emulation, geolocation, permissions, and multi-page scenarios are supported, along with file upload and download handling.

The Go port targets Linux, macOS, and Windows with parity across the three browser engines. Optional Docker guidance is provided for containerized setups, and examples cover end-to-end tests, PDF rendering, screenshots, and parallel scraping patterns.

Key features

  • Single API for Chromium, Firefox, and WebKit
  • User-oriented locators and auto-waiting actions
  • Isolated browser contexts and saved auth state
  • Network interception and request mocking
  • Tracing, screenshots, PDF, and video capture
  • Mobile and geolocation emulation
  • Cross-platform headless and headed runs
  • Playwright driver install from Go tooling

Use cases

  • End-to-end web application testing in Go
  • Headless scraping and content extraction
  • Multi-page flows with iframes and shadow DOM
  • CI browser automation in containers

Tags

Similar software

Selenium

Cross-language browser automation via W3C WebDriver

Selenium automates Chrome, Firefox, Edge, and Safari from Java, Python, C#, Ruby, JavaScript, or Kotlin. It implements the W3C WebDriver standard and downloads browser drivers automatically.

★ 34.6k⟳ todayApache-2.0

Testify

Go test helpers for assertions, mocks, and suites

Testify is a set of Go packages that extend the standard testing library with readable assertions, hard failures, mocks, and structured suites. Install it with go get.

★ 26.3k⟳ 2 months agoMIT

React Testing Library

React DOM component testing utilities

A lightweight library that adds testing helpers on top of react-dom and react-dom/test-utils. It steers tests toward user-like DOM interaction instead of component implementation details.

★ 19.7k⟳ 3 months agoMIT

volkswagen

Node library that passes tests under CI detection

Volkswagen is a small Node module that detects continuous-integration environments and alters test behavior so suites exit successfully when run on CI servers.

★ 15.5k⟳ 9 months agoMIT

Mockito

Java mocking framework for unit tests

Mockito is a mocking framework for unit tests written in Java. It provides a small API to create mocks, stub behavior, verify interactions, and support partial spies and injection.

★ 15.5k⟳ 2 days agoMIT

supertest

Node.js HTTP server testing via superagent

Supertest offers a fluent API for asserting HTTP behavior against Node.js servers during automated tests. It builds on superagent so you can express status, headers, and body expectations in code.

★ 14.4k⟳ 21 days agoMIT