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 { *
**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