Skip to content

Commit 20b13ad

Browse files
authored
chore: roll driver 1.48.1 (#1687)
1 parent 08ac52c commit 20b13ad

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom
1010

1111
| | Linux | macOS | Windows |
1212
| :--- | :---: | :---: | :---: |
13-
| Chromium <!-- GEN:chromium-version -->130.0.6723.19<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
13+
| Chromium <!-- GEN:chromium-version -->130.0.6723.31<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1414
| WebKit <!-- GEN:webkit-version -->18.0<!-- GEN:stop --> ||||
15-
| Firefox <!-- GEN:firefox-version -->130.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
15+
| Firefox <!-- GEN:firefox-version -->131.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1616

1717
Headless execution is supported for all the browsers on all platforms. Check out [system requirements](https://playwright.dev/java/docs/intro#system-requirements) for details.
1818

playwright/src/main/java/com/microsoft/playwright/WebSocketRoute.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* <p> By default, the routed WebSocket will not connect to the server. This way, you can mock entire communcation over the
3131
* WebSocket. Here is an example that responds to a {@code "request"} with a {@code "response"}.
3232
* <pre>{@code
33-
* page.routeWebSocket("/ws", ws -> {
33+
* page.routeWebSocket("wss://example.com/ws", ws -> {
3434
* ws.onMessage(message -> {
3535
* if ("request".equals(message))
3636
* ws.send("response");
@@ -42,6 +42,20 @@
4242
* inside the WebSocket route handler, Playwright assumes that WebSocket will be mocked, and opens the WebSocket inside the
4343
* page automatically.
4444
*
45+
* <p> Here is another example that handles JSON messages:
46+
* <pre>{@code
47+
* page.routeWebSocket("wss://example.com/ws", ws -> {
48+
* ws.onMessage(message -> {
49+
* JsonObject json = new JsonParser().parse(message).getAsJsonObject();
50+
* if ("question".equals(json.get("request").getAsString())) {
51+
* Map<String, String> result = new HashMap();
52+
* result.put("response", "answer");
53+
* ws.send(gson.toJson(result));
54+
* }
55+
* });
56+
* });
57+
* }</pre>
58+
*
4559
* <p> <strong>Intercepting</strong>
4660
*
4761
* <p> Alternatively, you may want to connect to the actual server, but intercept messages in-between and modify or block them.

scripts/DRIVER_VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.48.0-beta-1727692967000
1+
1.48.1

0 commit comments

Comments
 (0)