docs: add release-notes for language bindings (#29825)

This commit is contained in:
Max Schmitt 2024-03-06 10:47:04 +01:00 committed by GitHub
parent 1d4bdc6898
commit b3edb2a130
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 114 additions and 0 deletions

View file

@ -4,6 +4,45 @@ title: "Release notes"
toc_max_heading_level: 2 toc_max_heading_level: 2
--- ---
## Version 1.42
### New Locator Handler
New method [`method: Page.addLocatorHandler`] 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.
```csharp
// Setup the handler.
await Page.AddLocatorHandlerAsync(
Page.GetByRole(AriaRole.Heading, new() { Name = "Hej! You are in control of your cookies." }),
async () =>
{
await Page.GetByRole(AriaRole.Button, new() { Name = "Accept all" }).ClickAsync();
});
// Write the test as usual.
await Page.GotoAsync("https://www.ikea.com/");
await Page.GetByRole(AriaRole.Link, new() { Name = "Collection of blue and white" }).ClickAsync();
await Expect(Page.GetByRole(AriaRole.Heading, new() { Name = "Light and easy" })).ToBeVisibleAsync();
```
### New APIs
- [`method: Page.pdf`] accepts two new options [`option: tagged`] and [`option: outline`].
### Announcements
* ⚠️ Ubuntu 18 is not supported anymore.
### Browser Versions
* Chromium 121.0.6167.57
* Mozilla Firefox 121.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 120
* Microsoft Edge 120
## Version 1.41 ## Version 1.41
### New APIs ### New APIs

View file

@ -4,6 +4,44 @@ title: "Release notes"
toc_max_heading_level: 2 toc_max_heading_level: 2
--- ---
## Version 1.42
### New Locator Handler
New method [`method: Page.addLocatorHandler`] 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.
```java
// Setup the handler.
page.addLocatorHandler(
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Hej! You are in control of your cookies.")),
() - > {
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Accept all")).click();
});
// Write the test as usual.
page.navigate("https://www.ikea.com/");
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Collection of blue and white")).click();
assertThat(page.getByRole(AriaRole.HEADING, new Page.GetByRoleOptions().setName("Light and easy"))).isVisible();
```
### New APIs
- [`method: Page.pdf`] accepts two new options [`option: tagged`] and [`option: outline`].
### Announcements
* ⚠️ Ubuntu 18 is not supported anymore.
### Browser Versions
* Chromium 121.0.6167.57
* Mozilla Firefox 121.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 120
* Microsoft Edge 120
## Version 1.41 ## Version 1.41
### New APIs ### New APIs

View file

@ -4,6 +4,43 @@ title: "Release notes"
toc_max_heading_level: 2 toc_max_heading_level: 2
--- ---
## Version 1.42
### New Locator Handler
New method [`method: Page.addLocatorHandler`] 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.
```python
# 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
- [`method: Page.pdf`] accepts two new options [`option: tagged`] and [`option: outline`].
### Announcements
* ⚠️ Ubuntu 18 is not supported anymore.
### Browser Versions
* Chromium 121.0.6167.57
* Mozilla Firefox 121.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 120
* Microsoft Edge 120
## Version 1.41 ## Version 1.41
### New APIs ### New APIs