Puppeteer Sharp is a .NET port of the official Node.js Puppeteer API that provides headless browser automation for Chrome and Chromium.
The tool solves the problem of automating browser interactions and testing web applications from .NET code. It works by exposing a high-level API that controls a headless Chrome or Chromium instance over the Chrome DevTools Protocol, allowing developers to programmatically navigate pages, take screenshots, generate PDFs, inject HTML, and perform end-to-end testing without a visible browser window.
Developers should choose this tool if they are working in the .NET ecosystem and need cross-browser automation capabilities. It suits projects requiring web scraping, automated testing, screenshot generation, or PDF creation from web content. The project publishes multiple packages to address different needs: the main PuppeteerSharp package for full cross-browser automation, PuppeteerSharp.Cdp for Chrome-only scenarios where binary size matters and AOT compilation is required, and PuppeteerSharp.AspNetFramework as a companion library for running in ASP.NET Classic environments. The tool supports both .NET Framework 4.6.1 and .NET Core 2.0 or greater, as well as a dedicated .NET 8 version.
The project maintains active engagement with its community through multiple channels including a dedicated Slack channel, Stack Overflow presence, and a blog. Development has incorporated modern .NET capabilities, with support for AOT compilation added to enable smaller binary sizes and improved startup performance. The tool has evolved to support Firefox testing through WebDriver BiDi, expanding beyond its original Chrome-focused scope.