From 6cb9f609884faccc3f56be11c7fffa9e31f8f710 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Tue, 9 Aug 2022 14:07:53 -0700 Subject: [PATCH] chore: roll driver to 1.25.0-alpha-1659998098000 (#1025) --- README.md | 2 +- .../assertions/LocatorAssertions.java | 376 ++++++++++++++++-- scripts/CLI_VERSION | 2 +- 3 files changed, 346 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index c93c8ca0..ba62cf4c 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom | | Linux | macOS | Windows | | :--- | :---: | :---: | :---: | -| Chromium 104.0.5112.81 | :white_check_mark: | :white_check_mark: | :white_check_mark: | +| Chromium 105.0.5195.19 | :white_check_mark: | :white_check_mark: | :white_check_mark: | | WebKit 16.0 | ✅ | ✅ | ✅ | | Firefox 103.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: | 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 73d5c75a..6bba9cf5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java +++ b/playwright/src/main/java/com/microsoft/playwright/assertions/LocatorAssertions.java @@ -498,9 +498,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -515,9 +535,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -530,9 +570,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -547,9 +607,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -562,9 +642,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -579,9 +679,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -594,9 +714,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -611,9 +751,29 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).containsText("substring"); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. Elements from a **subset** of this list contain text from the expected array, respectively.
  4. + *
  5. The matching subset of elements has the same order as the expected array.
  6. + *
  7. Each text value from the expected array is matched by some element from the list.
  8. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .list-item")).containsText(new String[] {"Text 1", "Text 4", "Text 5"});
+   * // ✓ Contains the right items in the right order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
+   *
+   * // ✖ No item contains this text
+   * assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -934,9 +1094,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -951,9 +1130,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -966,9 +1164,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -983,9 +1200,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -998,9 +1234,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -1015,9 +1270,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -1030,9 +1304,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. @@ -1047,9 +1340,28 @@ public interface LocatorAssertions { * assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*")); * } * - *

Note that if array is passed as an expected value, entire lists of elements can be asserted: + *

If you pass an array as an expected value, the expectations are: + *

    + *
  1. Locator resolves to a list of elements.
  2. + *
  3. The number of elements equals the number of expected values in the array.
  4. + *
  5. Elements from the list have text matching expected array values, one by one, in order.
  6. + *
+ * + *

For example, consider the following list: + * + *

Let's see how we can use the assertion: *

{@code
-   * assertThat(page.locator("list > .component")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   * // ✓ Has the right items in the right order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
+   *
+   * // ✖ Wrong order
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
+   *
+   * // ✖ Last item does not match
+   * assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
+   *
+   * // ✖ Locator points to the outer list element, not to the list items
+   * assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
    * }
* * @param expected Expected substring or RegExp or a list of those. diff --git a/scripts/CLI_VERSION b/scripts/CLI_VERSION index 12d433f1..85e87281 100644 --- a/scripts/CLI_VERSION +++ b/scripts/CLI_VERSION @@ -1 +1 @@ -1.25.0-alpha-1659639526000 +1.25.0-alpha-1659998098000