v26.0.0
Puppeteer Sharp 26.0.0 was released on December 3, 2026. It is a major version with several behavior changes, so read the Breaking changes section before upgrading. Target frameworks are unchanged: netstandard2.0, net8.0, and net10.0.
dotnet add package PuppeteerSharp --version 26.0.0The browsers downloaded by default are now Chrome 158.0.8127.91 and Firefox 161.0 (stable_161.0).
Breaking changes
Section titled “Breaking changes”ElementHandle.ClickAsync checks for covered elements
Section titled “ElementHandle.ClickAsync checks for covered elements”ClickAsync now verifies that the click point is not covered by another element, such as a sticky header or an overlay. If it is covered, the element is scrolled to the center of the viewport and checked again. If something still covers it, the call throws PuppeteerException (Node is covered by <div#overlay> at the click point) and nothing is clicked. Before, the click landed on the overlay and the test kept going.
The check does not run for elements inside child frames.
To keep the old behavior, turn the check off with ClickOptions.CheckCoverage (default true):
var button = await page.QuerySelectorAsync("#submit");
// Scrolls past a sticky header if needed, throws if the button is still covered.await button.ClickAsync();
// Old behavior: click the point even if another element is on top of it.await button.ClickAsync(new ClickOptions { CheckCoverage = false });Migration: if a test starts failing with Node is covered by ..., a real element is blocking the click. Close the overlay first, or set CheckCoverage = false if the overlap is expected.
Shift now upper-cases letters in the CDP keyboard
Section titled “Shift now upper-cases letters in the CDP keyboard”With Shift held, the Chrome (CDP) keyboard now upper-cases single-character keys, matching WebDriver BiDi and a real keyboard.
await page.Keyboard.DownAsync("Shift");await page.Keyboard.TypeAsync("bc"); // types "BC" (it used to type "bc")await page.Keyboard.PressAsync("a"); // types "A"await page.Keyboard.UpAsync("Shift");Migration: if code relied on lower-case output while Shift was down, release Shift before typing.
InstallExtensionAsync returns an Extension
Section titled “InstallExtensionAsync returns an Extension”IBrowser.InstallExtensionAsync now returns an Extension instead of the extension ID string. UninstallExtensionAsync accepts an Extension as well (the ID overload still works). With WebDriver BiDi, only Id and Path are populated on that object. ExtensionsAsync throws NotSupportedException on WebDriver BiDi.
Realm.GetExtension replaces Realm.ExtensionAsync(). The new method is synchronous. On CDP it reads the browser’s extension cache, which is filled when an extension is installed or when ExtensionsAsync() is called. It returns null when the realm was not created by an extension, or when that extension is not in the cache yet. A worker realm throws PuppeteerException (Unable to get extension from a worker Realm.). On WebDriver BiDi, GetExtension() throws NotSupportedException (Extension is not supported in WebDriver BiDi.), as ExtensionAsync() did.
// Beforestring id = await browser.InstallExtensionAsync(extensionPath);await browser.UninstallExtensionAsync(id);
// Nowvar extension = await browser.InstallExtensionAsync(extensionPath);Console.WriteLine(extension.Id);await browser.UninstallExtensionAsync(extension);Migration: use extension.Id where the returned string was used, and replace await realm.ExtensionAsync() with realm.GetExtension().
Tab and prerender targets are now exposed
Section titled “Tab and prerender targets are now exposed”Browser.Targets(), BrowserContext.Targets(), and the TargetCreated, TargetChanged, and TargetDestroyed events now include targets of type tab, and prerendered pages. The new ITarget.Subtype and ITarget.Parent (both null with WebDriver BiDi) let you tell them apart and walk the tab hierarchy. When a prerendered page is activated, the same IPage instance stays in use.
foreach (var target in browser.Targets()){ Console.WriteLine($"{target.Type} subtype={target.Subtype} parent={target.Parent?.Url}");}
// Only look at regular pages, as before.var pages = browser.Targets().Where(t => t.Type == TargetType.Page);Migration: if code enumerates targets or reacts to target events, filter by Type so the extra Tab targets are not treated as pages.
New features
Section titled “New features”Detect unloaded tabs
Section titled “Detect unloaded tabs”ITarget.IsUnloaded is true for a tab target that has no loaded document: a discarded tab, a tab that session restore has not loaded yet, or a tab whose renderer crashed. With WebDriver BiDi it is false.
An unloaded tab with no page returns null from PageAsync, throws from AsPageAsync, and is left out of PagesAsync. A crashed tab keeps its page, so PageAsync still returns it. A page that is open when its tab is discarded in place now closes. When that tab loads again, it gets a new page. Connecting to a browser that has a tab without a page no longer waits forever.
var tab = browser.Targets().First(t => t.Type == TargetType.Tab);if (tab.IsUnloaded){ Console.WriteLine("This tab is discarded or crashed.");}Download browser archives without installing them
Section titled “Download browser archives without installing them”BrowserFetcher.DownloadArchiveAsync downloads a browser archive into the browser root without unpacking it and returns its path. A later DownloadAsync for the same build reuses that archive, installs it, and removes it. This is useful to pre-fetch browsers in a Docker layer or a cache step and install them later.
var fetcher = new BrowserFetcher(SupportedBrowser.Chrome);
// Build step: download the archive only.var archivePath = await fetcher.DownloadArchiveAsync(Chrome.DefaultBuildId);
// Run step: installs that build from the archive instead of downloading it again.var installed = await fetcher.DownloadAsync(Chrome.DefaultBuildId);Accessibility snapshots include presentational iframes
Section titled “Accessibility snapshots include presentational iframes”With IncludeIframes = true, accessibility snapshots now expand iframes marked role="presentation". Their content used to be missing, which hid things like a “Card number” textbox inside an embedded payment iframe.
- Browser downloads are safer.
BrowserFetcher.DownloadAsyncnow downloads and extracts into a temporary folder and moves the result into place. A failed or interrupted download no longer leaves a half-installed browser folder, and concurrent installs of the same build are handled. PdfAsyncno longer changes the options object. SettingOutlineused to flipPdfOptions.Taggedtotrueon the object passed in.- A failed PDF no longer breaks later screenshots. With
OmitBackground = true, the page background stayed transparent if printing failed (for example,PageRangesbeyond the page count). It is now always restored. CaptureHeapSnapshotAsyncfails cleanly. If the output file can’t be opened, such as a missing directory, it throwsDirectoryNotFoundExceptionand does not leave the heap profiler enabled.- WebDriver BiDi page events.
Page.LoadandPage.DOMContentLoadednow fire only for the main frame, as they do with CDP. A child frame loading no longer raises those page events.
Made with love by Dario Kondratiuk