From 0facbe001d7adfcc415e0c6ff645de7c45f4103a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 18 Jan 2023 12:23:36 -0800 Subject: [PATCH] docs: java release notes snippet (#20200) --- docs/src/release-notes-java.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index b392a1d9b7..206545ac33 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -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