docs: java release notes snippet (#20200)

This commit is contained in:
Yury Semikhatsky 2023-01-18 12:23:36 -08:00 committed by GitHub
parent 9edc0ad988
commit 0facbe001d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,20 @@ toc_max_heading_level: 2
### New APIs
- New method [`method: Route.fetch`]:
```java
page.route("**/api/settings", route -> {
// Fetch original settings.
APIResponse response = route.fetch();
// Force settings theme to a predefined value.
String body = response.text().replace("\"theme\":\"default\"",
"\"theme\":\"Solorized\"");
// Fulfill with modified data.
route.fulfill(new Route.FulfillOptions().setResponse(response).setBody(body));
});
```
- New method [`method: Locator.all`] to iterate over all matching elements:
```java
@ -28,7 +42,7 @@ toc_max_heading_level: 2
```
```java
element.selectOption('Red');
element.selectOption("Red");
```
### Browser Versions