Skip to main content

Getting started

Running tests

Run your tests

The reporter generates the PDF after Playwright finishes; no separate command needed.

npx playwright test# → reports/2026-04-27-main-passed.pdf

Chrome setup by operating system

The reporter uses Puppeteer to render the PDF and needs a Chrome binary on the machine. The path is auto-detected via PUPPETEER_EXECUTABLE_PATH, then system Chrome, then chrome-finder.

Windows

# Install via winget (Windows 10 1709 and later)winget install Google.Chrome# Set the path (PowerShell)$env:PUPPETEER_EXECUTABLE_PATH = "C:\Program Files\Google\Chrome\Application\chrome.exe"# Set the path (Command Prompt)set PUPPETEER_EXECUTABLE_PATH=C:\Program Files\Google\Chrome\Application\chrome.exe

If Chrome is already installed, the reporter finds it automatically. Download from google.com/chrome if winget is unavailable.

Linux (Debian / Ubuntu)

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | \  sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpgecho "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] \  http://dl.google.com/linux/chrome/deb/ stable main" | \  sudo tee /etc/apt/sources.list.d/google-chrome.listsudo apt-get update -qq && sudo apt-get install -y google-chrome-stableexport PUPPETEER_EXECUTABLE_PATH=/usr/bin/google-chrome-stable

Do not use the chromium-browser apt package; on Ubuntu it installs as a snap and Puppeteer cannot drive it. Always install google-chrome-stable.

macOS

# Install via Homebrewbrew install --cask google-chromeexport PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"

If Chrome is already installed in /Applications, the reporter finds it automatically.

Set the path in config (all platforms)

reporter: [['@reportforge/playwright-pdf', {  // Linux CI  puppeteerExecutablePath: '/usr/bin/google-chrome-stable',  // Windows  // puppeteerExecutablePath: 'C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe',  // macOS  // puppeteerExecutablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',}]]