NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
NuGet, #764 most downloaded on NuGet
Playwright enables reliable end-to-end testing for modern web apps. It is built to enable cross-browser web automation that is ever-green, capable, reliable and fast. Learn more at https://playwright.dev/dotnet/.
Latest stable
1.64.1
Last release 1 months ago
22 Oct 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
106 releases Β· first in 2021
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
This patch includes the following bug fixes:
This patch includes the following bug fixes:
https://github.com/microsoft/playwright-dotnet/issues/2231 - [REGRESSION] HEADLESS env does not work anymore
https://github.com/microsoft/playwright-dotnet/issues/2232 - [BUG] - Install MS Edge fails
This version was also tested against the following stable channels:
Your coding agent can read these notes before it upgrades. Set up the MCP server β
Playwright now supports Debian 11 Bullseye on x86_64 for Chromium, Firefox and WebKit. Let us know if you encounter any issues!
Playwright now supports Debian 11 Bullseye on x86_64 for Chromium, Firefox and WebKit. Let us know if you encounter any issues!
Linux support looks like this:
| Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11 | |
|---|---|---|---|---|
| Chromium | β | β | β | β |
| WebKit | β | β | β | β |
| Firefox | β | β | β | β |
We rewrote our Getting Started docs to be more end-to-end testing focused. Check them out on playwright.dev.
This version was also tested against the following stable channels:
Playwright for .NET 1.23 introduces new API Testing that lets you send requests to the server directly from .NET! Now you can:
Playwright for .NET 1.23 introduces new API Testing that lets you send requests to the server directly from .NET! Now you can:
To do a request on behalf of Playwright's Page, use new Page.APIRequest API:
// Do a GET request on behalf of page
var response = await Page.APIRequest.GetAsync("http://example.com/foo.json");
Console.WriteLine(response.Status);
Console.WriteLine(response.StatusText);
Console.WriteLine(response.Ok);
Console.WriteLine(response.Headers["Content-Type"]);
Console.WriteLine(await response.TextAsync());
Console.WriteLine((await response.JsonAsync())?.GetProperty("foo").GetString());
Read more about it in our API testing guide.
Now you can record network traffic into a HAR file and re-use this traffic in your tests.
To record network into HAR file:
pwsh bin\Debug\netX\playwright.ps1 open --save-har=example.har --save-har-glob="**/api/**" https://example.com
Alternatively, you can record HAR programmatically:
var context = await browser.NewContextAsync(new ()
{
RecordHarPath = harPath,
RecordHarUrlFilterString = "**/api/**",
});
// ... Perform actions ...
// Close context to ensure HAR is saved to disk.
context.CloseAsync();
Use the new methods Page.RouteFromHARAsync or BrowserContext.RouteFromHARAsync to serve matching responses from the HAR file:
await context.RouteFromHARAsync("example.har");
Read more in our documentation.
You can now use Route.FallbackAsync to defer routing to other handlers.
Consider the following example:
// Remove a header from all requests.
await page.RouteAsync("**/*", async route =>
{
var headers = route.Request.Headers;
headers.Remove("X-Secret");
await route.ContinueAsync(new () { Headers = headers });
});
// Abort all images.
await page.RouteAsync("**/*", async route =>
{
if (route.Request.ResourceType == "image")
{
await route.AbortAsync();
}
else
{
await route.FallbackAsync();
}
});
Note that the new methods Page.RouteFromHARAsync and BrowserContext.RouteFromHARAsync also participate in routing and could be deferred to.
LocatorAssertions.ToHaveValuesAsync that asserts all selected values of <select multiple> element.LocatorAssertions.ToContainTextAsync and LocatorAssertions.ToHaveTextAsync now accept IgnoreCase option.ServiceWorkers:var context = await Browser.NewContextAsync(new()
{
ServiceWorkers = ServiceWorkerPolicy.Block
});
.zip path for recordHar context option automatically zips the resulting HAR:var context = await Browser.NewContextAsync(new() { RecordHarPath = "example.har.zip" });
"minimal" HAR recording mode
that only records information that is essential for replaying:var context = await Browser.NewContextAsync(new() { RecordHarPath = "example.har", RecordHarMode = HarMode.Minimal });
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
Role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
// Click a button with accessible name "log in"
await page.ClickAsync("role=button[name='log in']")
Read more in our documentation.
New Locator.Filter API to filter an existing locator
var buttons = page.Locator("role=button");
// ...
var submitLocator = buttons.Filter(new LocatorFilterOptions { HasText = "Sign up" });
await submitLocator.ClickAsync();
New experimental role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
New experimental role selectors that allow selecting elements by their ARIA role, ARIA attributes and accessible name.
// Click a button with accessible name "log in"
await page.ClickAsync("role=button[name='log in']")
To use role selectors, make sure to pass PLAYWRIGHT_EXPERIMENTAL_FEATURES=1 environment variable.
Read more in our documentation.
New scale option in Page.ScreenshotAsync for smaller sized screenshots.
New caret option in Page.ScreenshotAsync to control text caret. Defaults to "hide".
We now ship a designated .NET docker image mcr.microsoft.com/playwright/dotnet. Read more in our documentation.
Locator.SetInputFilesAsync API.This version was also tested against the following stable channels:
This patch includes the following bug fixes:
This patch includes the following bug fixes:
https://github.com/microsoft/playwright/issues/12711 - [REGRESSION] Page.screenshot hangs on some sites https://github.com/microsoft/playwright/issues/12807 - [BUG] Cookies get assigned before fulfilling a response https://github.com/microsoft/playwright/issues/12821 - [BUG] Chromium: Cannot click, element intercepts pointer events https://github.com/microsoft/playwright/issues/12887 - [BUG] Locator.count() with _vue selector with Repro https://github.com/microsoft/playwright/issues/12974 - [BUG] Regression - chromium browser closes during test or debugging session on macos https://github.com/microsoft/playwright-dotnet/issues/2074 - [BUG] NullReferenceException in Connection.WrapApiCallAsync https://github.com/microsoft/playwright-dotnet/issues/2069 - [BUG] dotnet build did not override files
This version was also tested against the following stable channels:
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright-dotnet/pull/2067 - [BUG] Running Playwright without a namespace lead to a null pointer exception
This version was also tested against the following stable channels:
Playwright for .NET 1.20 introduces Web-First Assertions.
Playwright for .NET 1.20 introduces Web-First Assertions.
Consider the following example:
using System.Threading.Tasks;
using Microsoft.Playwright.NUnit;
using NUnit.Framework;
namespace Playwright.TestingHarnessTest.NUnit
{
public class ExampleTests : PageTest
{
[Test]
public async Task StatusBecomesSubmitted()
{
await Expect(Page.Locator(".status")).ToHaveTextAsync("Submitted");
}
}
}
Playwright will be re-testing the node with the selector .status until
fetched Node has the "Submitted" text. It will be re-fetching the node and
checking it over and over, until the condition is met or until the timeout is
reached. You can pass this timeout as an option.
Read more in our documentation.
page.screenshot(), locator.screenshot() and elementHandle.screenshot():
ScreenshotAnimations.Disabled rewinds all CSS animations and transitions to a consistent statemask: Locator[] masks given elements, overlaying them with pink #FF00FF boxes.Locator.highlight() visually reveals element(s) for easier debugging.This version was also tested against the following stable channels:
Nothing published for this version
This patch includes the following bug fixes:
This patch includes the following bug fixes:
https://github.com/microsoft/playwright-dotnet/pull/2023 - [BUG] chore: don't include PlaywrightCopyItems in pack https://github.com/microsoft/playwright/issues/12075 - [Question] After update to 1.19 firefox fails to run https://github.com/microsoft/playwright/issues/12106 - [BUG] Error: EBUSY: resource busy or locked when using volumes in docker-compose with playwright 1.19.0 and mcr.microsoft.com/playwright:v1.15.0-focal
This version was also tested against the following stable channels:
`csharp await Page.Locator("article", new () { Has = Page.Locator(".highlight") }).ClickAsync(); `
has option that makes sure it contains another locator inside:await Page.Locator("article", new () { Has = Page.Locator(".highlight") }).ClickAsync();
The snippet above will select article that has highlight in it and will press the button in it. Read more in locator documentation
method: Locator.pagemethod: Page.screenshot and method: Locator.screenshot now automatically hides blinking caretThis version was also tested against the following stable channels:
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright-dotnet/issues/1964 - [BUG] Save trace without a path was not possible
This version was also tested against the following stable channels:
Each locator can now be optionally filtered by the text it contains: `csharp await Page.Locator("li", new () { HasTextString = "My Item" }) .Locator("
Locator.DragToAsyncawait Page.Locator("li", new () { HasTextString = "My Item" })
.Locator("button").click();
Read more in locator documentationBrowserType.ConnectOverCDPAsync connect to a Chromium browser via Chromium DevTools Protocol (CDP)BrowserType.ConnectAsync connect to a Playwright server instanceAcceptDownloads option now defaults to true.Sources option to embed sources into traces.This version was also tested against the following stable channels:
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright-dotnet/issues/1668 - [BUG] Microsoft.Playwright.CLI was not working under .NET 6 https://github.com/microsoft/playwright-dotnet/issues/1841 - [BUG] HAR file didn't get saved on the disk https://github.com/microsoft/playwright-dotnet/issues/1749 - [BUG]: Driver process lead to leaking zombie processes
This version of Playwright was also tested against the following stable channels:
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/issues/10638 - [BUG] Locator.click -> subtree intercepts pointer events since version 1.17.0 https://github.com/microsoft/playwright/issues/10632 - [BUG] Playwright 1.17.0 -> After clicking the element - I get an error that click action was failed https://github.com/microsoft/playwright/issues/10627 - [REGRESSION]: Can no longer click Material UI select box https://github.com/microsoft/playwright/issues/10620 - [BUG] trailing zero width whitespace fails toHaveText
This version of Playwright was also tested against the following stable channels:
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/issues/10127 - [BUG] Add Trace Viewer error handling (file not found, not parsable) https://github.com/microsoft/playwright/issues/10436 - [Bug]: Add hints on how to open trace from HTML report when opened locally https://github.com/microsoft/playwright/pull/10492 - [Bug]: Fix broken Firefox User-Agent on 'Desktop Firefox' devices
This version was also tested against the following stable channels:
Playwright 1.17 introduces [frame locators] - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the iframe
Playwright 1.17 introduces frame locators - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the iframe and then locate elements in that iframe. Frame locators are strict by default, will wait for iframe to appear and can be used in Web-First assertions.
Frame locators can be created with either page.FrameLocator(selector) or locator.FrameLocator(selector) method.
var locator = page.FrameLocator("#my-iframe").Locator("text=Submit");
await locator.ClickAsync();
Read more at our documentation.
Playwright Trace Viewer is now available online at https://trace.playwright.dev! Just drag-and-drop your trace.zip file to inspect its contents.
NOTE: trace files are not uploaded anywhere; trace.playwright.dev is a progressive web application that processes traces locally.
This version was also tested against the following stable channels:
Nothing published for this version
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/issues/9692 - [BUG] HTML report shows locator._withElement for locator.evaluate https://github.com/microsoft/playwright/issues/7818 - [Bug]: dedup snapshot CSS images
This version was also tested against the following stable channels:
(1.16.2-1635322350000)
Wait for a locator to resolve to a single element with a given state. Defaults to the state: 'visible'.
Wait for a locator to resolve to a single element with a given state.
Defaults to the state: 'visible'.
var orderSent = page.Locator("#order-sent");
orderSent.WaitForAsync();
Read more about Locator.WaitForAsync().
npx playwright show-trace and drop trace files to the trace viewer PWARead more about Trace Viewer.
This version of Playwright was also tested against the following stable channels:
(1.16.0-1634781227000)
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/issues/9261 - [BUG] npm init playwright fails on path spaces https://github.com/microsoft/playwright/issues/9298 - [Question]: Should new Headers methods work in RouteAsync ?
This version of Playwright was also tested against the following stable channels:
(driver version: 1.15.2-1633455481000)
Nothing published for this version
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/issues/9065 - [BUG] browser(webkit): disable COOP support https://github.com/microsoft/playwright/issues/9092 - [BUG] browser(webkit): fix text padding
This version of Playwright was also tested against the following stable channels:
(driver version: 1.15.0-1633020276000)
This patch includes bug fixes for the following issues:
This patch includes bug fixes for the following issues:
https://github.com/microsoft/playwright/pull/8955 - [BUG] fix(inspector): stop on all snapshottable actions https://github.com/microsoft/playwright/pull/8999 - [BUG] fix: do not dedup header values https://github.com/microsoft/playwright/pull/9038 - [BUG] fix: restore support for slowmo connect option
This version of Playwright was also tested against the following stable channels:
By using `Page.Mouse.WheelAsync` you are now able to scroll vertically or horizontally.
By using Page.Mouse.WheelAsync you are now able to scroll vertically or horizontally.
Previously it was not possible to get multiple header values of a response. This is now possible and additional helper functions are available:
Its now possible to emulate the forced-colors CSS media feature by passing it in the context options or calling Page.EmulateMediaAsync().
times option to specify how many times this route should be matched.This version of Playwright was also tested against the following stable channels:
β¦- [BUG] Mark timeout in isVisible as deprecated and noop
This patch includes bug fixes for the following issues:
microsoft/playwright#8287 - [BUG] webkit crashes intermittently: "file data stream has an unexpected number of bytes" microsoft/playwright#8281 - [BUG] HTML report crashes if diff snapshot does not exists microsoft/playwright#8230 - Using React Selectors with multiple React trees microsoft/playwright#8366 - [BUG] Mark timeout in isVisible as deprecated and noop
This version of Playwright was also tested against the following stable channels:
Selector ambiguity is a common problem in automation testing. "strict" mode ensures that your selector points to a single element and throws otherwise
Selector ambiguity is a common problem in automation testing. "strict" mode ensures that your selector points to a single element and throws otherwise.
Pass Strict = true into your action calls to opt in.
// This will throw if you have more than one button!
await page.ClickAsync("button", new () { Strict = true } );
Locator represents a view to the element(s) on the page. It captures the logic sufficient to retrieve the element at any given moment.
The difference between the Locator and ElementHandle is that the latter points to a particular element, while Locator captures the logic of how to retrieve that element.
Also, locators are "strict" by default!
var locator = page.Locator("button");
await locator.ClickAsync();
Learn more in the documentation.
React and Vue selectors allow selecting elements by its component name and/or property values. The syntax is very similar to attribute selectors and supports all attribute selector operators.
await page.ClickAsync("_react=SubmitButton[enabled=true]");
await page.ClickAsync("_vue=submit-button[enabled=true]");
Learn more in the react selectors documentation and the vue selectors documentation.
nth and visible selector enginesnth selector engine is equivalent to the :nth-match pseudo class, but could be combined with other selector engines.visible selector engine is equivalent to the :visible pseudo class, but could be combined with other selector engines.// select the first button among all buttons
await button.ClickAsync("button >> nth=0");
// or if you are using locators, you can use first(), nth() and last()
await page.Locator("button").First.ClickAsync();
// click a visible button
await button.ClickAsync("button >> visible=true");
SkipAttribute We now have a NUnit attribute that can be used to skip various combinations of browser and/or platforms.This version of Playwright was also tested against the following stable channels:
π Programmatic drag-and-drop support via the [Page.DragAndDropAsync()] API.
Page.DragAndDropAsync() API.RecordHarPath option in Browser.NewContextAsync().PublicSign but using a full signing key, making it easier to use in projects requiring full-trustconsole.log() calls.BaseURL option in Browser.NewContextAsync() and Browser.NewPageAsync()Response.SecurityDetailsAsync() and Response.ServerAddrAsync()Page.DragAndDropAsync() and Frame.DragAndDropAsync()Download.CancelAsync()Page.InputValueAsync(), Frame.InputValueAsync() and ElementHandle.InputValueAsync()Force option in Page.FillAsync(), Frame.FillAsync(), and ElementHandle.FillAsync()Force option in Page.SelectOptionAsync(), Frame.SelectOptionAsync(), and ElementHandle.SelectOptionAsync()Nothing published for this version
This patch release includes bugfixes for the following issues:
This patch release includes bugfixes for the following issues:
https://github.com/microsoft/playwright/issues/7015 - [BUG] Firefox: strange undefined toJSON property on JS objects https://github.com/microsoft/playwright/issues/7048 - [BUG] Dialogs cannot be dismissed if tracing is on in Chromium or Webkit https://github.com/microsoft/playwright/issues/7058 - [BUG] Getting no video frame error for mobile chrome
This version of Playwright was also tested against the following stable channels:
Unfortunately, this meant we had to introduce some breaking changes. The following list points out the key ones:
This version of Playwright was also tested against the following stable channels:
This release is a major release for the .NET port. We've completely redone the API surface in order to ensure parity with the rest of the supported languages. Unfortunately, this meant we had to introduce some breaking changes. The following list points out the key ones:
options class. Method calls should look closer to .LaunchAsync(new() { Headless = false });decimal arguments are now float.IAccessibility now returns a JSONElementSystem.Drawing.Point was dropped in favour of using our own, generated Positiontimeout and delay arguments are now float.Rect class was replaced by ElementHandleBoundingBoxResult.WaitForState was renamed to WaitForSelectorState.SelectOption was renamed to SelectOptionValue.EventArgs were removed in favor of the class the EventArg was wrapping. For instance Page.Close is now an EventHandler<IPage> and Page.Download is now an EventHandler<IDownload>.Modifier was renamed to KeyboardModifier.LifecycleEvent was renamed to LoadState.ReadOnlyCollection.New event: EventHandler<IRequest> Request
New event: EventHandler<IRequest> RequestFailed
New event: EventHandler<IRequest> RequestFinished
New event: EventHandler<IResponse> Response
DefaultTimeout has been replaced with SetDefaultTimeoutDefaultNavigationTimeout has been replaced with SetDefaultNavigationTimeoutGetCookiesAsync has been replaced with CookiesAsyncGetStorageStateAsync has been replaced with StorageStateAsyncSetHttpCredentialsAsync has been removed.WaitForEventAsync has been replaced with WaitForPageAsync and RunAndWaitForPageAsync.GetBoundingBoxAsync has been replaced with BoundingBoxAsyncGetContentFrameAsync has been replaced with ContentFrameAsyncGetInnerHtmlAsync has been replaced with InnerHTMLAsyncGetInnerTextAsync has been replaced with InnerTextAsyncGetOwnerFrameAsync has been replaced with OwnerFrameAsyncGetTextContentAsync has been replaced with TextContentAsyncGetContentAsync has been replaced with ContentAsyncGetFrameElementAsync has been replaced with FrameElementAsyncGetInnerHtmlAsync has been replaced with InnerHTMLAsyncGetInnerTextAsync has been replaced with InnerTextAsyncGetTextContentAsync has been replaced with TextContentAsyncGetTitleAsync has been replaced with TitleAsyncGoToAsync has been replaced with GotoAsyncGetJsonValueAsync has been replaced with JsonValueAsyncDefaultTimeout has been removed.DefaultNavigationTimeout has been removed.Coverage has been removed.GetContentAsync has been replaced with ContentAsyncGetFrame has been replaced with FrameGetInnerHtmlAsync has been replaced with InnerHTMLAsyncGetInnerTextAsync has been replaced with InnerTextAsyncGetOpenerAsync has been replaced with OpenerAsyncGetPdfAsync has been replaced with PdfAsyncGetTextContentAsync has been replaced with TextContentAsyncGetTitleAsync has been replaced with TitleAsync``GoToAsync has been replaced with GotoAsyncWaitForEventAsync has been replaced with more specific WaitFor* overloadsGetPostDataJson has been replaced with PostDataJSONGetResponseAsync has been replaced with ResponseAsyncGetBodyAsync has been replaced with BodyAsyncGetJsonAsync has been replaced with JsonAsyncGetTextAsync has been replaced with TextAsyncGetPathAsync has been replaced with PathAsyncWaitForEventAsync has been removed.ICoverage has been removed.IConnectionTransport has been removed.ICDPSession has been removed.IChromiumBrowser has been removed.IChromiumBrowserContext has been removed.IChromiumBrowserType has been removed.Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.