docs: add 1.29 language port release notes (#19573)
Signed-off-by: Max Schmitt <max@schmitt.mx> Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
This commit is contained in:
parent
971e30482a
commit
3555dbd4b4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue