New APIs
-
New assertion
expect(locator).to_be_in_viewport()
ensures that locator points to an element that intersects viewport, according to the intersection observer API.from playwright.sync_api import expect locator = page.get_by_role("button") # Make sure at least some part of element intersects viewport. expect(locator).to_be_in_viewport() # Make sure element is fully outside of viewport. expect(locator).not_to_be_in_viewport() # Make sure that at least half of the element intersects viewport. expect(locator).to_be_in_viewport(ratio=0.5)
Miscellaneous
- DOM snapshots in trace viewer can be now opened in a separate window.
- New option
max_redirects
for methodRoute.fetch
. - Playwright now supports Debian 11 arm64.
Browser Versions
- Chromium 111.0.5563.19
- Mozilla Firefox 109.0
- WebKit 16.4
This version was also tested against the following stable channels:
- Google Chrome 110
- Microsoft Edge 110