From 91e70280a36c3e860071515fcf9f03ea039966da Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 11 Oct 2023 12:39:37 -0700 Subject: [PATCH] chore: update driver to 1.39.0-beta (Oct 11) (#1403) --- README.md | 6 +- .../microsoft/playwright/ElementHandle.java | 24 +++--- .../java/com/microsoft/playwright/Frame.java | 24 +++--- .../com/microsoft/playwright/Locator.java | 85 +++++++++++++++++++ .../java/com/microsoft/playwright/Page.java | 36 ++++---- .../com/microsoft/playwright/WebError.java | 2 +- .../assertions/LocatorAssertions.java | 26 ++++++ .../playwright/impl/BrowserContextImpl.java | 3 +- .../playwright/impl/BrowserImpl.java | 2 +- .../playwright/impl/BrowserTypeImpl.java | 4 +- .../playwright/impl/ChannelOwner.java | 15 +++- .../microsoft/playwright/impl/Connection.java | 6 +- .../playwright/impl/ConsoleMessageImpl.java | 9 +- .../impl/LocatorAssertionsImpl.java | 2 +- .../playwright/impl/PlaywrightImpl.java | 5 -- .../playwright/impl/TracingImpl.java | 24 ++---- .../playwright/TestPageKeyboard.java | 6 +- .../playwright/TestPageNetworkRequest.java | 10 +++ .../microsoft/playwright/TestPageRoute.java | 2 +- .../playwright/TestPageSetInputFiles.java | 5 +- .../com/microsoft/playwright/TestVideo.java | 24 ++++++ .../java/com/microsoft/playwright/Utils.java | 15 ++++ scripts/CLI_VERSION | 2 +- 23 files changed, 241 insertions(+), 96 deletions(-) create mode 100644 playwright/src/test/java/com/microsoft/playwright/TestVideo.java diff --git a/README.md b/README.md index 2fa79d45..e0e06d3c 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 117.0.5938.62 | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| WebKit 17.0 | ✅ | ✅ | ✅ | -| Firefox 117.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 119.0.6045.9 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| WebKit 17.4 | ✅ | ✅ | ✅ | +| Firefox 118.0.1 | :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/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java index f046e8f4..83be107d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java +++ b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java @@ -1878,7 +1878,7 @@ public interface ElementHandle extends JSHandle { * *

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -1909,7 +1909,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -1938,7 +1938,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -1969,7 +1969,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -1998,7 +1998,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2029,7 +2029,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2058,7 +2058,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2089,7 +2089,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2118,7 +2118,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2149,7 +2149,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2178,7 +2178,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
@@ -2209,7 +2209,7 @@ public interface ElementHandle extends JSHandle {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * handle.selectOption("blue");
    * // single selection matching the label
    * handle.selectOption(new SelectOption().setLabel("Blue"));
diff --git a/playwright/src/main/java/com/microsoft/playwright/Frame.java b/playwright/src/main/java/com/microsoft/playwright/Frame.java
index bf3857f6..ca6bf5a5 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Frame.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Frame.java
@@ -4058,7 +4058,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4091,7 +4091,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4122,7 +4122,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4155,7 +4155,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4186,7 +4186,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4219,7 +4219,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4250,7 +4250,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4283,7 +4283,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4314,7 +4314,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4347,7 +4347,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4378,7 +4378,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
@@ -4411,7 +4411,7 @@ public interface Frame {
    *
    * 

**Usage** *

{@code
-   * // single selection matching the value
+   * // Single selection matching the value or label
    * frame.selectOption("select#colors", "blue");
    * // single selection matching both the value and the label
    * frame.selectOption("select#colors", new SelectOption().setLabel("Blue"));
diff --git a/playwright/src/main/java/com/microsoft/playwright/Locator.java b/playwright/src/main/java/com/microsoft/playwright/Locator.java
index 44cb6932..455fd77c 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Locator.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Locator.java
@@ -2096,6 +2096,10 @@ public interface Locator {
   /**
    * Returns an array of {@code node.innerText} values for all matching nodes.
    *
+   * 

NOTE: If you need to assert text on the page, prefer {@link LocatorAssertions#hasText LocatorAssertions.hasText()} with {@code + * useInnerText} option to avoid flakiness. See assertions + * guide for more details. + * *

**Usage** *

{@code
    * String[] texts = page.getByRole(AriaRole.LINK).allInnerTexts();
@@ -2107,6 +2111,9 @@ public interface Locator {
   /**
    * Returns an array of {@code node.textContent} values for all matching nodes.
    *
+   * 

NOTE: If you need to assert text on the page, prefer {@link LocatorAssertions#hasText LocatorAssertions.hasText()} to avoid + * flakiness. See assertions guide for more details. + * *

**Usage** *

{@code
    * String[] texts = page.getByRole(AriaRole.LINK).allTextContents();
@@ -2380,6 +2387,10 @@ public interface Locator {
   /**
    * Returns the number of elements matching the locator.
    *
+   * 

NOTE: If you need to assert the number of elements on the page, prefer {@link LocatorAssertions#hasCount + * LocatorAssertions.hasCount()} to avoid flakiness. See assertions guide for more details. + * *

**Usage** *

{@code
    * int count = page.getByRole(AriaRole.LISTITEM).count();
@@ -2986,6 +2997,10 @@ public interface Locator {
   /**
    * Returns the matching element's attribute value.
    *
+   * 

NOTE: If you need to assert an element's attribute, prefer {@link LocatorAssertions#hasAttribute + * LocatorAssertions.hasAttribute()} to avoid flakiness. See assertions guide for more details. + * * @param name Attribute name to get the value for. * @since v1.14 */ @@ -2995,6 +3010,10 @@ public interface Locator { /** * Returns the matching element's attribute value. * + *

NOTE: If you need to assert an element's attribute, prefer {@link LocatorAssertions#hasAttribute + * LocatorAssertions.hasAttribute()} to avoid flakiness. See assertions guide for more details. + * * @param name Attribute name to get the value for. * @since v1.14 */ @@ -3634,6 +3653,10 @@ public interface Locator { * Returns the {@code * element.innerText}. * + *

NOTE: If you need to assert text on the page, prefer {@link LocatorAssertions#hasText LocatorAssertions.hasText()} with {@code + * useInnerText} option to avoid flakiness. See assertions + * guide for more details. + * * @since v1.14 */ default String innerText() { @@ -3643,12 +3666,19 @@ public interface Locator { * Returns the {@code * element.innerText}. * + *

NOTE: If you need to assert text on the page, prefer {@link LocatorAssertions#hasText LocatorAssertions.hasText()} with {@code + * useInnerText} option to avoid flakiness. See assertions + * guide for more details. + * * @since v1.14 */ String innerText(InnerTextOptions options); /** * Returns the value for the matching {@code } or {@code