From 015939b150ae3c3e2df324c016121809bdfd861f Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 17 Jan 2025 09:21:19 -0800 Subject: [PATCH] feat: roll driver to 1.50 alpha (#1729) --- README.md | 4 +- .../com/microsoft/playwright/Browser.java | 16 +- .../microsoft/playwright/BrowserContext.java | 18 +- .../com/microsoft/playwright/BrowserType.java | 66 ++++-- .../java/com/microsoft/playwright/Clock.java | 39 ++++ .../com/microsoft/playwright/Locator.java | 21 +- .../java/com/microsoft/playwright/Page.java | 6 +- .../com/microsoft/playwright/Tracing.java | 8 +- .../assertions/LocatorAssertions.java | 204 ++++++++++++++---- .../playwright/impl/AssertionsBase.java | 6 +- .../impl/LocatorAssertionsImpl.java | 51 ++++- .../playwright/impl/RequestImpl.java | 1 + .../playwright/impl/ResponseImpl.java | 1 + .../playwright/TestLocatorAssertions.java | 25 ++- .../playwright/TestLocatorAssertions2.java | 82 ++++++- .../com/microsoft/playwright/TestPdf.java | 3 - .../com/microsoft/playwright/TestTracing.java | 21 ++ scripts/DRIVER_VERSION | 2 +- 18 files changed, 459 insertions(+), 115 deletions(-) diff --git a/README.md b/README.md index af58b7c9..7141dbd7 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,9 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 131.0.6778.33 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 132.0.6834.57 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 18.2 | ✅ | ✅ | ✅ | -| Firefox 132.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Firefox 134.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | 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. diff --git a/playwright/src/main/java/com/microsoft/playwright/Browser.java b/playwright/src/main/java/com/microsoft/playwright/Browser.java index 2860249f..3b32211e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Browser.java +++ b/playwright/src/main/java/com/microsoft/playwright/Browser.java @@ -1225,10 +1225,10 @@ public interface Browser extends AutoCloseable { *

In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the * browser server. * - *

NOTE: This is similar to force quitting the browser. Therefore, you should call {@link - * com.microsoft.playwright.BrowserContext#close BrowserContext.close()} on any {@code BrowserContext}'s you explicitly - * created earlier with {@link com.microsoft.playwright.Browser#newContext Browser.newContext()} **before** calling {@link - * com.microsoft.playwright.Browser#close Browser.close()}. + *

NOTE: This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close events, call + * {@link com.microsoft.playwright.BrowserContext#close BrowserContext.close()} on any {@code BrowserContext} instances you + * explicitly created earlier using {@link com.microsoft.playwright.Browser#newContext Browser.newContext()} **before** + * calling {@link com.microsoft.playwright.Browser#close Browser.close()}. * *

The {@code Browser} object itself is considered to be disposed and cannot be used anymore. * @@ -1244,10 +1244,10 @@ public interface Browser extends AutoCloseable { *

In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the * browser server. * - *

NOTE: This is similar to force quitting the browser. Therefore, you should call {@link - * com.microsoft.playwright.BrowserContext#close BrowserContext.close()} on any {@code BrowserContext}'s you explicitly - * created earlier with {@link com.microsoft.playwright.Browser#newContext Browser.newContext()} **before** calling {@link - * com.microsoft.playwright.Browser#close Browser.close()}. + *

NOTE: This is similar to force-quitting the browser. To close pages gracefully and ensure you receive page close events, call + * {@link com.microsoft.playwright.BrowserContext#close BrowserContext.close()} on any {@code BrowserContext} instances you + * explicitly created earlier using {@link com.microsoft.playwright.Browser#newContext Browser.newContext()} **before** + * calling {@link com.microsoft.playwright.Browser#close Browser.close()}. * *

The {@code Browser} object itself is considered to be disposed and cannot be used anymore. * diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java index b0e7c9c9..d0ef2719 100644 --- a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java +++ b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java @@ -834,10 +834,14 @@ public interface BrowserContext extends AutoCloseable { * Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if * specified. * - * @param permissions A permission or an array of permissions to grant. Permissions can be one of the following values: + * @param permissions A list of permissions to grant. + * + *

NOTE: Supported permissions differ between browsers, and even between different versions of the same browser. Any permission + * may stop working after an update. + * + *

Here are some permissions that may be supported by some browsers: *