Skip to content

Commit

Permalink
chery-pick(#19573): docs: add 1.29 language port release notes (#19606)
Browse files Browse the repository at this point in the history
This PR cherry-picks the following commits:

- 3555dbd

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
playwrightmachine and github-actions[bot] committed Dec 20, 2022
1 parent 5c0e23d commit ae7a8d2
Show file tree
Hide file tree
Showing 4 changed files with 170 additions and 1 deletion.
57 changes: 57 additions & 0 deletions docs/src/release-notes-csharp.md
Expand Up @@ -4,6 +4,63 @@ title: "Release notes"
toc_max_heading_level: 2
---

## Version 1.29

### New APIs

- New method [`method: Route.fetch`] and new option `Json` for [`method: Route.fulfill`]:

```csharp
await Page.RouteAsync("**/api/settings", async route => {
// Fetch original settings.
var response = await route.FetchAsync();

// Force settings theme to a predefined value.
var json = await response.JsonAsync<MyDataType>();
json.Theme = "Solarized";

// Fulfill with modified data.
await route.FulfillAsync(new() {
Json = json
});
});
```

- New method [`method: Locator.all`] to iterate over all matching elements:

```csharp
// Check all checkboxes!
var checkboxes = Page.GetByRole(AriaRole.Checkbox);
foreach (var checkbox in await checkboxes.AllAsync())
await checkbox.CheckAsync();
```

- [`method: Locator.selectOption`] matches now by value or label:

```html
<select multiple>
<option value="red">Red</div>
<option value="green">Green</div>
<option value="blue">Blue</div>
</select>
```

```csharp
await element.SelectOptionAsync("Red");
```

### Browser Versions

* Chromium 109.0.5414.46
* Mozilla Firefox 107.0
* WebKit 16.4

This version was also tested against the following stable channels:

* Google Chrome 108
* Microsoft Edge 108


## Version 1.28

### Playwright Tools
Expand Down
38 changes: 38 additions & 0 deletions docs/src/release-notes-java.md
Expand Up @@ -4,6 +4,44 @@ title: "Release notes"
toc_max_heading_level: 2
---

## Version 1.29

### New APIs

- New method [`method: Locator.all`] to iterate over all matching elements:

```java
// Check all checkboxes!
Locator checkboxes = page.getByRole(AriaRole.CHECKBOX);
for (Locator checkbox : checkboxes.all())
checkbox.check();
```

- [`method: Locator.selectOption`] matches now by value or label:

```html
<select multiple>
<option value="red">Red</div>
<option value="green">Green</div>
<option value="blue">Blue</div>
</select>
```

```java
element.selectOption('Red');
```

### Browser Versions

* Chromium 109.0.5414.46
* Mozilla Firefox 107.0
* WebKit 16.4

This version was also tested against the following stable channels:

* Google Chrome 108
* Microsoft Edge 108

## Version 1.28

### Playwright Tools
Expand Down
16 changes: 15 additions & 1 deletion docs/src/release-notes-js.md
Expand Up @@ -33,6 +33,20 @@ toc_max_heading_level: 2
await checkbox.check();
```

- [`method: Locator.selectOption`] matches now by value or label:

```html
<select multiple>
<option value="red">Red</div>
<option value="green">Green</div>
<option value="blue">Blue</div>
</select>
```

```js
await element.selectOption('Red');
```

- Retry blocks of code until all assertions pass:

```js
Expand Down Expand Up @@ -65,7 +79,7 @@ toc_max_heading_level: 2

- Playwright Test now respects [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig).
- New options `args` and `proxy` for [`method: AndroidDevice.launchBrowser`].
- Option `postData` in method [`method: Route.continue`] now supports [serializable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description) values.
- Option `postData` in method [`method: Route.continue`] now supports [Serializable] values.

### Browser Versions

Expand Down
60 changes: 60 additions & 0 deletions docs/src/release-notes-python.md
Expand Up @@ -4,6 +4,66 @@ title: "Release notes"
toc_max_heading_level: 2
---

## Version 1.29

### New APIs

- New method [`method: Route.fetch`] and new option `json` for [`method: Route.fulfill`]:

```python
def handle_route(route: Route):
# Fetch original settings.
response = route.fetch()

# Force settings theme to a predefined value.
json = response.json()
json["theme"] = "Solorized"

# Fulfill with modified data.
route.fulfill(json=json)


page.route("**/api/settings", handle_route)
```

- New method [`method: Locator.all`] to iterate over all matching elements:

```python
# Check all checkboxes!
checkboxes = page.get_by_role("checkbox")
for checkbox in checkboxes.all():
checkbox.check()
```

- [`method: Locator.selectOption`] matches now by value or label:

```html
<select multiple>
<option value="red">Red</div>
<option value="green">Green</div>
<option value="blue">Blue</div>
</select>
```

```python
element.select_option("Red")
```

### Miscellaneous

- Option `postData` in method [`method: Route.continue`] now supports [Serializable] values.

### Browser Versions

* Chromium 109.0.5414.46
* Mozilla Firefox 107.0
* WebKit 16.4

This version was also tested against the following stable channels:

* Google Chrome 108
* Microsoft Edge 108

## Version 1.28

### Playwright Tools
Expand Down

0 comments on commit ae7a8d2

Please sign in to comment.