New APIs
-
New assertion
Expect(locator).ToBeInViewportAsync()
ensures that locator points to an element that intersects viewport, according to the intersection observer API.var locator = Page.GetByRole(AriaRole.Button); // Make sure at least some part of element intersects viewport. await Expect(locator).ToBeInViewportAsync(); // Make sure element is fully outside of viewport. await Expect(locator).Not.ToBeInViewportAsync(); // Make sure that at least half of the element intersects viewport. await Expect(locator).ToBeInViewportAsync(new() { Ratio = 0.5 });
-
New methods
BrowserContext.NewCDPSessionAsync(Page)
andBrowser.NewBrowserCDPSessionAsync()
create a Chrome DevTools Protocol session for the page and browser respectively.
Miscellaneous
- DOM snapshots in trace viewer can be now opened in a separate window.
- New option
MaxRedirects
for methodRoute.FetchAsync
. - 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