Update dependency playwright to v1.43.0
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
playwright (changelog) | dependencies | minor |
1.41.2 -> 1.43.0
|
Release Notes
Microsoft/playwright-python (playwright)
v1.43.0
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](https://playwright.dev/python/docs/api/class-locator#locator-content-frame) converts a {@​link Locator} object to a [FrameLocator](https://playwright.dev/python/docs/api/class-framelocator). This can be useful when you have a [Locator](https://playwright.dev/python/docs/api/class-locator) object obtained somewhere, and later on would like to interact with the content inside the frame.
```python
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
v1.42.0
New Locator Handler
New method page.add_locator_handler(locator, handler) registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears.
### Setup the handler.
page.add_locator_handler(
page.get_by_role("heading", name="Hej! You are in control of your cookies."),
lambda: page.get_by_role("button", name="Accept all").click(),
)
### Write the test as usual.
page.goto("https://www.ikea.com/")
page.get_by_role("link", name="Collection of blue and white").click()
expect(page.get_by_role("heading", name="Light and easy")).to_be_visible()
New APIs
-
page.pdf([options]) accepts two new options
tagged
andoutline
.
Announcements
-
⚠ ️ Ubuntu 18 is not supported anymore.
Browser Versions
- Chromium 123.0.6312.4
- Mozilla Firefox 123.0
- WebKit 17.4
This version was also tested against the following stable channels:
- Google Chrome 122
- Microsoft Edge 123
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.