New APIs
-
Method BrowserContext.clear_cookies([options]) now supports filters to remove only some cookies.
# Clear all cookies. context.clear_cookies() # New: clear cookies with a particular name. context.clear_cookies(name="session-id") # New: clear cookies for a particular domain. context.clear_cookies(domain="my-origin.com")
-
New method locator.content_frame converts a {@link Locator} object to a FrameLocator. This can be useful when you have a Locator object obtained somewhere, and later on would like to interact with the content inside the frame.
locator = page.locator("iframe[name='embedded']") # ... frame_locator = locator.content_frame frame_locator.getByRole("button").click()
-
New method frameLocator.owner converts a FrameLocator object to a Locator. This can be useful when you have a FrameLocator object obtained somewhere, and later on would like to interact with the
iframe
element.frame_locator = page.frame_locator("iframe[name='embedded']") # ... locator = frame_locator.owner expect(locator).to_be_visible()
-
Conda builds are now published for macOS-arm64 and Linux-arm64.
Browser Versions
- Chromium 124.0.6367.8
- Mozilla Firefox 124.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 123
- Microsoft Edge 123