Releases: microsoft/playwright-java
v1.41.1
Highlights
microsoft/playwright#29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded
microsoft/playwright#29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL
Browser Versions
- Chromium 121.0.6167.57
- Mozilla Firefox 121.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 120
- Microsoft Edge 120
v1.41.0
New APIs
- New method
Page.unrouteAll()
removes all routes registered byPage.route()
andPage.routeFromHAR()
. - New method
BrowserContext.unrouteAll()
removes all routes registered byBrowserContext.route()
andBrowserContext.routeFromHAR()
. - New option
setStyle
inPage.screenshot()
andLocator.screenshot()
to add custom CSS to the page before taking a screenshot.
Browser Versions
- Chromium 121.0.6167.57
- Mozilla Firefox 121.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 120
- Microsoft Edge 120
v1.40.0
Test Generator Update
New tools to generate assertions:
- "Assert visibility" tool generates assertThat(locator).isVisible([options]).
- "Assert value" tool generates assertThat(locator).hasValue(value[, options]).
- "Assert text" tool generates assertThat(locator).containsText(expected[, options]).
Here is an example of a generated test with assertions:
page.navigate("https://playwright.dev/");
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Get started")).click();
assertThat(page.getByLabel("Breadcrumbs").getByRole(AriaRole.LIST)).containsText("Installation");
assertThat(page.getByLabel("Search")).isVisible();
page.getByLabel("Search").click();
page.getByPlaceholder("Search docs").fill("locator");
assertThat(page.getByPlaceholder("Search docs")).hasValue("locator");
New APIs
- Option
reason
in page.close([options]), browserContext.close([options]) and browser.close([options]). Close reason is reported for all operations interrupted by the closure. - Option
firefoxUserPrefs
in browserType.launchPersistentContext(userDataDir[, options]).
Other Changes
- Methods download.path() and download.createReadStream() throw an error for failed and cancelled downloads.
Browser Versions
- Chromium 120.0.6099.28
- Mozilla Firefox 119.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 119
- Microsoft Edge 119
v1.39.0
v1.38.0
Trace Viewer Updates
- Zoom into time range.
- Network panel redesign.
New APIs
Browser Versions
- Chromium 117.0.5938.62
- Mozilla Firefox 117.0
- WebKit 17.0
This version was also tested against the following stable channels:
- Google Chrome 116
- Microsoft Edge 116
v1.37.0
New APIs
-
New methods
BrowserContext.newCDPSession()
andBrowser.newBrowserCDPSession()
create a Chrome DevTools Protocol session for the page and browser respectively.CDPSession cdpSession = page.context().newCDPSession(page); cdpSession.send("Runtime.enable"); JsonObject params = new JsonObject(); params.addProperty("expression", "window.foo = 'bar'"); cdpSession.send("Runtime.evaluate", params); Object foo = page.evaluate("window['foo']"); assertEquals("bar", foo);
📚 Debian 12 Bookworm Support
Playwright now supports Debian 12 Bookworm on both x86_64 and arm64 for Chromium, Firefox and WebKit.
Let us know if you encounter any issues!
Linux support looks like this:
Ubuntu 20.04 | Ubuntu 22.04 | Debian 11 | Debian 12 | |
---|---|---|---|---|
Chromium | ✅ | ✅ | ✅ | ✅ |
WebKit | ✅ | ✅ | ✅ | ✅ |
Firefox | ✅ | ✅ | ✅ | ✅ |
Browser Versions
- Chromium 116.0.5845.82
- Mozilla Firefox 115.0
- WebKit 17.0
This version was also tested against the following stable channels:
- Google Chrome 115
- Microsoft Edge 115
v1.36.0
v1.35.1
v1.35.0
Highlights
-
New option
setMaskColor
for methodsPage.screenshot()
andLocator.screenshot()
to change default masking color. -
New
uninstall
CLI command to uninstall browser binaries:$ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="uninstall" # remove browsers installed by this installation $ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="uninstall --all" # remove all ever-install Playwright browsers
Browser Versions
- Chromium 115.0.5790.13
- Mozilla Firefox 113.0
- WebKit 16.4
This version was also tested against the following stable channels:
- Google Chrome 114
- Microsoft Edge 114
v1.34.0
Version 1.34.0
Highlights
-
New
Locator.and()
to create a locator that matches both locators.Locator button = page.getByRole(AriaRole.BUTTON).and(page.getByTitle("Subscribe"));
-
New events
BrowserContext.onConsoleMessage()
andBrowserContext.onDialog()
to subscribe to any dialogs
and console messages from any page from the given browser context. Use the new methodsConsoleMessage.page()
andDialog.page()
to pin-point event source.
Browser Versions
- Chromium 114.0.5735.26
- Mozilla Firefox 113.0
- WebKit 16.4
This version was also tested against the following stable channels:
- Google Chrome 113
- Microsoft Edge 113