v1.58.0
- New 'system' theme option follows your OS dark/light mode preference
- Search functionality (Cmd/Ctrl+F) is now available in code editors
- Network details panel has been reorganized for better usability
- JSON responses are now automatically formatted for readability
Thanks to @cpAdm for contributing these improvements!
browserType.connectOverCDP() now accepts an isLocal option. When set to true, it tells Playwright that it runs on the same host as the CDP server, enabling file system optimizations.
- Removed
_reactand_vueselectors. See locators guide for alternatives. - Removed
:lightselector engine suffix. Use standard CSS selectors instead. - Option
devtoolsfrom browserType.launch() has been removed. UsesetArgs(Arrays.asList("--auto-open-devtools-for-tabs"))instead. - Removed macOS 13 support for WebKit. We recommend to upgrade your macOS version, or keep using an older Playwright version.
- Chromium 145.0.7632.6
- Mozilla Firefox 146.0.1
- WebKit 26.0
This version was also tested against the following stable channels:
- Google Chrome 144
- Microsoft Edge 144
v1.57.0
Starting with this release, Playwright switches from Chromium, to using Chrome for Testing builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57.
We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar.
If you still see an unexpected behaviour change, please file an issue.
On Arm64 Linux, Playwright continues to use Chromium.
After 3 years of being deprecated, we removed page.accessibility() from our API. Please use other libraries such as Axe if you need to test page accessibility. See our Node.js guide for integration with Axe.
- worker. onConsole event is emitted when JavaScript within the worker calls one of console API methods, e.g. console.log or console.dir.
Worker.waitForConsoleMessage()can be used to wait for it. - locator.description() returns locator description previously set with locator.describe().
- New option
stepsin locator.click() and locator.dragTo() that configures the number ofmousemoveevents emitted while moving the mouse pointer to the target element.
- Chromium 143.0.7499.4
- Mozilla Firefox 144.0.2
- WebKit 26.0
v1.56.0
- New methods page.consoleMessages() and page.pageErrors() for retrieving the most recent console messages from the page
- New method page.requests() for retrieving the most recent network requests from the page
- Event browserContext.onBackgroundPage has been deprecated and will not be emitted. Method browserContext.backgroundPages() will return an empty list
- Aria snapshots render and compare
inputplaceholder
- Chromium 141.0.7390.37
- Mozilla Firefox 142.0.1
- WebKit 26.0
v1.55.0
- Automatic
isVisible()assertions: Codegen can now generate automaticisVisible()assertions for common UI interactions. This feature can be enabled in the Codegen settings UI.
⚠️ Dropped support for Chromium extension manifest v2.
- Added support for Debian 13 "Trixie".
- Chromium 140.0.7339.16
- Mozilla Firefox 141.0
- WebKit 26.0
This version was also tested against the following stable channels:
- Google Chrome 139
- Microsoft Edge 139
v1.54.0
-
New cookie property
partitionKeyin browserContext.cookies() and browserContext.addCookies(). This property allows to save and restore partitioned cookies. See CHIPS MDN article for more information. Note that browsers have different support and defaults for cookie partitioning. -
New option
--user-data-dirin multiple commands. You can specify the same user data dir to reuse browsing state, like authentication, between sessions.mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen --user-data-dir=./user-data" -
mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args=opencommand does not open the test recorder anymore. Usemvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args=codegeninstead.
- Chromium 139.0.7258.5
- Mozilla Firefox 140.0.2
- WebKit 26.0
This version was also tested against the following stable channels:
- Google Chrome 140
- Microsoft Edge 140
v1.53.0
-
New method locator.describe() to describe a locator. Used for trace viewer.
Locator button = page.getByTestId("btn-sub").describe("Subscribe button"); button.click();
-
mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --list"will now list all installed browsers, versions and locations.
- Chromium 138.0.7204.4
- Mozilla Firefox 139.0
- WebKit 18.5
This version was also tested against the following stable channels:
- Google Chrome 137
- Microsoft Edge 137
v1.53.0
-
New method locator.describe() to describe a locator. Used for trace viewer.
Locator button = page.getByTestId("btn-sub").describe("Subscribe button"); button.click();
-
mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --list"will now list all installed browsers, versions and locations.
- Chromium 138.0.7204.4
- Mozilla Firefox 139.0
- WebKit 18.5
This version was also tested against the following stable channels:
- Google Chrome 137
- Microsoft Edge 137
v1.52.0
-
New method assertThat(locator).containsClass() to ergonomically assert individual class names on the element.
assertThat(page.getByRole(AriaRole.LISTITEM, new Page.GetByRoleOptions().setName("Ship v1.52"))) .containsClass("done");
-
Aria Snapshots got two new properties:
/childrenfor strict matching and/urlfor links.assertThat(locator).matchesAriaSnapshot(""" - list - /children: equal - listitem: Feature A - listitem: - link "Feature B": - /url: "https://playwright.dev" """);
- New option
setMaxRedirectsin apiRequest.newContext() to control the maximum number of redirects. - New option
setRefin locator.ariaSnapshot() to generate reference for each element in the snapshot which can later be used to locate the element.
- Method route.continue() does not allow to override the
Cookieheader anymore. If aCookieheader is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use browserContext.addCookies(). - macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements.
- Chromium 136.0.7103.25
- Mozilla Firefox 137.0
- WebKit 18.4
This version was also tested against the following stable channels:
- Google Chrome 135
- Microsoft Edge 135
v1.51.0
-
New option
setIndexedDBfor browserContext.storageState() allows to save and restore IndexedDB contents. Useful when your application uses IndexedDB API to store authentication tokens, like Firebase Authentication.Here is an example following the authentication guide:
// Save storage state into the file. Make sure to include IndexedDB. context.storageState(new BrowserContext.StorageStateOptions() .setPath(Paths.get("state.json")) .setIndexedDB(true)); // Create a new context with the saved storage state. BrowserContext context = browser.newContext(new Browser.NewContextOptions() .setStorageStatePath(Paths.get("state.json")));
-
New option
setVisiblefor locator.filter() allows matching only visible elements.// Ignore invisible todo items. Locator todoItems = page.getByTestId("todo-item") .filter(new Locator.FilterOptions().setVisible(true)); // Check there are exactly 3 visible ones. assertThat(todoItems).hasCount(3);
-
New option
setContrastfor methods page.emulateMedia() and browser.newContext() allows to emulate theprefers-contrastmedia feature. -
New option
setFailOnStatusCodemakes all fetch requests made through the APIRequestContext throw on response codes other than 2xx and 3xx.
- Chromium 134.0.6998.35
- Mozilla Firefox 135.0
- WebKit 18.4
This version was also tested against the following stable channels:
- Google Chrome 133
- Microsoft Edge 133
v1.50.0
- Added method assertThat(locator).hasAccessibleErrorMessage() to assert the Locator points to an element with a given aria errormessage.
- New button in Codegen for picking elements to produce aria snapshots.
- Additional details (such as keys pressed) are now displayed alongside action API calls in traces.
- Display of
canvascontent in traces is error-prone. Display is now disabled by default, and can be enabled via theDisplay canvas contentUI setting. CallandNetworkpanels now display additional time information.
- assertThat(locator).isEditable() and locator.isEditable() now throw if the target element is not
<input>,<select>, or a number of other editable elements.
- Chromium 133.0.6943.16
- Mozilla Firefox 134.0
- WebKit 18.2
This version was also tested against the following stable channels:
- Google Chrome 132
- Microsoft Edge 132