PuppeteerSharp 25.14.0

Puppeteer Sharp

Puppeteer Sharp is a .NET port of the official Node.JS Puppeteer API.

What is Puppeteer Sharp?

Puppeteer Sharp provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome or Chromium.

What can you do?

Most things that you can do manually in the browser can be done using Puppeteer Sharp! Here are a few examples:

  • Generate screenshots and PDFs of pages
  • Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. "SSR" (Server-Side Rendering))
  • Automate form submission, UI testing, keyboard input, etc.
  • Create an up-to-date, automated testing environment
  • Capture a timeline trace of your site to help diagnose performance issues
  • Test Chrome Extensions

Prerequisites

  • Puppeteer-Sharp comes in two flavors: a NetStandard 2.0 library for .NET Framework 4.6.1 and .NET Core 2.0 or greater and a .NET 8 version.
  • If you have issues running Chrome on Linux, the Puppeteer repo has a great troubleshooting guide.
  • X-server is required on Linux.

Usage

Take screenshots

var browserFetcher = new BrowserFetcher();
await browserFetcher.DownloadAsync();
await using var browser = await Puppeteer.LaunchAsync(
    new LaunchOptions { Headless = true });
await using var page = await browser.NewPageAsync();
await page.GoToAsync("http://www.google.com");
await page.ScreenshotAsync(outputFile);

Generate PDF files

var browserFetcher = new BrowserFetcher();
await browserFetcher.DownloadAsync();
await using var browser = await Puppeteer.LaunchAsync(new LaunchOptions { Headless = true });
await using var page = await browser.NewPageAsync();
await page.GoToAsync("http://www.google.com");
await page.EvaluateExpressionHandleAsync("document.fonts.ready"); // Wait for fonts to be loaded
await page.PdfAsync(outputFile);

Evaluate Javascript

await using var page = await browser.NewPageAsync();
var seven = await page.EvaluateExpressionAsync<int>("4 + 3");
var someObject = await page.EvaluateFunctionAsync<JsonElement>("(value) => ({a: value})", 5);
Console.WriteLine(someObject.GetProperty("a").GetString());

Support

If you have an issue or a question:

Contributing

Check out contributing guide to get an overview of Puppeteer Sharp development.

No packages depend on PuppeteerSharp.

Version Downloads Last updated
25.14.0 6 10/15/2026
25.13.1 7 10/11/2026
25.12.0 15 09/26/2026
25.11.0 23 09/16/2026
25.10.0 23 09/06/2026
25.8.0 17 08/20/2026
25.7.0 21 08/16/2026
25.6.0 20 08/16/2026
25.5.0 24 08/08/2026
25.4.0 22 07/31/2026
25.3.4 26 07/18/2026
25.3.3 22 07/14/2026
25.3.1 26 07/03/2026
25.3.0 25 07/03/2026
25.2.1 27 07/01/2026
25.1.2 32 06/20/2026
25.1.1 30 06/13/2026
25.1.0 38 06/04/2026
25.0.4 31 05/29/2026
24.42.0 29 05/29/2026
24.40.0 31 05/25/2026
24.39.1 31 05/30/2026
24.39.0 30 05/29/2026
24.38.0 27 05/29/2026
21.1.1 25 05/29/2026
21.1.0 31 05/29/2026
21.0.1 29 05/29/2026
21.0.0 28 05/29/2026
20.2.6 27 05/29/2026
20.2.5 26 05/29/2026
20.2.4 27 05/29/2026
20.2.2 25 05/30/2026
20.2.1 26 05/30/2026
20.2.0 26 05/30/2026
20.1.3 26 05/30/2026
20.1.2 27 05/29/2026
20.1.1 24 05/29/2026
20.1.0 32 05/29/2026
20.0.5 31 05/29/2026
20.0.4 29 05/29/2026
20.0.3 29 05/29/2026
20.0.2 27 05/29/2026
20.0.1-beta1 26 05/29/2026
20.0.0 28 05/28/2026
19.0.2 29 05/29/2026
19.0.1 29 05/29/2026
19.0.0 26 05/29/2026
19.0.0-beta2 27 05/29/2026
19.0.0-beta1 31 05/29/2026
18.1.0 28 05/29/2026
18.1.0-beta1 26 05/29/2026
18.0.5 23 05/29/2026
18.0.4 26 05/29/2026
18.0.3 28 05/29/2026
18.0.2 26 05/29/2026
18.0.1 26 05/29/2026
18.0.0 24 05/29/2026
17.0.0 30 05/29/2026
16.0.0 24 05/29/2026
15.1.0 26 05/29/2026
15.0.0 25 05/29/2026
14.1.0 27 05/29/2026
14.0.0 28 05/29/2026
13.0.2 29 05/29/2026
13.0.1 27 05/29/2026
13.0.0 29 05/30/2026
12.0.0 23 05/30/2026
11.0.6 25 05/29/2026
11.0.5 28 05/29/2026
11.0.4 23 05/29/2026
11.0.3 28 05/29/2026
11.0.2 27 05/29/2026
11.0.1 26 05/29/2026
11.0.0 25 05/29/2026
10.1.4 26 05/29/2026
10.1.2 29 05/30/2026
10.1.1 31 05/29/2026
10.1.0 24 05/29/2026
10.0.0 25 05/30/2026
9.1.0 30 05/29/2026
9.0.2 26 05/29/2026
9.0.1 24 05/29/2026
9.0.0 30 05/30/2026
8.0.0 29 05/30/2026
7.1.0 25 05/29/2026
7.0.0 25 05/29/2026
6.2.0 29 05/30/2026
6.1.0 27 05/29/2026
6.0.0 24 05/29/2026
5.1.0 25 05/29/2026
5.0.0 27 05/29/2026
4.0.0 27 05/29/2026
3.0.0 25 05/29/2026
2.0.4 25 05/29/2026
2.0.3 27 05/29/2026
2.0.2 23 05/29/2026
2.0.1 24 05/29/2026
2.0.0 28 05/29/2026
1.20.0 23 05/29/2026
1.20.0-alpha 28 05/30/2026
1.19.0 25 05/29/2026
1.18.0 25 05/30/2026
1.17.2 28 05/29/2026
1.17.1 24 05/29/2026
1.17.0 26 05/29/2026
1.16.0 33 05/29/2026
1.15.0 27 05/29/2026
1.14.1 26 05/29/2026
1.14.0 26 05/29/2026
1.13.0 24 05/29/2026
1.12.1 27 05/29/2026
1.12.0 24 05/29/2026
1.11.2 26 05/29/2026
1.11.1 26 05/29/2026
1.11.0 30 05/29/2026
1.10.0 24 05/29/2026
1.9.0 28 05/29/2026
1.8.0 27 05/29/2026
1.7.0 26 05/30/2026
1.6.2 27 05/29/2026
1.6.0 30 05/29/2026
1.5.0 27 05/29/2026
1.4.0 27 05/29/2026
1.3.0 28 05/30/2026
1.2.0 29 05/29/2026
1.1.0 27 05/29/2026
1.0.2 27 05/29/2026
1.0.1 29 05/30/2026
1.0.0 24 05/29/2026
0.8.0 26 05/29/2026
0.7.0 28 05/29/2026
0.6.0 20 05/29/2026
0.5.0 28 05/29/2026
0.4.0 27 05/29/2026
0.3.3 27 05/29/2026
0.3.2 26 05/29/2026
0.3.1 25 05/29/2026
0.3.0 25 05/29/2026
0.1.1 24 05/29/2026
0.1.0 25 05/29/2026
0.0.1 24 05/29/2026