From 53326391148545543b433e3e6d4e771f179b93a1 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 9 Apr 2024 09:09:56 +0200 Subject: [PATCH] cherry-pick(#30263): docs: add v1.43 release notes for language ports --- docs/src/release-notes-csharp.md | 44 ++++++++++++++++++++++++++++++ docs/src/release-notes-java.md | 44 ++++++++++++++++++++++++++++++ docs/src/release-notes-python.md | 46 ++++++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 040b66e2180c2..df22402b8757a 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -4,6 +4,50 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.43 + +### New APIs + +- Method [`method: BrowserContext.clearCookies`] now supports filters to remove only some cookies. + + ```csharp + // Clear all cookies. + await Context.ClearCookiesAsync(); + // New: clear cookies with a particular name. + await Context.ClearCookiesAsync(new() { Name = "session-id" }); + // New: clear cookies for a particular domain. + await Context.ClearCookiesAsync(new() { Domain = "my-origin.com" }); + ``` + +- New property [`method: Locator.contentFrame`] converts a [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. + + ```csharp + var locator = Page.Locator("iframe[name='embedded']"); + // ... + var frameLocator = locator.ContentFrame; + await frameLocator.GetByRole(AriaRole.Button).ClickAsync(); + ``` + +- New property [`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. + + ```csharp + var frameLocator = page.FrameLocator("iframe[name='embedded']"); + // ... + var locator = frameLocator.Owner; + await Expect(locator).ToBeVisibleAsync(); + ``` + +### 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 + ## Version 1.42 ### New Locator Handler diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 3d4df2f980e71..e077bae2ef878 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -4,6 +4,50 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.43 + +### New APIs + +- Method [`method: BrowserContext.clearCookies`] now supports filters to remove only some cookies. + + ```java + // Clear all cookies. + context.clearCookies(); + // New: clear cookies with a particular name. + context.clearCookies(new BrowserContext.ClearCookiesOptions().setName("session-id")); + // New: clear cookies for a particular domain. + context.clearCookies(new BrowserContext.ClearCookiesOptions().setDomain("my-origin.com")); + ``` + +- New method [`method: Locator.contentFrame`] converts a [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. + + ```java + Locator locator = page.locator("iframe[name='embedded']"); + // ... + FrameLocator frameLocator = locator.contentFrame(); + frameLocator.getByRole(AriaRole.BUTTON).click(); + ``` + +- New method [`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. + + ```java + FrameLocator frameLocator = page.frameLocator("iframe[name='embedded']"); + // ... + Locator locator = frameLocator.owner(); + assertThat(locator).isVisible(); + ``` + +### 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 + ## Version 1.42 ### Experimental JUnit integration diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 72481e0284df0..789a89150cf1e 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -4,6 +4,52 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.43 + +### New APIs + +- Method [`method: BrowserContext.clearCookies`] now supports filters to remove only some cookies. + + ```python + # 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 [`method: Locator.contentFrame`] converts a [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. + + ```python + locator = page.locator("iframe[name='embedded']") + # ... + frame_locator = locator.content_frame + frame_locator.getByRole("button").click() + ``` + +- New method [`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. + + ```python + 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 + ## Version 1.42 ### New Locator Handler