Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Puppeteer Puppeteer Browser Version

From Leeroopedia
Knowledge Sources
Domains Browser_Automation, Diagnostics
Last Updated 2026-02-11 23:00 GMT

Overview

Concrete tool for querying the browser's version string, provided by the puppeteer-core library.

Description

The Browser.version() method returns a string representing the browser's name and version number. It is an abstract method on the Browser base class, implemented by both CDP and BiDi backends.

Usage

Call this method on a Browser instance to retrieve the version string for logging or verification.

Code Reference

Source Location

  • Repository: puppeteer
  • File: packages/puppeteer-core/src/api/Browser.ts
  • Lines: 538

Signature

abstract class Browser {
  abstract version(): Promise<string>;
}

Import

const browser = await puppeteer.launch();
const version = await browser.version();

I/O Contract

Inputs

Name Type Required Description
(none) No parameters

Outputs

Name Type Description
return Promise<string> Browser version string, e.g. "HeadlessChrome/61.0.3153.0" or "Firefox/116.0a1"

Usage Examples

Verify Browser Version

const puppeteer = require('puppeteer');

const browser = await puppeteer.launch();
console.log(await browser.version());
// Output: "HeadlessChrome/131.0.6778.33"
await browser.close();

Cross Browser Version Check

const browser = await puppeteer.launch({browser: 'firefox'});
const version = await browser.version();
console.log(`Running: ${version}`);
// Output: "Firefox/134.0"
await browser.close();

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment