diff --git a/docs/src/api/class-locatorassertions.md b/docs/src/api/class-locatorassertions.md index 9445d25872..b4ef5d34a3 100644 --- a/docs/src/api/class-locatorassertions.md +++ b/docs/src/api/class-locatorassertions.md @@ -742,7 +742,7 @@ await expect(locator).to_be_in_viewport() # Make sure element is fully outside of viewport. await expect(locator).not_to_be_in_viewport() # Make sure that at least half of the element intersects viewport. -await expect(locator).to_be_in_viewport(ratio=0.5); +await expect(locator).to_be_in_viewport(ratio=0.5) ``` ```python sync @@ -754,7 +754,7 @@ 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); +expect(locator).to_be_in_viewport(ratio=0.5) ``` diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 18b113f159..da0cf07960 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -4,6 +4,46 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.31 + +### New APIs + +- New assertion [`method: LocatorAssertions.toBeInViewport`] ensures that locator points to an element that intersects viewport, according to the [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). + + + ```csharp + 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 }); + ``` + + +### Miscellaneous + +- DOM snapshots in trace viewer can be now opened in a separate window. +- New option [`option: Route.fetch.maxRedirects`] for method [`method: Route.fetch`]. +- Playwright now supports Debian 11 arm64. +- Official [docker images](./docker.md) now include Node 18 instead of Node 16. + +### 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 + + ## Version 1.30 ### Browser Versions diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 49a6eea12e..00e728ecbe 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -4,6 +4,46 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.31 + +### New APIs + +- New assertion [`method: LocatorAssertions.toBeInViewport`] ensures that locator points to an element that intersects viewport, according to the [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). + + + ```java + Locator locator = page.getByRole(AriaRole.BUTTON); + + // Make sure at least some part of element intersects viewport. + assertThat(locator).isInViewport(); + + // Make sure element is fully outside of viewport. + assertThat(locator).not().isInViewport(); + + // Make sure that at least half of the element intersects viewport. + assertThat(locator).isInViewport(new LocatorAssertions.IsInViewportOptions().setRatio(0.5)); + ``` + + +### Miscellaneous + +- DOM snapshots in trace viewer can be now opened in a separate window. +- New option [`option: Route.fetch.maxRedirects`] for method [`method: Route.fetch`]. +- Playwright now supports Debian 11 arm64. +- Official [docker images](./docker.md) now include Node 18 instead of Node 16. + +### 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 + + ## Version 1.30 ### Browser Versions diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 4ccf5aa437..5a8479b70b 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -4,6 +4,47 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.31 + +### New APIs + +- New assertion [`method: LocatorAssertions.toBeInViewport`] ensures that locator points to an element that intersects viewport, according to the [intersection observer API](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API). + + + ```python sync + 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 [`option: Route.fetch.maxRedirects`] for method [`method: Route.fetch`]. +- Playwright now supports Debian 11 arm64. +- Official [docker images](./docker.md) now include Node 18 instead of Node 16. + +### 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 + + ## Version 1.30 ### Browser Versions