From 5ccdd3e4b919515974860cd658976df9a5c77c36 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 27 Mar 2026 12:31:06 -0700 Subject: [PATCH] chore: roll to 1.59.0-alpha-1774622285000 (#1901) --- README.md | 2 +- .../com/microsoft/playwright/Debugger.java | 12 +- .../com/microsoft/playwright/Locator.java | 20 +++- .../com/microsoft/playwright/Overlay.java | 109 ++++++++++++++++++ .../java/com/microsoft/playwright/Page.java | 14 ++- .../playwright/impl/BrowserContextImpl.java | 1 - .../playwright/impl/DebuggerImpl.java | 17 +-- .../microsoft/playwright/impl/DialogImpl.java | 6 +- .../microsoft/playwright/impl/HARRouter.java | 23 +++- .../microsoft/playwright/impl/LocalUtils.java | 9 +- .../playwright/impl/LocatorImpl.java | 4 +- .../playwright/impl/OverlayImpl.java | 68 +++++++++++ .../microsoft/playwright/impl/PageImpl.java | 7 ++ .../playwright/impl/ResponseImpl.java | 7 +- .../playwright/impl/Serialization.java | 2 +- .../playwright/impl/TracingImpl.java | 15 ++- .../microsoft/playwright/impl/VideoImpl.java | 13 ++- .../playwright/options/Annotate.java | 28 ++++- .../playwright/options/AnnotatePosition.java | 26 +++++ .../microsoft/playwright/TestDebugger.java | 90 +++++++++------ .../com/microsoft/playwright/TestOverlay.java | 99 ++++++++++++++++ .../playwright/TestPageNetworkResponse.java | 29 +++++ scripts/DRIVER_VERSION | 2 +- 23 files changed, 528 insertions(+), 75 deletions(-) create mode 100644 playwright/src/main/java/com/microsoft/playwright/Overlay.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/OverlayImpl.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/options/AnnotatePosition.java create mode 100644 playwright/src/test/java/com/microsoft/playwright/TestOverlay.java diff --git a/README.md b/README.md index 07a7206b..c93f7ed2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 146.0.7680.31 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 147.0.7727.15 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 26.0 | ✅ | ✅ | ✅ | | Firefox 148.0.2 | :white_check_mark: | :white_check_mark: | :white_check_mark: | diff --git a/playwright/src/main/java/com/microsoft/playwright/Debugger.java b/playwright/src/main/java/com/microsoft/playwright/Debugger.java index 4b50975d..633f9518 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Debugger.java +++ b/playwright/src/main/java/com/microsoft/playwright/Debugger.java @@ -35,11 +35,11 @@ public interface Debugger { void offPausedStateChanged(Runnable handler); /** - * Returns details about the currently paused calls. Returns an empty array if the debugger is not paused. + * Returns details about the currently paused call. Returns {@code null} if the debugger is not paused. * * @since v1.59 */ - List pausedDetails(); + PausedDetails pausedDetails(); /** * Configures the debugger to pause before the next action is executed. * @@ -47,13 +47,13 @@ public interface Debugger { * com.microsoft.playwright.Debugger#runTo Debugger.runTo()} to step while paused. * *

Note that {@link com.microsoft.playwright.Page#pause Page.pause()} is equivalent to a "debugger" statement — it pauses - * execution at the call site immediately. On the contrary, {@link com.microsoft.playwright.Debugger#pause - * Debugger.pause()} is equivalent to "pause on next statement" — it configures the debugger to pause before the next - * action is executed. + * execution at the call site immediately. On the contrary, {@link com.microsoft.playwright.Debugger#requestPause + * Debugger.requestPause()} is equivalent to "pause on next statement" — it configures the debugger to pause before the + * next action is executed. * * @since v1.59 */ - void pause(); + void requestPause(); /** * Resumes script execution. Throws if the debugger is not paused. * diff --git a/playwright/src/main/java/com/microsoft/playwright/Locator.java b/playwright/src/main/java/com/microsoft/playwright/Locator.java index e05d86c9..f4fe3439 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Locator.java +++ b/playwright/src/main/java/com/microsoft/playwright/Locator.java @@ -35,8 +35,8 @@ public interface Locator { */ public Integer depth; /** - * When set to {@code "ai"}, returns a snapshot optimized for AI consumption with element references. Defaults to {@code - * "default"}. + * When set to {@code "ai"}, returns a snapshot optimized for AI consumption. Defaults to {@code "default"}. See details + * for more information. */ public AriaSnapshotMode mode; /** @@ -55,8 +55,8 @@ public interface Locator { return this; } /** - * When set to {@code "ai"}, returns a snapshot optimized for AI consumption with element references. Defaults to {@code - * "default"}. + * When set to {@code "ai"}, returns a snapshot optimized for AI consumption. Defaults to {@code "default"}. See details + * for more information. */ public AriaSnapshotOptions setMode(AriaSnapshotMode mode) { this.mode = mode; @@ -2322,6 +2322,12 @@ public interface Locator { * *

Below is the HTML markup and the respective ARIA snapshot: * + *

An AI-optimized snapshot, controlled by {@code mode}, is different from a default snapshot: + *

    + *
  1. Includes element references {@code [ref=e2]}. 2. Does not wait for an element matching the locator, and throws when no + * elements match. 3. Includes snapshots of {@code