🪟 Locate across frames
Page.FrameLocator() and Frame.FrameLocator() called without a selector search in any frame of the
subtree, so you no longer need to locate the iframe first:
// Finds the button in any frame on the page.
await Page.FrameLocator().GetByRole(AriaRole.Button).ClickAsync();The rest of the locator resolves inside a single frame, just like a regular locator, and an error is thrown when it
matches elements in several frames.
👁️ Visible-only locators
New Locator.Visible returns a locator that matches only visible elements. It is the recommended
replacement for the :visible CSS pseudo-class:
await Page.Locator("button").Visible.ClickAsync();🖼️ Aria and screen snapshots in traces
New AriaSnapshots and ScreenSnapshots options of Tracing.StartAsync() capture an aria snapshot and a screenshot of the page on every action:
await context.Tracing.StartAsync(new()
{
Snapshots = true,
AriaSnapshots = true,
ScreenSnapshots = true
});With aria and screen snapshots recorded, the new Display Aria mode in the trace viewer shows the action screenshot
side by side with the aria snapshot, and hovering an aria node highlights it on the screenshot.
New APIs
Browser and Context
HttpCredentialsListnow also accepts an array of credentials. The first entry matching the request origin is used, and entries without an origin match any request.- New option
Opfsincludes the origin private file system in the storage state, so it can be persisted and restored into later contexts. - New events Page. DialogClosed and BrowserContext. DialogClosed are emitted when a JavaScript dialog is accepted, dismissed or closed by the user.
Command line
pwsh bin/Debug/netX/playwright.ps1 install --no-removekeeps the browsers of other Playwright installations instead of removing them.pwsh bin/Debug/netX/playwright.ps1 codegen --http-credentialsrecords against pages behind HTTP authentication.
Announcements
- ⚠️ Ubuntu 20.04 is not supported anymore.
- 🐧 On Linux arm64, Playwright now downloads the Chrome for Testing build of Chromium, the same build used on all other platforms.
Browser Versions
- Chromium 153.0.8010.12
- Mozilla Firefox 155.0
- WebKit 26.6
This version was also tested against the following stable channels:
- Google Chrome 153
- Microsoft Edge 153