🪟 Locate across frames
page.frame_locator() and frame.frame_locator() 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.
page.frame_locator().get_by_role("button").click()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:
page.locator("button").visible.click()🖼️ Aria and screen snapshots in traces
New aria_snapshots and screen_snapshots options of
tracing.start() capture an aria snapshot and a screenshot of the page on every action:
context.tracing.start(snapshots=True, aria_snapshots=True, screen_snapshots=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
http_credentialsnow 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.on('dialogclosed') and browserContext.on('dialogclosed') are emitted when a JavaScript dialog is accepted, dismissed or closed by the user.
Command line
playwright install --no-removekeeps the browsers of other Playwright installations instead of removing them.playwright 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