Repository navigation
🧾 Locator code in Java
A locator from locator.normalize() now converts to a string as Java code. Use it with page.getByRef() to turn an element that an agent picks from a page.ariaSnapshot() in the "ai" mode into code for your test:
Locator normalized = page.getByRef("e2").normalize();
System.out.println(normalized.toString());
// getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Submit"))New APIs
- New option
timeoutin cdpSession.send().
Breaking Changes ⚠️
-
Actions such as locator.click(), locator.check(), locator.tap(), locator.fill(), locator.clear() and locator.selectOption() now wait for the element to be not inert. An action on an element with the
inertattribute, or inside such an element, now times out if the element stays inert. -
Cookie matching now follows RFC 6265. With a URL, browserContext.cookies() and apiRequestContext.cookies() no longer return host-only cookies for subdomains or
Path=/apicookies for/apiv2, and aPath=/foo/cookie does not match/foo. APIRequestContext sends a cookie without a name asCookie: xinstead ofCookie: =x, and storesSet-Cookie: tokenas a cookie without a name. -
Proxy credentials are no longer sent to websites. The credentials in the
proxyoption now answer only proxy challenges. To authenticate on a website, usehttpCredentials. -
Text that the browser does not render, such as text that is not assigned to a slot or text directly inside a closed
<details>, is no longer part of accessible names and aria snapshots. This can change the results of page.getByRole() with a name, locator.ariaSnapshot() and assertThat(locator).matchesAriaSnapshot().
Browser Versions
- Chromium 158.0.8127.18
- Mozilla Firefox 159.0
- WebKit 27.2
This version was also tested against the following stable channels:
- Google Chrome 157
- Microsoft Edge 156