diff --git a/README.md b/README.md index 0ce5eaa8a..0f1c0e545 100644 --- a/README.md +++ b/README.md @@ -11,9 +11,9 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 107.0.5304.18 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 107.0.5304.62 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 16.0 | ✅ | ✅ | ✅ | -| Firefox 105.0.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Firefox 106.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/next/intro/#system-requirements) for details. diff --git a/driver-bundle/src/test/java/com/microsoft/playwright/impl/driver/jar/TestInstall.java b/driver-bundle/src/test/java/com/microsoft/playwright/impl/driver/jar/TestInstall.java index 671284eba..f68416479 100644 --- a/driver-bundle/src/test/java/com/microsoft/playwright/impl/driver/jar/TestInstall.java +++ b/driver-bundle/src/test/java/com/microsoft/playwright/impl/driver/jar/TestInstall.java @@ -17,13 +17,11 @@ package com.microsoft.playwright.impl.driver.jar; import com.microsoft.playwright.impl.driver.Driver; -import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; import java.io.IOException; -import java.lang.reflect.Field; import java.net.ServerSocket; import java.net.URISyntaxException; import java.nio.charset.StandardCharsets; diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java index 8f4f54b86..193b29228 100644 --- a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java +++ b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java @@ -185,7 +185,8 @@ class RouteFromHAROptions { */ public HarNotFound notFound; /** - * If specified, updates the given HAR with the actual network information instead of serving from file. + * If specified, updates the given HAR with the actual network information instead of serving from file. The file is + * written to disk when {@link BrowserContext#close BrowserContext.close()} is called. */ public Boolean update; /** @@ -207,7 +208,8 @@ public RouteFromHAROptions setNotFound(HarNotFound notFound) { return this; } /** - * If specified, updates the given HAR with the actual network information instead of serving from file. + * If specified, updates the given HAR with the actual network information instead of serving from file. The file is + * written to disk when {@link BrowserContext#close BrowserContext.close()} is called. */ public RouteFromHAROptions setUpdate(boolean update) { this.update = update; diff --git a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java index 2e6ed98b3..d8ed26bfa 100644 --- a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java +++ b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java @@ -138,6 +138,52 @@ public CheckOptions setTrial(boolean trial) { return this; } } + class ClearOptions { + /** + * Whether to bypass the actionability checks. Defaults to + * {@code false}. + */ + public Boolean force; + /** + * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can + * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to + * inaccessible pages. Defaults to {@code false}. + */ + public Boolean noWaitAfter; + /** + * Maximum time in milliseconds, defaults to 30 seconds, pass {@code 0} to disable timeout. The default value can be changed by + * using the {@link BrowserContext#setDefaultTimeout BrowserContext.setDefaultTimeout()} or {@link Page#setDefaultTimeout + * Page.setDefaultTimeout()} methods. + */ + public Double timeout; + + /** + * Whether to bypass the actionability checks. Defaults to + * {@code false}. + */ + public ClearOptions setForce(boolean force) { + this.force = force; + return this; + } + /** + * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can + * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to + * inaccessible pages. Defaults to {@code false}. + */ + public ClearOptions setNoWaitAfter(boolean noWaitAfter) { + this.noWaitAfter = noWaitAfter; + return this; + } + /** + * Maximum time in milliseconds, defaults to 30 seconds, pass {@code 0} to disable timeout. The default value can be changed by + * using the {@link BrowserContext#setDefaultTimeout BrowserContext.setDefaultTimeout()} or {@link Page#setDefaultTimeout + * Page.setDefaultTimeout()} methods. + */ + public ClearOptions setTimeout(double timeout) { + this.timeout = timeout; + return this; + } + } class ClickOptions { /** * Defaults to {@code left}. @@ -438,6 +484,12 @@ class HoverOptions { * modifiers back. If not specified, currently pressed modifiers are used. */ public List modifiers; + /** + * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can + * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to + * inaccessible pages. Defaults to {@code false}. + */ + public Boolean noWaitAfter; /** * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the * element. @@ -472,6 +524,15 @@ public HoverOptions setModifiers(List modifiers) { this.modifiers = modifiers; return this; } + /** + * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can + * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to + * inaccessible pages. Defaults to {@code false}. + */ + public HoverOptions setNoWaitAfter(boolean noWaitAfter) { + this.noWaitAfter = noWaitAfter; + return this; + } /** * A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the * element. @@ -607,7 +668,7 @@ class ScreenshotOptions { public Integer quality; /** * When set to {@code "css"}, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * *

Defaults to {@code "device"}. @@ -680,7 +741,7 @@ public ScreenshotOptions setQuality(int quality) { } /** * When set to {@code "css"}, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will - * keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenhots of + * keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenshots of * high-dpi devices will be twice as large or even larger. * *

Defaults to {@code "device"}. @@ -1269,6 +1330,28 @@ default void check() { * zero timeout disables this. */ void check(CheckOptions options); + /** + * This method waits for actionability checks, focuses the + * element, clears it and triggers an {@code input} event after clearing. + * + *

If the target element is not an {@code }, {@code