Skip to content

Browser Automation for .NET

Puppeteer Sharp is a .NET port of the official Node.JS Puppeteer API. Control Chrome and Firefox with a high-level, easy-to-use API.

dotnet add package PuppeteerSharp
using var browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true });
var page = await browser.NewPageAsync();
await page.GoToAsync("https://example.com");
await page.ScreenshotAsync("screenshot.png");

Automate Chrome and Firefox with full support for navigation, input, network interception, and more. Works with both headless and headful modes.

Generate pixel-perfect screenshots and PDF documents. Supports full-page capture, custom viewports, clipping, and PDF formatting options.

Smart element location with built-in auto-retry and auto-wait. Configure visibility, timeouts, and preconditions with a fluent API.

await page.Locator("button.submit")
.SetWaitForEnabled(true)
.SetEnsureElementIsInTheViewport(true)
.ClickAsync();

First-class support for both Chrome DevTools Protocol (CDP) and WebDriver BiDi, giving you flexibility to choose the best protocol for your use case.

Runs on Windows, macOS, and Linux. Targets .NET Standard 2.0 and .NET 10, so it works with .NET Framework 4.6.1+, .NET Core, and modern .NET.

If you are making money using Puppeteer-Sharp, consider sponsoring this project. This will give you priority support and help this community-based project keep moving.

Made with love by Dario Kondratiuk