diff --git a/README.md b/README.md index 2fa79d45b..e0e06d3cd 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 f046e8f47..83be107de 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 @@ default void scrollIntoViewIfNeeded() { * *
**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 @@ default ListselectOption(String values) { * * **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 @@ default ListselectOption(String values) { * * **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 @@ default ListselectOption(ElementHandle values) { * * **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 @@ default ListselectOption(ElementHandle values) { * * **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 @@ default ListselectOption(String[] values) { * * **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 @@ default ListselectOption(String[] values) { * * **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 @@ default ListselectOption(SelectOption values) { * * **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 @@ default ListselectOption(SelectOption values) { * * **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 @@ default ListselectOption(ElementHandle[] values) { * * **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 @@ default ListselectOption(ElementHandle[] values) { * * **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 @@ default ListselectOption(SelectOption[] values) { * * **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 bf3857f69..ca6bf5a56 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 @@ default ElementHandle querySelector(String selector) { * ***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 @@ default ListselectOption(String selector, String values) { * * **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 @@ default ListselectOption(String selector, String values) { * * **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 @@ default ListselectOption(String selector, ElementHandle values) { * * **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 @@ default ListselectOption(String selector, ElementHandle values) { * * **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 @@ default ListselectOption(String selector, String[] values) { * * **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 @@ default ListselectOption(String selector, String[] values) { * * **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 @@ default ListselectOption(String selector, SelectOption values) { * * **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 @@ default ListselectOption(String selector, SelectOption values) { * * **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 @@ default ListselectOption(String selector, ElementHandle[] values) { * * **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 @@ default ListselectOption(String selector, ElementHandle[] values) { * * **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 @@ default ListselectOption(String selector, SelectOption[] values) { * * **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 44cb69323..455fd77cb 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 WaitForOptions setTimeout(double timeout) { /** * 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 WaitForOptions setTimeout(double timeout) { /** * 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 @@ default void click() { /** * 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 @@ default void focus() { /** * 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 @@ default String getAttribute(String name) { /** * 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 @@ default String innerHTML() { * 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 @@ default String innerText() { * 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