diff --git a/README.md b/README.md index 9093b4f2..60ae6cab 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 121.0.6167.16 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 121.0.6167.57 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 17.4 | ✅ | ✅ | ✅ | -| Firefox 120.0.1 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Firefox 121.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/ElementHandle.java b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java index 3dfb2a8d..cd7cb3ca 100644 --- a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java +++ b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java @@ -2546,8 +2546,7 @@ public interface ElementHandle extends JSHandle { *
  • {@code "visible"} Wait until the element is visible.
  • *
  • {@code "hidden"} Wait until the element is not - * visible or not attached. Note that waiting for - * hidden does not throw when the element detaches.
  • + * visible or not attached. Note that waiting for hidden does not throw when the element detaches. *
  • {@code "stable"} Wait until the element is both visible and stable.
  • @@ -2577,8 +2576,7 @@ public interface ElementHandle extends JSHandle { *
  • {@code "visible"} Wait until the element is visible.
  • *
  • {@code "hidden"} Wait until the element is not - * visible or not attached. Note that waiting for - * hidden does not throw when the element detaches.
  • + * visible or not attached. Note that waiting for hidden does not throw when the element detaches. *
  • {@code "stable"} Wait until the element is both visible and stable.
  • diff --git a/playwright/src/main/java/com/microsoft/playwright/Tracing.java b/playwright/src/main/java/com/microsoft/playwright/Tracing.java index 2376d7d0..01c5d888 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Tracing.java +++ b/playwright/src/main/java/com/microsoft/playwright/Tracing.java @@ -38,8 +38,9 @@ import java.nio.file.Path; public interface Tracing { class StartOptions { /** - * If specified, the trace is going to be saved into the file with the given name inside the {@code tracesDir} folder - * specified in {@link BrowserType#launch BrowserType.launch()}. + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the {@code + * tracesDir} folder specified in {@link BrowserType#launch BrowserType.launch()}. To specify the final trace zip file + * name, you need to pass {@code path} option to {@link Tracing#stop Tracing.stop()} instead. */ public String name; /** @@ -66,8 +67,9 @@ public interface Tracing { public String title; /** - * If specified, the trace is going to be saved into the file with the given name inside the {@code tracesDir} folder - * specified in {@link BrowserType#launch BrowserType.launch()}. + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the {@code + * tracesDir} folder specified in {@link BrowserType#launch BrowserType.launch()}. To specify the final trace zip file + * name, you need to pass {@code path} option to {@link Tracing#stop Tracing.stop()} instead. */ public StartOptions setName(String name) { this.name = name; @@ -110,8 +112,9 @@ public interface Tracing { } class StartChunkOptions { /** - * If specified, the trace is going to be saved into the file with the given name inside the {@code tracesDir} folder - * specified in {@link BrowserType#launch BrowserType.launch()}. + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the {@code + * tracesDir} folder specified in {@link BrowserType#launch BrowserType.launch()}. To specify the final trace zip file + * name, you need to pass {@code path} option to {@link Tracing#stopChunk Tracing.stopChunk()} instead. */ public String name; /** @@ -120,8 +123,9 @@ public interface Tracing { public String title; /** - * If specified, the trace is going to be saved into the file with the given name inside the {@code tracesDir} folder - * specified in {@link BrowserType#launch BrowserType.launch()}. + * If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the {@code + * tracesDir} folder specified in {@link BrowserType#launch BrowserType.launch()}. To specify the final trace zip file + * name, you need to pass {@code path} option to {@link Tracing#stopChunk Tracing.stopChunk()} instead. */ public StartChunkOptions setName(String name) { this.name = name; diff --git a/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java b/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java index f3441965..a941f760 100644 --- a/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java +++ b/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java @@ -427,8 +427,8 @@ public interface LocatorAssertions { */ LocatorAssertions not(); /** - * Ensures that {@code Locator} points to an attached - * DOM node. + * Ensures that {@code Locator} points to an element that is connected to a Document or a ShadowRoot. * *

    **Usage** *

    {@code
    @@ -441,8 +441,8 @@ public interface LocatorAssertions {
         isAttached(null);
       }
       /**
    -   * Ensures that {@code Locator} points to an attached
    -   * DOM node.
    +   * Ensures that {@code Locator} points to an element that is connected to a Document or a ShadowRoot.
        *
        * 

    **Usage** *

    {@code
    @@ -671,8 +671,8 @@ public interface LocatorAssertions {
        */
       void isInViewport(IsInViewportOptions options);
       /**
    -   * Ensures that {@code Locator} points to an attached
    -   * and visible DOM node.
    +   * Ensures that {@code Locator} points to an attached and visible DOM node.
        *
        * 

    To check that at least one element from the list is visible, use {@link Locator#first Locator.first()}. * @@ -698,8 +698,8 @@ public interface LocatorAssertions { isVisible(null); } /** - * Ensures that {@code Locator} points to an attached - * and visible DOM node. + * Ensures that {@code Locator} points to an attached and visible DOM node. * *

    To check that at least one element from the list is visible, use {@link Locator#first Locator.first()}. * @@ -723,8 +723,8 @@ public interface LocatorAssertions { */ void isVisible(IsVisibleOptions options); /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -768,8 +768,8 @@ public interface LocatorAssertions { containsText(expected, null); } /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -811,8 +811,8 @@ public interface LocatorAssertions { */ void containsText(String expected, ContainsTextOptions options); /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -856,8 +856,8 @@ public interface LocatorAssertions { containsText(expected, null); } /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -899,8 +899,8 @@ public interface LocatorAssertions { */ void containsText(Pattern expected, ContainsTextOptions options); /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -944,8 +944,8 @@ public interface LocatorAssertions { containsText(expected, null); } /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -987,8 +987,8 @@ public interface LocatorAssertions { */ void containsText(String[] expected, ContainsTextOptions options); /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1032,8 +1032,8 @@ public interface LocatorAssertions { containsText(expected, null); } /** - * Ensures the {@code Locator} points to an element that contains the given text. You can use regular expressions for the - * value as well. + * Ensures the {@code Locator} points to an element that contains the given text. All nested elements will be considered + * when computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1455,8 +1455,8 @@ public interface LocatorAssertions { */ void hasJSProperty(String name, Object value, HasJSPropertyOptions options); /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1500,8 +1500,8 @@ public interface LocatorAssertions { hasText(expected, null); } /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1543,8 +1543,8 @@ public interface LocatorAssertions { */ void hasText(String expected, HasTextOptions options); /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1588,8 +1588,8 @@ public interface LocatorAssertions { hasText(expected, null); } /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1631,8 +1631,8 @@ public interface LocatorAssertions { */ void hasText(Pattern expected, HasTextOptions options); /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1676,8 +1676,8 @@ public interface LocatorAssertions { hasText(expected, null); } /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1719,8 +1719,8 @@ public interface LocatorAssertions { */ void hasText(String[] expected, HasTextOptions options); /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * @@ -1764,8 +1764,8 @@ public interface LocatorAssertions { hasText(expected, null); } /** - * Ensures the {@code Locator} points to an element with the given text. You can use regular expressions for the value as - * well. + * Ensures the {@code Locator} points to an element with the given text. All nested elements will be considered when + * computing the text content of the element. You can use regular expressions for the value as well. * *

    **Details** * diff --git a/playwright/src/main/java/com/microsoft/playwright/options/FormData.java b/playwright/src/main/java/com/microsoft/playwright/options/FormData.java index 686422ef..82459869 100644 --- a/playwright/src/main/java/com/microsoft/playwright/options/FormData.java +++ b/playwright/src/main/java/com/microsoft/playwright/options/FormData.java @@ -42,6 +42,19 @@ public interface FormData { } /** * Sets a field on the form. File values can be passed either as {@code Path} or as {@code FilePayload}. + *

    {@code
    +   * import com.microsoft.playwright.options.FormData;
    +   * ...
    +   * FormData form = FormData.create()
    +   *     // Only name and value are set.
    +   *     .set("firstName", "John")
    +   *     // Name and value are set, filename and Content-Type are inferred from the file path.
    +   *     .set("profilePicture1", Paths.get("john.jpg"))
    +   *     // Name, value, filename and Content-Type are set.
    +   *     .set("profilePicture2", new FilePayload("john.jpg", "image/jpeg", Files.readAllBytes(Paths.get("john.jpg"))));
    +   *     .set("age", 30);
    +   * page.request().post("http://localhost/submit", RequestOptions.create().setForm(form));
    +   * }
    * * @param name Field name. * @param value Field value. @@ -50,6 +63,19 @@ public interface FormData { FormData set(String name, String value); /** * Sets a field on the form. File values can be passed either as {@code Path} or as {@code FilePayload}. + *
    {@code
    +   * import com.microsoft.playwright.options.FormData;
    +   * ...
    +   * FormData form = FormData.create()
    +   *     // Only name and value are set.
    +   *     .set("firstName", "John")
    +   *     // Name and value are set, filename and Content-Type are inferred from the file path.
    +   *     .set("profilePicture1", Paths.get("john.jpg"))
    +   *     // Name, value, filename and Content-Type are set.
    +   *     .set("profilePicture2", new FilePayload("john.jpg", "image/jpeg", Files.readAllBytes(Paths.get("john.jpg"))));
    +   *     .set("age", 30);
    +   * page.request().post("http://localhost/submit", RequestOptions.create().setForm(form));
    +   * }
    * * @param name Field name. * @param value Field value. @@ -58,6 +84,19 @@ public interface FormData { FormData set(String name, boolean value); /** * Sets a field on the form. File values can be passed either as {@code Path} or as {@code FilePayload}. + *
    {@code
    +   * import com.microsoft.playwright.options.FormData;
    +   * ...
    +   * FormData form = FormData.create()
    +   *     // Only name and value are set.
    +   *     .set("firstName", "John")
    +   *     // Name and value are set, filename and Content-Type are inferred from the file path.
    +   *     .set("profilePicture1", Paths.get("john.jpg"))
    +   *     // Name, value, filename and Content-Type are set.
    +   *     .set("profilePicture2", new FilePayload("john.jpg", "image/jpeg", Files.readAllBytes(Paths.get("john.jpg"))));
    +   *     .set("age", 30);
    +   * page.request().post("http://localhost/submit", RequestOptions.create().setForm(form));
    +   * }
    * * @param name Field name. * @param value Field value. @@ -66,6 +105,19 @@ public interface FormData { FormData set(String name, int value); /** * Sets a field on the form. File values can be passed either as {@code Path} or as {@code FilePayload}. + *
    {@code
    +   * import com.microsoft.playwright.options.FormData;
    +   * ...
    +   * FormData form = FormData.create()
    +   *     // Only name and value are set.
    +   *     .set("firstName", "John")
    +   *     // Name and value are set, filename and Content-Type are inferred from the file path.
    +   *     .set("profilePicture1", Paths.get("john.jpg"))
    +   *     // Name, value, filename and Content-Type are set.
    +   *     .set("profilePicture2", new FilePayload("john.jpg", "image/jpeg", Files.readAllBytes(Paths.get("john.jpg"))));
    +   *     .set("age", 30);
    +   * page.request().post("http://localhost/submit", RequestOptions.create().setForm(form));
    +   * }
    * * @param name Field name. * @param value Field value. @@ -74,6 +126,19 @@ public interface FormData { FormData set(String name, Path value); /** * Sets a field on the form. File values can be passed either as {@code Path} or as {@code FilePayload}. + *
    {@code
    +   * import com.microsoft.playwright.options.FormData;
    +   * ...
    +   * FormData form = FormData.create()
    +   *     // Only name and value are set.
    +   *     .set("firstName", "John")
    +   *     // Name and value are set, filename and Content-Type are inferred from the file path.
    +   *     .set("profilePicture1", Paths.get("john.jpg"))
    +   *     // Name, value, filename and Content-Type are set.
    +   *     .set("profilePicture2", new FilePayload("john.jpg", "image/jpeg", Files.readAllBytes(Paths.get("john.jpg"))));
    +   *     .set("age", 30);
    +   * page.request().post("http://localhost/submit", RequestOptions.create().setForm(form));
    +   * }
    * * @param name Field name. * @param value Field value. diff --git a/scripts/CLI_VERSION b/scripts/CLI_VERSION index 94b9fbd7..91a9f1ec 100644 --- a/scripts/CLI_VERSION +++ b/scripts/CLI_VERSION @@ -1 +1 @@ -1.41.0-alpha-1702670966000 +1.41.0-beta-1705429643000