diff --git a/README.md b/README.md
index 1b2e0344..edc14637 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 127.0.6533.17 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
-| WebKit 17.4 | ✅ | ✅ | ✅ |
-| Firefox 127.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| Chromium 128.0.6613.7 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
+| WebKit 18.0 | ✅ | ✅ | ✅ |
+| Firefox 128.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/APIRequest.java b/playwright/src/main/java/com/microsoft/playwright/APIRequest.java
index fa0af534..32a87619 100644
--- a/playwright/src/main/java/com/microsoft/playwright/APIRequest.java
+++ b/playwright/src/main/java/com/microsoft/playwright/APIRequest.java
@@ -41,6 +41,22 @@ public interface APIRequest {
*
*/
public String baseURL;
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ *
Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public List clientCertificates;
/**
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
@@ -100,6 +116,25 @@ public interface APIRequest {
this.baseURL = baseURL;
return this;
}
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public NewContextOptions setClientCertificates(List clientCertificates) {
+ this.clientCertificates = clientCertificates;
+ return this;
+ }
/**
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
diff --git a/playwright/src/main/java/com/microsoft/playwright/Browser.java b/playwright/src/main/java/com/microsoft/playwright/Browser.java
index ceef5f6c..99757188 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Browser.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Browser.java
@@ -96,6 +96,22 @@ public interface Browser extends AutoCloseable {
* Toggles bypassing page's Content-Security-Policy. Defaults to {@code false}.
*/
public Boolean bypassCSP;
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public List clientCertificates;
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
@@ -295,6 +311,25 @@ public interface Browser extends AutoCloseable {
this.bypassCSP = bypassCSP;
return this;
}
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public NewContextOptions setClientCertificates(List clientCertificates) {
+ this.clientCertificates = clientCertificates;
+ return this;
+ }
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
@@ -626,6 +661,22 @@ public interface Browser extends AutoCloseable {
* Toggles bypassing page's Content-Security-Policy. Defaults to {@code false}.
*/
public Boolean bypassCSP;
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public List clientCertificates;
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
@@ -825,6 +876,25 @@ public interface Browser extends AutoCloseable {
this.bypassCSP = bypassCSP;
return this;
}
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public NewPageOptions setClientCertificates(List clientCertificates) {
+ this.clientCertificates = clientCertificates;
+ return this;
+ }
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java
index b566795a..16ddbf7b 100644
--- a/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java
+++ b/playwright/src/main/java/com/microsoft/playwright/BrowserContext.java
@@ -514,9 +514,6 @@ public interface BrowserContext extends AutoCloseable {
* browserContext.addCookies(Arrays.asList(cookieObject1, cookieObject2));
* }
*
- * @param cookies Adds cookies to the browser context.
- *
- * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com".
* @since v1.8
*/
void addCookies(List cookies);
diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java
index c21b3ef5..c58beecf 100644
--- a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java
+++ b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java
@@ -455,6 +455,22 @@ public interface BrowserType {
* Enable Chromium sandboxing. Defaults to {@code false}.
*/
public Boolean chromiumSandbox;
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public List clientCertificates;
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
@@ -742,6 +758,25 @@ public interface BrowserType {
this.chromiumSandbox = chromiumSandbox;
return this;
}
+ /**
+ * TLS Client Authentication allows the server to request a client certificate and verify it.
+ *
+ * Details
+ *
+ *
An array of client certificates to be used. Each certificate object must have both {@code certPath} and {@code keyPath}
+ * or a single {@code pfxPath} to load the client certificate. Optionally, {@code passphrase} property should be provided
+ * if the certficiate is encrypted. The {@code origin} property should be provided with an exact match to the request
+ * origin that the certificate is valid for.
+ *
+ *
NOTE: Using Client Certificates in combination with Proxy Servers is not supported.
+ *
+ *
NOTE: When using WebKit on macOS, accessing {@code localhost} will not pick up client certificates. You can make it work by
+ * replacing {@code localhost} with {@code local.playwright}.
+ */
+ public LaunchPersistentContextOptions setClientCertificates(List clientCertificates) {
+ this.clientCertificates = clientCertificates;
+ return this;
+ }
/**
* Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code
* "no-preference"}. See {@link com.microsoft.playwright.Page#emulateMedia Page.emulateMedia()} for more details. Passing
diff --git a/playwright/src/main/java/com/microsoft/playwright/Clock.java b/playwright/src/main/java/com/microsoft/playwright/Clock.java
index 668dfaab..4cd6e454 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Clock.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Clock.java
@@ -174,6 +174,7 @@ public interface Clock {
* page.clock().pauseAt("2020-02-02");
* }
*
+ * @param time Time to pause at.
* @since v1.45
*/
void pauseAt(long time);
@@ -193,6 +194,7 @@ public interface Clock {
* page.clock().pauseAt("2020-02-02");
* }
*
+ * @param time Time to pause at.
* @since v1.45
*/
void pauseAt(String time);
@@ -212,6 +214,7 @@ public interface Clock {
* page.clock().pauseAt("2020-02-02");
* }
*
+ * @param time Time to pause at.
* @since v1.45
*/
void pauseAt(Date time);
@@ -231,7 +234,7 @@ public interface Clock {
* page.clock().setFixedTime("2020-02-02");
* }
*
- * @param time Time to be set.
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(long time);
@@ -245,7 +248,7 @@ public interface Clock {
* page.clock().setFixedTime("2020-02-02");
* }
*
- * @param time Time to be set.
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(String time);
@@ -259,7 +262,7 @@ public interface Clock {
* page.clock().setFixedTime("2020-02-02");
* }
*
- * @param time Time to be set.
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(Date time);
@@ -273,6 +276,7 @@ public interface Clock {
* page.clock().setSystemTime("2020-02-02");
* }
*
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(long time);
@@ -286,6 +290,7 @@ public interface Clock {
* page.clock().setSystemTime("2020-02-02");
* }
*
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(String time);
@@ -299,6 +304,7 @@ public interface Clock {
* page.clock().setSystemTime("2020-02-02");
* }
*
+ * @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(Date time);
diff --git a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java
index 026dd87d..59ae8995 100644
--- a/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java
+++ b/playwright/src/main/java/com/microsoft/playwright/ElementHandle.java
@@ -65,9 +65,7 @@ public interface ElementHandle extends JSHandle {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -98,9 +96,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public CheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -166,9 +162,7 @@ public interface ElementHandle extends JSHandle {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -229,9 +223,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public ClickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -293,9 +285,7 @@ public interface ElementHandle extends JSHandle {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -349,9 +339,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DblclickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -399,9 +387,7 @@ public interface ElementHandle extends JSHandle {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -421,9 +407,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public FillOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -453,9 +437,7 @@ public interface ElementHandle extends JSHandle {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -495,9 +477,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public HoverOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -564,9 +544,7 @@ public interface ElementHandle extends JSHandle {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -585,9 +563,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public PressOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -801,9 +777,7 @@ public interface ElementHandle extends JSHandle {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -823,9 +797,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public SelectOptionOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -882,9 +854,7 @@ public interface ElementHandle extends JSHandle {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -915,9 +885,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetCheckedOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -960,9 +928,7 @@ public interface ElementHandle extends JSHandle {
}
class SetInputFilesOptions {
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -974,9 +940,7 @@ public interface ElementHandle extends JSHandle {
public Double timeout;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetInputFilesOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1006,9 +970,7 @@ public interface ElementHandle extends JSHandle {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1048,9 +1010,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TapOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1097,9 +1057,7 @@ public interface ElementHandle extends JSHandle {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1118,9 +1076,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TypeOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1144,9 +1100,7 @@ public interface ElementHandle extends JSHandle {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1177,9 +1131,7 @@ public interface ElementHandle extends JSHandle {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public UncheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1332,7 +1284,6 @@ public interface ElementHandle extends JSHandle {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -1355,7 +1306,6 @@ public interface ElementHandle extends JSHandle {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -1421,8 +1371,6 @@ public interface ElementHandle extends JSHandle {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -1445,8 +1393,6 @@ public interface ElementHandle extends JSHandle {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -1703,7 +1649,6 @@ public interface ElementHandle extends JSHandle {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -1724,7 +1669,6 @@ public interface ElementHandle extends JSHandle {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -2340,7 +2284,6 @@ public interface ElementHandle extends JSHandle {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -2362,7 +2305,6 @@ public interface ElementHandle extends JSHandle {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -2501,7 +2443,6 @@ public interface ElementHandle extends JSHandle {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -2524,7 +2465,6 @@ public interface ElementHandle extends JSHandle {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -2572,7 +2512,6 @@ public interface ElementHandle extends JSHandle {
* force} option is set.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
@@ -2595,7 +2534,6 @@ public interface ElementHandle extends JSHandle {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
diff --git a/playwright/src/main/java/com/microsoft/playwright/FileChooser.java b/playwright/src/main/java/com/microsoft/playwright/FileChooser.java
index 73f945b0..2debd4ae 100644
--- a/playwright/src/main/java/com/microsoft/playwright/FileChooser.java
+++ b/playwright/src/main/java/com/microsoft/playwright/FileChooser.java
@@ -30,9 +30,7 @@ import java.nio.file.Path;
public interface FileChooser {
class SetFilesOptions {
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -44,9 +42,7 @@ public interface FileChooser {
public Double timeout;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetFilesOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
diff --git a/playwright/src/main/java/com/microsoft/playwright/Frame.java b/playwright/src/main/java/com/microsoft/playwright/Frame.java
index 7db04001..47f6c5f5 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Frame.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Frame.java
@@ -72,7 +72,7 @@ public interface Frame {
*/
public Path path;
/**
- * Script type. Use 'module' in order to load a Javascript ES6 module. See script for more details.
*/
public String type;
@@ -97,7 +97,7 @@ public interface Frame {
return this;
}
/**
- * Script type. Use 'module' in order to load a Javascript ES6 module. See script for more details.
*/
public AddScriptTagOptions setType(String type) {
@@ -157,9 +157,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -195,9 +193,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public CheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -271,9 +267,7 @@ public interface Frame {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -339,9 +333,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public ClickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -411,9 +403,7 @@ public interface Frame {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -472,9 +462,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DblclickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -563,9 +551,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -606,9 +592,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DragAndDropOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -695,9 +679,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -722,9 +704,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public FillOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1124,9 +1104,7 @@ public interface Frame {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1171,9 +1149,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public HoverOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1613,9 +1589,7 @@ public interface Frame {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -1639,9 +1613,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public PressOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1689,9 +1661,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -1716,9 +1686,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public SelectOptionOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1750,9 +1718,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1788,9 +1754,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetCheckedOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1890,9 +1854,7 @@ public interface Frame {
}
class SetInputFilesOptions {
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1909,9 +1871,7 @@ public interface Frame {
public Double timeout;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetInputFilesOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1949,9 +1909,7 @@ public interface Frame {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1996,9 +1954,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TapOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2086,9 +2042,7 @@ public interface Frame {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2112,9 +2066,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TypeOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2146,9 +2098,7 @@ public interface Frame {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2184,9 +2134,7 @@ public interface Frame {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public UncheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2531,7 +2479,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -2554,7 +2501,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -2625,9 +2571,8 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
- * specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
+ * specified {@code position}. if the first click of the {@code dblclick()} triggers a navigation event, this method will
+ * throw.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -2649,9 +2594,8 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
- * specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
+ * specified {@code position}. if the first click of the {@code dblclick()} triggers a navigation event, this method will
+ * throw.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -3831,7 +3775,6 @@ public interface Frame {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -3852,7 +3795,6 @@ public interface Frame {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -4568,7 +4510,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -4592,7 +4533,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -4753,7 +4693,6 @@ public interface Frame {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -4776,7 +4715,6 @@ public interface Frame {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -4842,7 +4780,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
@@ -4865,7 +4802,6 @@ public interface Frame {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
diff --git a/playwright/src/main/java/com/microsoft/playwright/Locator.java b/playwright/src/main/java/com/microsoft/playwright/Locator.java
index eef4643b..38acc39e 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Locator.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Locator.java
@@ -76,9 +76,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -109,9 +107,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public CheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -159,9 +155,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -181,9 +175,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public ClearOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -225,9 +217,7 @@ public interface Locator {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -288,9 +278,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public ClickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -352,9 +340,7 @@ public interface Locator {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -408,9 +394,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DblclickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -478,9 +462,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -516,9 +498,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DragToOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -641,9 +621,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -663,9 +641,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public FillOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1065,9 +1041,7 @@ public interface Locator {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1107,9 +1081,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public HoverOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1424,9 +1396,7 @@ public interface Locator {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -1445,9 +1415,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public PressOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1470,9 +1438,7 @@ public interface Locator {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1491,9 +1457,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public PressSequentiallyOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1707,9 +1671,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -1729,9 +1691,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public SelectOptionOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1788,9 +1748,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1821,9 +1779,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetCheckedOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1866,9 +1822,7 @@ public interface Locator {
}
class SetInputFilesOptions {
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1880,9 +1834,7 @@ public interface Locator {
public Double timeout;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetInputFilesOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1912,9 +1864,7 @@ public interface Locator {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1954,9 +1904,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TapOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2023,9 +1971,7 @@ public interface Locator {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2044,9 +1990,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TypeOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2070,9 +2014,7 @@ public interface Locator {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2103,9 +2045,7 @@ public interface Locator {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public UncheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2334,7 +2274,6 @@ public interface Locator {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -2366,7 +2305,6 @@ public interface Locator {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -2532,8 +2470,6 @@ public interface Locator {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -2560,8 +2496,6 @@ public interface Locator {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -3757,7 +3691,6 @@ public interface Locator {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -3787,7 +3720,6 @@ public interface Locator {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -4840,7 +4772,6 @@ public interface Locator {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -4871,7 +4802,6 @@ public interface Locator {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -5198,7 +5128,6 @@ public interface Locator {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -5225,7 +5154,6 @@ public interface Locator {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* If the element is detached from the DOM at any moment during the action, this method throws.
@@ -5298,7 +5226,6 @@ public interface Locator {
* force} option is set.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
@@ -5330,7 +5257,6 @@ public interface Locator {
* force} option is set.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
diff --git a/playwright/src/main/java/com/microsoft/playwright/Mouse.java b/playwright/src/main/java/com/microsoft/playwright/Mouse.java
index 28424c15..83c6d7c7 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Mouse.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Mouse.java
@@ -163,6 +163,8 @@ public interface Mouse {
* Shortcut for {@link com.microsoft.playwright.Mouse#move Mouse.move()}, {@link com.microsoft.playwright.Mouse#down
* Mouse.down()}, {@link com.microsoft.playwright.Mouse#up Mouse.up()}.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
default void click(double x, double y) {
@@ -172,6 +174,8 @@ public interface Mouse {
* Shortcut for {@link com.microsoft.playwright.Mouse#move Mouse.move()}, {@link com.microsoft.playwright.Mouse#down
* Mouse.down()}, {@link com.microsoft.playwright.Mouse#up Mouse.up()}.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
void click(double x, double y, ClickOptions options);
@@ -180,6 +184,8 @@ public interface Mouse {
* Mouse.down()}, {@link com.microsoft.playwright.Mouse#up Mouse.up()}, {@link com.microsoft.playwright.Mouse#down
* Mouse.down()} and {@link com.microsoft.playwright.Mouse#up Mouse.up()}.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
default void dblclick(double x, double y) {
@@ -190,6 +196,8 @@ public interface Mouse {
* Mouse.down()}, {@link com.microsoft.playwright.Mouse#up Mouse.up()}, {@link com.microsoft.playwright.Mouse#down
* Mouse.down()} and {@link com.microsoft.playwright.Mouse#up Mouse.up()}.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
void dblclick(double x, double y, DblclickOptions options);
@@ -210,6 +218,8 @@ public interface Mouse {
/**
* Dispatches a {@code mousemove} event.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
default void move(double x, double y) {
@@ -218,6 +228,8 @@ public interface Mouse {
/**
* Dispatches a {@code mousemove} event.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
void move(double x, double y, MoveOptions options);
diff --git a/playwright/src/main/java/com/microsoft/playwright/Page.java b/playwright/src/main/java/com/microsoft/playwright/Page.java
index d4010991..7f3f70f4 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Page.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Page.java
@@ -342,7 +342,7 @@ public interface Page extends AutoCloseable {
*/
public Path path;
/**
- * Script type. Use 'module' in order to load a Javascript ES6 module. See script for more details.
*/
public String type;
@@ -367,7 +367,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Script type. Use 'module' in order to load a Javascript ES6 module. See script for more details.
*/
public AddScriptTagOptions setType(String type) {
@@ -427,9 +427,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -465,9 +463,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public CheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -541,9 +537,7 @@ public interface Page extends AutoCloseable {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -609,9 +603,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public ClickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -708,9 +700,7 @@ public interface Page extends AutoCloseable {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -769,9 +759,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DblclickOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -860,9 +848,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -903,9 +889,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public DragAndDropOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1061,9 +1045,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1088,9 +1070,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public FillOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -1588,9 +1568,7 @@ public interface Page extends AutoCloseable {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -1635,9 +1613,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public HoverOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2265,9 +2241,7 @@ public interface Page extends AutoCloseable {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -2291,9 +2265,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public PressOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2719,9 +2691,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public Boolean noWaitAfter;
/**
@@ -2746,9 +2716,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option will default to {@code true} in the future.
*/
public SelectOptionOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2780,9 +2748,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2818,9 +2784,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetCheckedOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2920,9 +2884,7 @@ public interface Page extends AutoCloseable {
}
class SetInputFilesOptions {
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -2939,9 +2901,7 @@ public interface Page extends AutoCloseable {
public Double timeout;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public SetInputFilesOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -2979,9 +2939,7 @@ public interface Page extends AutoCloseable {
*/
public List modifiers;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -3026,9 +2984,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TapOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -3116,9 +3072,7 @@ public interface Page extends AutoCloseable {
*/
public Double delay;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -3142,9 +3096,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public TypeOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -3176,9 +3128,7 @@ public interface Page extends AutoCloseable {
*/
public Boolean force;
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public Boolean noWaitAfter;
/**
@@ -3214,9 +3164,7 @@ public interface Page extends AutoCloseable {
return this;
}
/**
- * Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
- * opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
- * inaccessible pages. Defaults to {@code false}.
+ * @deprecated This option has no effect.
*/
public UncheckOptions setNoWaitAfter(boolean noWaitAfter) {
this.noWaitAfter = noWaitAfter;
@@ -3900,7 +3848,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -3923,7 +3870,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked. If not, this method throws.
*
*
@@ -4023,8 +3969,6 @@ public interface Page extends AutoCloseable {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -4047,8 +3991,6 @@ public interface Page extends AutoCloseable {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to double click in the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set. Note that if the
- * first click of the {@code dblclick()} triggers a navigation event, this method will throw.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -5434,7 +5376,7 @@ public interface Page extends AutoCloseable {
Locator getByTitle(Pattern text, GetByTitleOptions options);
/**
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
- * last redirect. If can not go back, returns {@code null}.
+ * last redirect. If cannot go back, returns {@code null}.
*
*
Navigate to the previous page in history.
*
@@ -5445,7 +5387,7 @@ public interface Page extends AutoCloseable {
}
/**
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
- * last redirect. If can not go back, returns {@code null}.
+ * last redirect. If cannot go back, returns {@code null}.
*
*
Navigate to the previous page in history.
*
@@ -5454,7 +5396,7 @@ public interface Page extends AutoCloseable {
Response goBack(GoBackOptions options);
/**
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
- * last redirect. If can not go forward, returns {@code null}.
+ * last redirect. If cannot go forward, returns {@code null}.
*
*
Navigate to the next page in history.
*
@@ -5465,7 +5407,7 @@ public interface Page extends AutoCloseable {
}
/**
* Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
- * last redirect. If can not go forward, returns {@code null}.
+ * last redirect. If cannot go forward, returns {@code null}.
*
*
Navigate to the next page in history.
*
@@ -5541,7 +5483,6 @@ public interface Page extends AutoCloseable {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -5562,7 +5503,6 @@ public interface Page extends AutoCloseable {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to hover over the center of the element, or the specified
* {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -7075,7 +7015,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -7099,7 +7038,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now checked or unchecked. If not, this method throws.
*
*
@@ -7330,7 +7268,6 @@ public interface Page extends AutoCloseable {
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -7354,7 +7291,6 @@ public interface Page extends AutoCloseable {
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#touchscreen Page.touchscreen()} to tap the center of the element, or the
* specified {@code position}.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
*
*
* When all steps combined have not finished during the specified {@code timeout}, this method throws a {@code
@@ -7427,7 +7363,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
*
Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
@@ -7450,7 +7385,6 @@ public interface Page extends AutoCloseable {
* unless {@code force} option is set. If the element is detached during the checks, the whole action is retried.
* Scroll the element into view if needed.
* Use {@link com.microsoft.playwright.Page#mouse Page.mouse()} to click in the center of the element.
- * Wait for initiated navigations to either succeed or fail, unless {@code noWaitAfter} option is set.
* Ensure that the element is now unchecked. If not, this method throws.
*
*
diff --git a/playwright/src/main/java/com/microsoft/playwright/Request.java b/playwright/src/main/java/com/microsoft/playwright/Request.java
index aa98ea85..39c6880d 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Request.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Request.java
@@ -99,7 +99,7 @@ public interface Request {
*/
List headersArray();
/**
- * Returns the value of the header matching the name. The name is case insensitive.
+ * Returns the value of the header matching the name. The name is case-insensitive.
*
* @param name Name of the header.
* @since v1.15
diff --git a/playwright/src/main/java/com/microsoft/playwright/Response.java b/playwright/src/main/java/com/microsoft/playwright/Response.java
index 4b0a1692..1eec90a3 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Response.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Response.java
@@ -71,7 +71,7 @@ public interface Response {
*/
List headersArray();
/**
- * Returns the value of the header matching the name. The name is case insensitive. If multiple headers have the same name
+ * Returns the value of the header matching the name. The name is case-insensitive. If multiple headers have the same name
* (except {@code set-cookie}), they are returned as a list separated by {@code , }. For {@code set-cookie}, the {@code \n}
* separator is used. If no headers are found, {@code null} is returned.
*
@@ -80,7 +80,7 @@ public interface Response {
*/
String headerValue(String name);
/**
- * Returns all values of the headers matching the name, for example {@code set-cookie}. The name is case insensitive.
+ * Returns all values of the headers matching the name, for example {@code set-cookie}. The name is case-insensitive.
*
* @param name Name of the header.
* @since v1.15
diff --git a/playwright/src/main/java/com/microsoft/playwright/Route.java b/playwright/src/main/java/com/microsoft/playwright/Route.java
index 8d969f22..deca04b4 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Route.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Route.java
@@ -147,6 +147,12 @@ public interface Route {
* exceeded. Defaults to {@code 20}. Pass {@code 0} to not follow redirects.
*/
public Integer maxRedirects;
+ /**
+ * Maximum number of times network errors should be retried. Currently only {@code ECONNRESET} error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to {@code 0} - no
+ * retries.
+ */
+ public Integer maxRetries;
/**
* If set changes the request method (e.g. GET or POST).
*/
@@ -179,6 +185,15 @@ public interface Route {
this.maxRedirects = maxRedirects;
return this;
}
+ /**
+ * Maximum number of times network errors should be retried. Currently only {@code ECONNRESET} error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to {@code 0} - no
+ * retries.
+ */
+ public FetchOptions setMaxRetries(int maxRetries) {
+ this.maxRetries = maxRetries;
+ return this;
+ }
/**
* If set changes the request method (e.g. GET or POST).
*/
diff --git a/playwright/src/main/java/com/microsoft/playwright/Touchscreen.java b/playwright/src/main/java/com/microsoft/playwright/Touchscreen.java
index 0ee585bd..f59a32e0 100644
--- a/playwright/src/main/java/com/microsoft/playwright/Touchscreen.java
+++ b/playwright/src/main/java/com/microsoft/playwright/Touchscreen.java
@@ -28,6 +28,8 @@ public interface Touchscreen {
* NOTE: {@link com.microsoft.playwright.Page#tap Page.tap()} the method will throw if {@code hasTouch} option of the browser
* context is false.
*
+ * @param x X coordinate relative to the main frame's viewport in CSS pixels.
+ * @param y Y coordinate relative to the main frame's viewport in CSS pixels.
* @since v1.8
*/
void tap(double x, double y);
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java
index f7aca95e..3ee5506f 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java
@@ -147,6 +147,12 @@ class APIRequestContextImpl extends ChannelOwner implements APIRequestContext {
}
params.addProperty("maxRedirects", options.maxRedirects);
}
+ if (options.maxRetries != null) {
+ if (options.maxRetries < 0) {
+ throw new PlaywrightException("'maxRetries' must be greater than or equal to '0'");
+ }
+ params.addProperty("maxRetries", options.maxRetries);
+ }
JsonObject json = sendMessage("fetch", params).getAsJsonObject();
return new APIResponseImpl(this, json.getAsJsonObject("response"));
}
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java
index 664b3c59..eb6181f0 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java
@@ -17,15 +17,21 @@
package com.microsoft.playwright.impl;
import com.google.gson.Gson;
+import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.microsoft.playwright.APIRequest;
import com.microsoft.playwright.PlaywrightException;
+import com.microsoft.playwright.options.ClientCertificate;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
+import java.util.Base64;
+import java.util.List;
import static com.microsoft.playwright.impl.Serialization.gson;
+import static com.microsoft.playwright.impl.Utils.addToProtocol;
+import static java.nio.file.Files.readAllBytes;
class APIRequestImpl implements APIRequest {
private final PlaywrightImpl playwright;
@@ -42,6 +48,8 @@ class APIRequestImpl implements APIRequest {
private APIRequestContextImpl newContextImpl(NewContextOptions options) {
if (options == null) {
options = new NewContextOptions();
+ } else {
+ options = Utils.clone(options);
}
if (options.storageStatePath != null) {
try {
@@ -57,11 +65,13 @@ class APIRequestImpl implements APIRequest {
storageState = new Gson().fromJson(options.storageState, JsonObject.class);
options.storageState = null;
}
+ List clientCertificateList = options.clientCertificates;
+ options.clientCertificates = null;
JsonObject params = gson().toJsonTree(options).getAsJsonObject();
if (storageState != null) {
params.add("storageState", storageState);
}
-
+ addToProtocol(params, clientCertificateList);
JsonObject result = playwright.sendMessage("newRequest", params).getAsJsonObject();
APIRequestContextImpl context = playwright.connection.getExistingObject(result.getAsJsonObject("request").get("guid").getAsString());
return context;
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java
index ff76555c..c3abf401 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java
@@ -208,6 +208,7 @@ class BrowserImpl extends ChannelOwner implements Browser {
params.addProperty("noDefaultViewport", true);
}
}
+ addToProtocol(params, options.clientCertificates);
params.remove("acceptDownloads");
if (options.acceptDownloads != null) {
params.addProperty("acceptDownloads", options.acceptDownloads ? "accept" : "deny");
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java
index a961919e..23a5dcad 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java
@@ -30,6 +30,7 @@ import java.util.function.Consumer;
import static com.microsoft.playwright.impl.Serialization.addHarUrlFilter;
import static com.microsoft.playwright.impl.Serialization.gson;
+import static com.microsoft.playwright.impl.Utils.addToProtocol;
import static com.microsoft.playwright.impl.Utils.convertType;
class BrowserTypeImpl extends ChannelOwner implements BrowserType {
@@ -221,6 +222,7 @@ class BrowserTypeImpl extends ChannelOwner implements BrowserType {
params.addProperty("noDefaultViewport", true);
}
}
+ addToProtocol(params, options.clientCertificates);
params.remove("acceptDownloads");
if (options.acceptDownloads != null) {
params.addProperty("acceptDownloads", options.acceptDownloads ? "accept" : "deny");
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java
index 10589bc9..2caef140 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java
@@ -33,6 +33,12 @@ class SerializedValue{
String d;
String u;
String bi;
+ public static class E {
+ String m;
+ String n;
+ String s;
+ }
+ E e;
public static class R {
String p;
String f;
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestOptionsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestOptionsImpl.java
index e70215f3..0bcbd4b4 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/RequestOptionsImpl.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/RequestOptionsImpl.java
@@ -33,6 +33,7 @@ public class RequestOptionsImpl implements RequestOptions {
Boolean ignoreHTTPSErrors;
Double timeout;
Integer maxRedirects;
+ Integer maxRetries;
@Override
public RequestOptions setHeader(String name, String value) {
@@ -125,4 +126,10 @@ public class RequestOptionsImpl implements RequestOptions {
this.maxRedirects = maxRedirects;
return this;
}
+
+ @Override
+ public RequestOptions setMaxRetries(int maxRetries) {
+ this.maxRetries = maxRetries;
+ return this;
+ }
}
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java
index adab5bea..d133f1bc 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java
@@ -249,6 +249,11 @@ class Serialization {
return (T)(Date.from(Instant.parse(value.d)));
if (value.r != null)
return (T)(Pattern.compile(value.r.p, fromJsRegexFlags(value.r.f)));
+ if (value.e != null) {
+ if (!value.e.s.isEmpty())
+ return (T)(value.e.s);
+ return (T)(value.e.m);
+ }
if (value.v != null) {
switch (value.v) {
case "undefined":
diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java
index 3cd721cf..d0b94c45 100644
--- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java
+++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java
@@ -20,6 +20,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.microsoft.playwright.PlaywrightException;
+import com.microsoft.playwright.options.ClientCertificate;
import com.microsoft.playwright.options.FilePayload;
import com.microsoft.playwright.options.HttpHeader;
@@ -37,6 +38,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import static com.microsoft.playwright.impl.Serialization.toJsonArray;
+import static java.nio.file.Files.readAllBytes;
public class Utils {
static T convertType(F f, Class t) {
@@ -412,4 +414,40 @@ public class Utils {
static String addSourceUrlToScript(String source, Path path) {
return source + "\n//# sourceURL=" + path.toString().replace("\n", "");
}
+
+ static void addToProtocol(JsonObject params, List clientCertificateList) {
+ if (clientCertificateList == null) {
+ return;
+ }
+ JsonArray clientCertificates = new JsonArray();
+ for (ClientCertificate cert: clientCertificateList) {
+ JsonObject jsonCert = new JsonObject();
+ jsonCert.addProperty("origin", cert.origin);
+ try {
+ if (cert.certPath != null) {
+ byte[] bytes = readAllBytes(cert.certPath);
+ String base64 = Base64.getEncoder().encodeToString(bytes);
+ jsonCert.addProperty("cert", base64);
+ }
+ if (cert.keyPath != null) {
+ byte[] bytes = readAllBytes(cert.keyPath);
+ String base64 = Base64.getEncoder().encodeToString(bytes);
+ jsonCert.addProperty("key", base64);
+ }
+ if (cert.pfxPath != null) {
+ byte[] bytes = readAllBytes(cert.pfxPath);
+ String base64 = Base64.getEncoder().encodeToString(bytes);
+ params.addProperty("pfx", base64);
+ }
+ } catch (IOException e) {
+ throw new PlaywrightException("Failed to read from file", e);
+ }
+ if (cert.passphrase != null) {
+ jsonCert.addProperty("passphrase", cert.passphrase);
+ }
+ clientCertificates.add(jsonCert);
+ }
+ params.remove("clientCertificates");
+ params.add("clientCertificates", clientCertificates);
+ }
}
diff --git a/playwright/src/main/java/com/microsoft/playwright/options/ClientCertificate.java b/playwright/src/main/java/com/microsoft/playwright/options/ClientCertificate.java
new file mode 100644
index 00000000..23fb5a73
--- /dev/null
+++ b/playwright/src/main/java/com/microsoft/playwright/options/ClientCertificate.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.microsoft.playwright.options;
+
+import java.nio.file.Path;
+
+public class ClientCertificate {
+ /**
+ * Exact origin that the certificate is valid for. Origin includes {@code https} protocol, a hostname and optionally a
+ * port.
+ */
+ public String origin;
+ /**
+ * Path to the file with the certificate in PEM format.
+ */
+ public Path certPath;
+ /**
+ * Path to the file with the private key in PEM format.
+ */
+ public Path keyPath;
+ /**
+ * Path to the PFX or PKCS12 encoded private key and certificate chain.
+ */
+ public Path pfxPath;
+ /**
+ * Passphrase for the private key (PEM or PFX).
+ */
+ public String passphrase;
+
+ public ClientCertificate(String origin) {
+ this.origin = origin;
+ }
+ /**
+ * Path to the file with the certificate in PEM format.
+ */
+ public ClientCertificate setCertPath(Path certPath) {
+ this.certPath = certPath;
+ return this;
+ }
+ /**
+ * Path to the file with the private key in PEM format.
+ */
+ public ClientCertificate setKeyPath(Path keyPath) {
+ this.keyPath = keyPath;
+ return this;
+ }
+ /**
+ * Path to the PFX or PKCS12 encoded private key and certificate chain.
+ */
+ public ClientCertificate setPfxPath(Path pfxPath) {
+ this.pfxPath = pfxPath;
+ return this;
+ }
+ /**
+ * Passphrase for the private key (PEM or PFX).
+ */
+ public ClientCertificate setPassphrase(String passphrase) {
+ this.passphrase = passphrase;
+ return this;
+ }
+}
\ No newline at end of file
diff --git a/playwright/src/main/java/com/microsoft/playwright/options/Cookie.java b/playwright/src/main/java/com/microsoft/playwright/options/Cookie.java
index d131a239..ae388132 100644
--- a/playwright/src/main/java/com/microsoft/playwright/options/Cookie.java
+++ b/playwright/src/main/java/com/microsoft/playwright/options/Cookie.java
@@ -20,15 +20,16 @@ public class Cookie {
public String name;
public String value;
/**
- * either url or domain / path are required. Optional.
+ * Either url or domain / path are required. Optional.
*/
public String url;
/**
- * either url or domain / path are required Optional.
+ * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or
+ * domain / path are required. Optional.
*/
public String domain;
/**
- * either url or domain / path are required Optional.
+ * Either url or domain / path are required Optional.
*/
public String path;
/**
@@ -53,21 +54,22 @@ public class Cookie {
this.value = value;
}
/**
- * either url or domain / path are required. Optional.
+ * Either url or domain / path are required. Optional.
*/
public Cookie setUrl(String url) {
this.url = url;
return this;
}
/**
- * either url or domain / path are required Optional.
+ * For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com". Either url or
+ * domain / path are required. Optional.
*/
public Cookie setDomain(String domain) {
this.domain = domain;
return this;
}
/**
- * either url or domain / path are required Optional.
+ * Either url or domain / path are required Optional.
*/
public Cookie setPath(String path) {
this.path = path;
diff --git a/playwright/src/main/java/com/microsoft/playwright/options/RequestOptions.java b/playwright/src/main/java/com/microsoft/playwright/options/RequestOptions.java
index 73bc5aee..24cd1f8b 100644
--- a/playwright/src/main/java/com/microsoft/playwright/options/RequestOptions.java
+++ b/playwright/src/main/java/com/microsoft/playwright/options/RequestOptions.java
@@ -133,6 +133,15 @@ public interface RequestOptions {
* @since v1.26
*/
RequestOptions setMaxRedirects(int maxRedirects);
+ /**
+ *
+ *
+ * @param maxRetries Maximum number of times network errors should be retried. Currently only {@code ECONNRESET} error is retried. Does not
+ * retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to {@code 0} - no
+ * retries.
+ * @since v1.46
+ */
+ RequestOptions setMaxRetries(int maxRetries);
/**
* Changes the request method (e.g. PUT or POST).
diff --git a/playwright/src/test/java/com/microsoft/playwright/HttpsConfiguratorImpl.java b/playwright/src/test/java/com/microsoft/playwright/HttpsConfiguratorImpl.java
index d96d05b3..279a5389 100644
--- a/playwright/src/test/java/com/microsoft/playwright/HttpsConfiguratorImpl.java
+++ b/playwright/src/test/java/com/microsoft/playwright/HttpsConfiguratorImpl.java
@@ -19,11 +19,15 @@ package com.microsoft.playwright;
import com.sun.net.httpserver.HttpsConfigurator;
import com.sun.net.httpserver.HttpsParameters;
-import javax.net.ssl.KeyManagerFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLParameters;
-import javax.net.ssl.TrustManagerFactory;
+import javax.net.ssl.*;
+import java.io.FileInputStream;
+import java.io.InputStream;
import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.List;
class HttpsConfiguratorImpl extends HttpsConfigurator {
@@ -31,7 +35,7 @@ class HttpsConfiguratorImpl extends HttpsConfigurator {
return new HttpsConfiguratorImpl(createSSLContext());
}
- private HttpsConfiguratorImpl(SSLContext context) {
+ HttpsConfiguratorImpl(SSLContext context) {
super(context);
}
diff --git a/playwright/src/test/java/com/microsoft/playwright/Server.java b/playwright/src/test/java/com/microsoft/playwright/Server.java
index 505dc322..5d42d083 100644
--- a/playwright/src/test/java/com/microsoft/playwright/Server.java
+++ b/playwright/src/test/java/com/microsoft/playwright/Server.java
@@ -20,7 +20,6 @@ import com.sun.net.httpserver.*;
import java.io.*;
import java.net.InetSocketAddress;
-import java.nio.file.FileSystems;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
@@ -73,11 +72,8 @@ public class Server implements HttpHandler {
} else {
server = HttpServer.create(new InetSocketAddress("localhost", port), 0);
}
-
server.createContext("/", this);
server.setExecutor(null); // creates a default executor
-
- File cwd = FileSystems.getDefault().getPath(".").toFile();
server.start();
}
diff --git a/playwright/src/test/java/com/microsoft/playwright/ServerWithClientCertificate.java b/playwright/src/test/java/com/microsoft/playwright/ServerWithClientCertificate.java
new file mode 100644
index 00000000..f553f034
--- /dev/null
+++ b/playwright/src/test/java/com/microsoft/playwright/ServerWithClientCertificate.java
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) Microsoft Corporation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.microsoft.playwright;
+
+import com.sun.net.httpserver.*;
+
+import javax.net.ssl.*;
+import java.io.*;
+import java.net.InetSocketAddress;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
+import java.security.cert.*;
+import java.util.*;
+
+public class ServerWithClientCertificate implements HttpHandler {
+ private final HttpServer server;
+ final String origin;
+ final String crossOrigin;
+ final String url;
+ KeyStore keyStore;
+
+ static ServerWithClientCertificate create(int port) throws IOException {
+ return new ServerWithClientCertificate(port);
+ }
+
+ private ServerWithClientCertificate(int port) throws IOException {
+ origin = "https://localhost:" + port;
+ crossOrigin = "https://127.0.0.1:" + port;;
+ url = origin + "/index.html";
+ HttpsServer httpsServer = HttpsServer.create(new InetSocketAddress("localhost", port), 0);
+ httpsServer.setHttpsConfigurator(new HttpsConfiguratorImpl(loadCertificates()));
+ server = httpsServer;
+ server.createContext("/", this);
+ server.setExecutor(null); // creates a default executor
+ server.start();
+ }
+
+ public void stop() {
+ server.stop(0);
+ }
+
+ private SSLContext loadCertificates() {
+ try {
+ // Create an SSL context
+ SSLContext sslContext = SSLContext.getInstance("TLS");
+
+ // Load the keystore from file
+ char[] password = "".toCharArray(); // the password you set during the PKCS12 export
+ keyStore = KeyStore.getInstance("PKCS12");
+ InputStream fis = HttpsConfiguratorImpl.class.getClassLoader().getResourceAsStream(
+ "resources/client-certificates/server/server_keystore.p12");
+ keyStore.load(fis, password);
+
+ // Set up the KeyManagerFactory to use the keystore
+ KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+ kmf.init(keyStore, password);
+
+ TrustManager[] trustAllCerts = new TrustManager[]{
+ new X509TrustManager() {
+ public X509Certificate[] getAcceptedIssuers() {
+ List certs = new ArrayList<>();
+ try {
+ for (String alias : Collections.list(keyStore.aliases())) {
+ certs.add((X509Certificate) keyStore.getCertificate(alias));
+ }
+ } catch (KeyStoreException e) {
+ throw new RuntimeException(e);
+ }
+ return certs.toArray(new X509Certificate[0]);
+ }
+
+ public void checkClientTrusted(X509Certificate[] clientCerts, String authType) throws CertificateException {
+ }
+
+ public void checkServerTrusted(X509Certificate[] certs, String authType) {
+ }
+ }
+ };
+
+ // Initialize the SSL context
+ sslContext.init(kmf.getKeyManagers(), trustAllCerts, null);
+ return sslContext;
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ private boolean validateCertChain(Certificate[] clientCerts) {
+ try {
+ // Create CertPath from the provided client certificates
+ CertificateFactory factory = CertificateFactory.getInstance("X.509");
+ CertPath certPath = factory.generateCertPath(Arrays.asList(clientCerts));
+
+ // Extract Trust Anchors from the trust store
+ Set trustAnchors = new HashSet<>();
+ for (String alias : Collections.list(keyStore.aliases())) {
+ X509Certificate trustedCert = (X509Certificate) keyStore.getCertificate(alias);
+ if (trustedCert != null) {
+ trustAnchors.add(new TrustAnchor(trustedCert, null));
+ }
+ }
+
+ // Initialize PKIX parameters
+ PKIXParameters params = new PKIXParameters(trustAnchors);
+ params.setRevocationEnabled(false); // Set to true if you want to enable CRL checking
+
+ // Validate the certification path
+ CertPathValidator certPathValidator = CertPathValidator.getInstance(CertPathValidator.getDefaultType());
+ certPathValidator.validate(certPath, params);
+
+ return true;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ private static String div(String testId, String message) {
+ return "" + message + "
";
+ }
+
+ @Override
+ public void handle(HttpExchange exchange) throws IOException {
+ SSLSession sslSession = ((HttpsExchange) exchange).getSSLSession();
+ String response = div("servername", sslSession.getPeerHost());
+ Certificate[] certs = sslSession.getPeerCertificates();
+ if (certs.length > 0 && certs[0] instanceof X509Certificate) {
+ X509Certificate cert = (X509Certificate) certs[0];
+ exchange.getResponseHeaders().add("Content-Type", "text/html");
+ if (validateCertChain(certs)) {
+ exchange.sendResponseHeaders(200, 0);
+ response += div("message", String.format("Hello %s, your certificate was issued by %s!",
+ cert.getSubjectX500Principal().getName(), cert.getIssuerX500Principal().getName()));
+ } else {
+ response += div("message", String.format("Sorry %s, certificates from %s are not welcome here.",
+ cert.getSubjectX500Principal().getName(), cert.getIssuerX500Principal().getName()));
+ exchange.sendResponseHeaders(403, 0);
+ }
+ } else {
+ response += div("message", "Sorry, but you need to provide a client certificate to continue.");
+ exchange.sendResponseHeaders(401, 0);
+ }
+ try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {
+ writer.write(response);
+ }
+ }
+}
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBase.java b/playwright/src/test/java/com/microsoft/playwright/TestBase.java
index 668b5832..4024e459 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestBase.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestBase.java
@@ -22,6 +22,7 @@ import com.microsoft.playwright.options.SameSiteAttribute;
import javax.sql.rowset.Predicate;
import java.io.IOException;
+import java.io.InputStream;
import java.security.Provider;
import java.time.Duration;
import java.time.Instant;
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextFetch.java b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextFetch.java
index eb831612..6ac46823 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextFetch.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextFetch.java
@@ -521,7 +521,7 @@ public class TestBrowserContextFetch extends TestBase {
assertEquals("{\"name\":\"foo\",\"localDateTime\":\"2022-12-23T06:14:58.818Z\",\"date\":\"2022-12-23T06:14:58.818Z\",\"nullLocalDateTime\":null,\"nullDate\":null}",
new String(req.get().postBody));
}
-
+
@Test
void shouldSupportOffsetDateTimeInData() throws ExecutionException, InterruptedException {
APIRequestContext request = playwright.request().newContext();
@@ -865,4 +865,28 @@ public class TestBrowserContextFetch extends TestBase {
PlaywrightException e = assertThrows(PlaywrightException.class, () -> context.request().get(server.EMPTY_PAGE));
assertTrue(e.getMessage().contains("Test ended."), e.getMessage());
}
+
+ @Test
+ public void shouldRetryECONNRESET() {
+ int[] requestCount = {0};
+ server.setRoute("/test", exchange -> {
+ if (requestCount[0]++ < 3) {
+ exchange.close();
+ return;
+ }
+ exchange.getResponseHeaders().add("Content-Type", "text/plain");
+ exchange.sendResponseHeaders(200, 0);
+ try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {
+ writer.write("Hello!");
+ }
+ });
+
+ APIRequestContext requestContext = context.request();
+ APIResponse response = requestContext.get(server.PREFIX + "/test",
+ RequestOptions.create().setMaxRetries(3));
+
+ assertEquals(200, response.status());
+ assertEquals("Hello!", response.text());
+ assertEquals(4, requestCount[0]);
+ }
}
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestClientCertificates.java b/playwright/src/test/java/com/microsoft/playwright/TestClientCertificates.java
new file mode 100644
index 00000000..ab19039c
--- /dev/null
+++ b/playwright/src/test/java/com/microsoft/playwright/TestClientCertificates.java
@@ -0,0 +1,186 @@
+package com.microsoft.playwright;
+
+import com.microsoft.playwright.options.ClientCertificate;
+import com.microsoft.playwright.options.Proxy;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import static com.microsoft.playwright.Utils.nextFreePort;
+import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat;
+import static java.util.Arrays.asList;
+import static org.junit.jupiter.api.Assertions.*;
+
+public class TestClientCertificates extends TestBase {
+ private ServerWithClientCertificate customServer;
+
+ private static Path asset(String path) {
+ return Paths.get("src/test/resources/" + path).toAbsolutePath();
+ }
+
+ private static String origin(String urlString) {
+ try {
+ URL url = new URL(urlString);
+ String origin = url.getProtocol() + "://" + url.getHost();
+ if (url.getPort() != -1 && url.getPort() != url.getDefaultPort()) {
+ origin += ":" + url.getPort();
+ }
+ return origin;
+ } catch (MalformedURLException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ @BeforeAll
+ @Override
+ void startServer() throws IOException {
+ super.startServer();
+ customServer = ServerWithClientCertificate.create(nextFreePort());
+ }
+
+ @AfterAll
+ @Override
+ void stopServer() {
+ if (customServer != null) {
+ customServer.stop();
+ customServer = null;
+ }
+ super.stopServer();
+ }
+
+ @BeforeAll
+ @Override
+ void launchBrowser() {
+ // TODO: remove once Chromium Stable tests pass without it on Windows.
+ launchBrowser(createLaunchOptions().setProxy(new Proxy("per-context")));
+ }
+
+ @Test
+ public void shouldFailWithNoClientCertificatesProvided() {
+ APIRequestContext request = playwright.request().newContext(
+ new APIRequest.NewContextOptions().setIgnoreHTTPSErrors(true));
+ PlaywrightException e = assertThrows(PlaywrightException.class, () -> request.get(customServer.url));
+ assertTrue(e.getMessage().contains("Error: socket hang up"), e.getMessage());
+ request.dispose();
+ }
+
+ @Test
+ public void shouldKeepSupportingHttp() {
+ APIRequest.NewContextOptions requestOptions = new APIRequest.NewContextOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(origin(server.PREFIX))
+ .setCertPath(asset("client-certificates/client/trusted/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/trusted/key.pem"))));
+ APIRequestContext request = playwright.request().newContext(requestOptions);
+ APIResponse response = request.get(server.PREFIX + "/one-style.html");
+ assertEquals(server.PREFIX + "/one-style.html", response.url());
+ assertEquals(200, response.status());
+ assertTrue(response.text().contains("hello, world!
"));
+ request.dispose();
+ }
+
+ @Test
+ public void shouldThrowWithUntrustedClientCerts() throws Exception {
+ APIRequest.NewContextOptions requestOptions = new APIRequest.NewContextOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(customServer.origin)
+ .setCertPath(asset("client-certificates/client/self-signed/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/self-signed/key.pem"))));
+
+ APIRequestContext request = playwright.request().newContext(requestOptions);
+ APIResponse response = request.get(customServer.url);
+
+ assertEquals(customServer.url, response.url());
+ assertEquals(403, response.status());
+ assertTrue(response.text().contains("Sorry CN=Bob, certificates from CN=Bob are not welcome here."), response.text());
+
+ request.dispose();
+ }
+
+ @Test
+ public void passWithTrustedClientCertificates() throws Exception {
+ APIRequest.NewContextOptions requestOptions = new APIRequest.NewContextOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(customServer.origin)
+ .setCertPath(asset("client-certificates/client/trusted/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/trusted/key.pem"))));
+
+ APIRequestContext request = playwright.request().newContext(requestOptions);
+ APIResponse response = request.get(customServer.url);
+
+ assertEquals(customServer.url, response.url());
+ assertEquals(200, response.status());
+ assertTrue(response.text().contains("Hello CN=Alice, your certificate was issued by O=Client Certificate Demo,CN=localhost!"), response.text());
+
+ request.dispose();
+ }
+
+ @Test
+ public void shouldWorkWithBrowserNewContext() throws Exception {
+ Browser.NewContextOptions options = new Browser.NewContextOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(customServer.origin)
+ .setCertPath(asset("client-certificates/client/trusted/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/trusted/key.pem"))));
+
+ try (BrowserContext context = browser.newContext(options)) {
+ Page page = context.newPage();
+ assertThrows(PlaywrightException.class, () -> page.navigate(customServer.crossOrigin));
+ assertThrows(PlaywrightException.class, () -> page.request().get(customServer.crossOrigin));
+ page.navigate(customServer.url);
+ assertThat(page.getByText("Hello CN=Alice")).isVisible();
+ APIResponse response = page.request().get(customServer.url);
+ assertTrue(response.text().contains("Hello CN=Alice"), response.text());
+ }
+ }
+
+ @Test
+ public void shouldWorkWithBrowserNewPage() throws Exception {
+ Browser.NewPageOptions options = new Browser.NewPageOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(customServer.origin)
+ .setCertPath(asset("client-certificates/client/trusted/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/trusted/key.pem"))));
+
+ try (Page page = browser.newPage(options)) {
+ assertThrows(PlaywrightException.class, () -> page.navigate(customServer.crossOrigin));
+ assertThrows(PlaywrightException.class, () -> page.request().get(customServer.crossOrigin));
+ page.navigate(customServer.url);
+ assertThat(page.getByText("Hello CN=Alice")).isVisible();
+ APIResponse response = page.request().get(customServer.url);
+ assertTrue(response.text().contains("Hello CN=Alice"), response.text());
+ }
+ }
+
+ @Test
+ public void shouldWorkWithBrowserLaunchPersistentContext(@TempDir Path tmpDir) throws Exception {
+ BrowserType.LaunchPersistentContextOptions options = new BrowserType.LaunchPersistentContextOptions()
+ .setIgnoreHTTPSErrors(true) // TODO: remove once we can pass a custom CA.
+ .setClientCertificates(asList(
+ new ClientCertificate(customServer.origin)
+ .setCertPath(asset("client-certificates/client/trusted/cert.pem"))
+ .setKeyPath(asset("client-certificates/client/trusted/key.pem"))));
+
+ try (BrowserContext context = browser.browserType().launchPersistentContext(tmpDir.resolve("profile") , options)) {
+ Page page = context.pages().get(0);
+ assertThrows(PlaywrightException.class, () -> page.navigate(customServer.crossOrigin));
+ assertThrows(PlaywrightException.class, () -> page.request().get(customServer.crossOrigin));
+ page.navigate(customServer.url);
+ assertThat(page.getByText("Hello CN=Alice")).isVisible();
+ APIResponse response = page.request().get(customServer.url);
+ assertTrue(response.text().contains("Hello CN=Alice"), response.text());
+ }
+ }
+}
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestGlobalFetch.java b/playwright/src/test/java/com/microsoft/playwright/TestGlobalFetch.java
index 9c7a83f6..e3128386 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestGlobalFetch.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestGlobalFetch.java
@@ -523,4 +523,29 @@ public class TestGlobalFetch extends TestBase {
PlaywrightException e = assertThrows(PlaywrightException.class, () -> request.get(server.EMPTY_PAGE));
assertTrue(e.getMessage().contains("My reason"), e.getMessage());
}
+
+ @Test
+ public void shouldRetryECONNRESET() {
+ int[] requestCount = {0};
+ server.setRoute("/test", exchange -> {
+ if (requestCount[0]++ < 3) {
+ exchange.close();
+ return;
+ }
+ exchange.getResponseHeaders().add("Content-Type", "text/plain");
+ exchange.sendResponseHeaders(200, 0);
+ try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {
+ writer.write("Hello!");
+ }
+ });
+
+ APIRequestContext requestContext = playwright.request().newContext();
+ APIResponse response = requestContext.get(server.PREFIX + "/test",
+ RequestOptions.create().setMaxRetries(3));
+
+ assertEquals(200, response.status());
+ assertEquals("Hello!", response.text());
+ assertEquals(4, requestCount[0]);
+ requestContext.dispose();
+ }
}
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestPageClock.java b/playwright/src/test/java/com/microsoft/playwright/TestPageClock.java
index 167fcefe..9486f675 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestPageClock.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestPageClock.java
@@ -455,4 +455,10 @@ public class TestPageClock {
assertEquals(2, calls.size());
assertEquals("inner", ((Object[]) calls.get(1))[0]);
}
+
+ @Test
+ void shouldThrowForInvalidDate(Page page) {
+ Exception exception1 = assertThrows(PlaywrightException.class, () -> page.clock().setSystemTime("invalid"));
+ assertTrue(exception1.getMessage().contains("Invalid date: invalid"), exception1.getMessage());
+ }
}
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestPageEvaluate.java b/playwright/src/test/java/com/microsoft/playwright/TestPageEvaluate.java
index 173af86f..81f62624 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestPageEvaluate.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestPageEvaluate.java
@@ -544,8 +544,8 @@ public class TestPageEvaluate extends TestBase {
" return new Error('error message');\n" +
" })();\n" +
"}");
- assertTrue(result.contains("Error: error message"));
- assertTrue(result.contains("functionOnStack"));
+ assertTrue(result.contains("Error: error message"), result);
+ assertTrue(result.contains("functionOnStack"), result);
}
@Test
diff --git a/playwright/src/test/java/com/microsoft/playwright/TestTap.java b/playwright/src/test/java/com/microsoft/playwright/TestTap.java
index dcff1d07..45273060 100644
--- a/playwright/src/test/java/com/microsoft/playwright/TestTap.java
+++ b/playwright/src/test/java/com/microsoft/playwright/TestTap.java
@@ -18,16 +18,13 @@ package com.microsoft.playwright;
import org.junit.jupiter.api.Test;
-import java.io.OutputStreamWriter;
-import java.util.ArrayList;
import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.Semaphore;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
-import static com.microsoft.playwright.options.KeyboardModifier.ALT;
import static com.microsoft.playwright.Utils.mapOf;
+import static com.microsoft.playwright.options.KeyboardModifier.ALT;
import static java.util.Arrays.asList;
-import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class TestTap extends TestBase {
@@ -97,26 +94,13 @@ public class TestTap extends TestBase {
}
@Test
- void shouldWaitForANavigationCausedByATap() throws InterruptedException {
+ void shouldNotWaitForANavigationCausedByATap() throws InterruptedException, ExecutionException {
page.navigate(server.EMPTY_PAGE);
page.setContent("link;");
- Semaphore responseWritten = new Semaphore(0);
- List events = Collections.synchronizedList(new ArrayList<>());
- server.setRoute("/intercept-this.html", exchange -> {
- // make sure the tap doesnt resolve too early
- assertDoesNotThrow(() -> Thread.sleep(100));
- exchange.getResponseHeaders().add("Content-Type", "application/octet-stream");
- exchange.sendResponseHeaders(200, 0);
- try (OutputStreamWriter writer = new OutputStreamWriter(exchange.getResponseBody())) {
- writer.write("foo");
- }
- events.add("sent response");
- responseWritten.release();
- });
+ Future serverReq = server.futureRequest("/intercept-this.html");
+ server.setRoute("/intercept-this.html", exchange -> {});
page.tap("a");
- events.add("tap finished");
- responseWritten.acquire();
- assertEquals(asList("sent response", "tap finished"), events);
+ serverReq.get();
}
@Test
diff --git a/playwright/src/test/resources/client-certificates/README.md b/playwright/src/test/resources/client-certificates/README.md
new file mode 100644
index 00000000..ec62ef44
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/README.md
@@ -0,0 +1,66 @@
+# Client Certificate test-certificates
+
+## Server
+
+```bash
+openssl req \
+ -x509 \
+ -newkey rsa:4096 \
+ -keyout server/server_key.pem \
+ -out server/server_cert.pem \
+ -nodes \
+ -days 365 \
+ -subj "/CN=localhost/O=Client\ Certificate\ Demo" \
+ -addext "subjectAltName=DNS:localhost,DNS:local.playwright"
+```
+
+## Trusted client-certificate (server signed/valid)
+
+```
+mkdir -p client/trusted
+# generate server-signed (valid) certifcate
+openssl req \
+ -newkey rsa:4096 \
+ -keyout client/trusted/key.pem \
+ -out client/trusted/csr.pem \
+ -nodes \
+ -days 365 \
+ -subj "/CN=Alice"
+
+# sign with server_cert.pem
+openssl x509 \
+ -req \
+ -in client/trusted/csr.pem \
+ -CA server/server_cert.pem \
+ -CAkey server/server_key.pem \
+ -out client/trusted/cert.pem \
+ -set_serial 01 \
+ -days 365
+```
+
+## Self-signed certificate (invalid)
+
+```
+mkdir -p client/self-signed
+openssl req \
+ -newkey rsa:4096 \
+ -keyout client/self-signed/key.pem \
+ -out client/self-signed/csr.pem \
+ -nodes \
+ -days 365 \
+ -subj "/CN=Bob"
+
+# sign with self-signed/key.pem
+openssl x509 \
+ -req \
+ -in client/self-signed/csr.pem \
+ -signkey client/self-signed/key.pem \
+ -out client/self-signed/cert.pem \
+ -days 365
+```
+
+## Java: Convert PEM Files to PKCS12
+
+```
+openssl pkcs12 -export -in server_cert.pem -inkey server_key.pem -out server_keystore.p12 -name myalias
+```
diff --git a/playwright/src/test/resources/client-certificates/client/self-signed/cert.pem b/playwright/src/test/resources/client-certificates/client/self-signed/cert.pem
new file mode 100644
index 00000000..3c077179
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/self-signed/cert.pem
@@ -0,0 +1,28 @@
+-----BEGIN CERTIFICATE-----
+MIIEyzCCArOgAwIBAgIUYps4gh4MqFYg8zqQhHYL7zYfbLkwDQYJKoZIhvcNAQEL
+BQAwDjEMMAoGA1UEAwwDQm9iMB4XDTI0MDcxOTEyNDc0MFoXDTI1MDcxOTEyNDc0
+MFowDjEMMAoGA1UEAwwDQm9iMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKC
+AgEA179eTsqcc1c3AOQHzCZEyYLPta2CCAscUFqcEZ9vWvjW0uzOv9TDlB33Unov
+jch4CElZOBhzTadVsbmnYKpxwyVU89WCuQKvedz4k1vu7S1YryfNbmS8PWbnQ4ds
+9NB7SgJNHZILvx9DXuWeFEyzRIo1984z4HheBzrkf791LqpYKaKziANUo8h8t0dm
+TX/boOz8cEnQNwtTC0ZX3aD0obG/UAhr/22ZGPo/E659fh4ptyYX2LrIUHGy+Eux
+nJ9Y4cTqa88Ee6K6AkDiT/AoNQNxE4X++jqLuie8j/ZYpI1Oll38GwKVOyy1msRL
+toGmISNwkMIQDGABrJlxgpP4QQAQ+08v9srzXOlkdxdr7OCP81r+ccBXiSQEe7BA
+kdJ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TT0TMn5jVtJyi54cH7f9MmsNJ23g==
+-----END CERTIFICATE-----
diff --git a/playwright/src/test/resources/client-certificates/client/self-signed/csr.pem b/playwright/src/test/resources/client-certificates/client/self-signed/csr.pem
new file mode 100644
index 00000000..4c99e134
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/self-signed/csr.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIEUzCCAjsCAQAwDjEMMAoGA1UEAwwDQm9iMIICIjANBgkqhkiG9w0BAQEFAAOC
+Ag8AMIICCgKCAgEA179eTsqcc1c3AOQHzCZEyYLPta2CCAscUFqcEZ9vWvjW0uzO
+v9TDlB33Unovjch4CElZOBhzTadVsbmnYKpxwyVU89WCuQKvedz4k1vu7S1YryfN
+bmS8PWbnQ4ds9NB7SgJNHZILvx9DXuWeFEyzRIo1984z4HheBzrkf791LqpYKaKz
+iANUo8h8t0dmTX/boOz8cEnQNwtTC0ZX3aD0obG/UAhr/22ZGPo/E659fh4ptyYX
+2LrIUHGy+EuxnJ9Y4cTqa88Ee6K6AkDiT/AoNQNxE4X++jqLuie8j/ZYpI1Oll38
+GwKVOyy1msRLtoGmISNwkMIQDGABrJlxgpP4QQAQ+08v9srzXOlkdxdr7OCP81r+
+ccBXiSQEe7BAkdJ8l98l5dprJ++GJ+SZcV4+/iGR0dKU2IdAG5HiKZIFn6ch9Ux+
+UMqeGaYCpkHrTiietHwcXgtVBlE0jFmB/HspmI/O0abK+grMmueaH7XtTI8YHnw0
+mUpL8+yp7mfA7zFusgFgyiBPXeD/NQgg8vja67k++d1VGoXm2xr+5WPQCSbgQoMk
+kOBMLHWJTefd6F4Z5M+oI0VwYbf6eQW246wJgpCHSPR0Vdijd6MAGRWKUuLfDsA9
++12iGbKvwJ2enJlStft2V2LZcjBfdIMbigW1aSVNN5w6m6YVrQPry3WPkWcCAwEA
+AaAAMA0GCSqGSIb3DQEBCwUAA4ICAQCb07d2IjUy1PeHCj/2k/z9FrZSo6K3c8y6
+b/u/MZ0AXPKLPDSo7UYpOJ8Z2cBiJ8jQapjTSEL8POUYqcvCmP55R6u68KmvINHo
++Ly7pP+xPrbA4Q0WmPnz37hQn+I1he0GuEQyjZZqUln9zwp67TsWNKxKtCH+1j8M
+Ltzx6kuHCdPtDUtv291yhVRqvbjiDs+gzdQYNJtAkUbHwHFxu8oZhg8QZGyXYMN8
+TGoQ1LTezFZXJtX69K7WnrDGrjsgB6EMvwkqAFSYNH0LFvI0xo13OOgXr9mrwohA
+76uZtjXL9B15EqrMce6mdUZi46QJuQ2avTi57Lz+fqvsBYdQO89VcFSmqu2nfspN
+QZDrooyjHrlls8MpoBd8fde9oT4uA4/d9SJtuHUnjgGN7Qr7eTruWXL8wVMwFnvL
+igWE4detO9y2gpRLq6uEqzWYMGtN9PXJCGU8C8m9E2EBUKMrT/bpNbboatLcgRrW
+acj0BRVqoVzk1sRq7Sa6ejywqgARvIhTehg6DqdMdcENCPQ7rxDRu5PSDM8/mwIj
+0KYl8d2PlECB4ofRyLcy17BZzjP6hSnkGzcFk0/bChZOSIRnwvKbvfXnB45hhPk8
+XwT/6UNSwC2STP3gtOmLqrWj+OE0gy0AkDMvP3UnQVGMUvgfYg+N4ROCVtlqzxe9
+W65c05Mm1g==
+-----END CERTIFICATE REQUEST-----
diff --git a/playwright/src/test/resources/client-certificates/client/self-signed/key.pem b/playwright/src/test/resources/client-certificates/client/self-signed/key.pem
new file mode 100644
index 00000000..70d5e3dd
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/self-signed/key.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQDXv15OypxzVzcA
+5AfMJkTJgs+1rYIICxxQWpwRn29a+NbS7M6/1MOUHfdSei+NyHgISVk4GHNNp1Wx
+uadgqnHDJVTz1YK5Aq953PiTW+7tLVivJ81uZLw9ZudDh2z00HtKAk0dkgu/H0Ne
+5Z4UTLNEij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j
+0qx7FzdPc2SyGxuvaEnTwuqk6le5/4LIWCnmD+gksDpP0BIHSxmcfsBhRk3rp3mZ
+llVxqKdBtM1PrQojCFxR833RZfzOyzCZwaIc+V5SOUw7yYqfXxmMokrpoQy72ueq
+Wm1LrgWxBaCqDYSop7cftbkUoPB2o3/3SNtVUesCggEAReqOKy3R/QRf53QaoZiw
+9DwsmP0XMndd8J/ONU3d0G9p7SkpCxC05BOJQwH7NEAPqtwoZ3nr8ezDdKVLEGzG
+tfp7ur7vRGuWm5nYW6Viqa3Re5x/GxLNiW8pRv8vC5inwidMEamGraE++eQ0XsXz
+/rF7f0fAGgYDsWFV7eXe49hWQV7+iru0yxdRhcG9WyxyNGrogC3wGLdwU9LMiwXX
+xjbMZzbAR5R1arq3B9u+Dzt57tc+cWTm7qDocT1AZFLeOZSApyBA22foYf6MwdOw
+zMC2JOV68MR7V6/3ZDhZZJrnsi2omXvCZlnh/F/TmTYlJr/BV47pxnnOxpkNSmv5
+nQKCAQBRqrsUVO7NOgR1sVX7YDaekQiJKS6Vq/7y2gR4FoLm/MMzNZQgGo9afmKg
+F2hSv6tuoqc33Wm0FnoSEMaI8ky0qgA5kwXvhfQ6pDf/2zASFBwjwhTyJziDlhum
+iwWe1F7lNaVNpxAXzJBaBTWvHznuM42cGv5bbPBSRuIRniGsyn/zYMrISWgL+h/Q
+fsQ2rfPSqollPw+IUPN0mX+1zg6PFxaR4HM9UrRX7cnRKG20GIDPodsUl8IMg+SO
+M5YG/UqDD10hfeEutvQIvl0oJraBWT34cqUZLVpUwJzf1be7zl9MzHGcym/ni7lX
+dg6m3MAyZ1IXjHlogOdmGvnq07/w
+-----END PRIVATE KEY-----
diff --git a/playwright/src/test/resources/client-certificates/client/trusted/cert.pem b/playwright/src/test/resources/client-certificates/client/trusted/cert.pem
new file mode 100644
index 00000000..76d1e1a5
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/trusted/cert.pem
@@ -0,0 +1,29 @@
+-----BEGIN CERTIFICATE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BQADggIBAGEvSkxhxRKmlvKG8wCXop2OaUUAOG16+T96vd+aFYaJNlfGoPvqv4Lw
+qaHztVktnRrJ//fpNWOsdxkE1uPU4uyGjl2KbyH81JvkE6A3OX0P4B01n8lcimY2
+j3oje6KjORUouYVsypD1VcwfWJgsE3U2Txv5srD8BoemVWgWbWjfyim4kk8C5zlf
+tWEazVAaI4MWecqtU4P5gIEomCI7MG9ebxYp5oQhRxeOndOYdUbSzAkZj50gXFA1
++TNkvuhTFlJF0F7qIFVJSJTmJ+6E5B4ddbkyUYwbOdO+P8mz5N5mSljE+EiIQTxo
+AwbG8cSivMy/jI3h048tCUONAJzcSWCF4k1r9Qr6xbyW2ud2GmKiFCEYJkYTsMWV
+fM/RujTHlGvJ2+bQK5HiNyW0tO9znW9kaoxolu1YBvTh2492v3agK7nALyGGgdo1
+/nN/ikgkQiyaCpZwFeooJv1YFU5aDhR9RjIIJ9UbJ8FdAv8Xd00E3viunLTvqqXK
+RVMokw+tFQTEzjKofKWYArPDjB9LUbN+vQbumKalis3+NlJ3WolYPrCg55tqt1o3
+zXi+xv7120cJFouilRFwrafNFV6F+pRMkMmiWopMnoVJPVXcoqyJRcsmO62uslhg
+BLFgAH4H/14drYrgWIMz0no78RInEz0z507zwLkWk5d9W9pJ/4Rf
+-----END CERTIFICATE-----
diff --git a/playwright/src/test/resources/client-certificates/client/trusted/csr.pem b/playwright/src/test/resources/client-certificates/client/trusted/csr.pem
new file mode 100644
index 00000000..8ead6da3
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/trusted/csr.pem
@@ -0,0 +1,26 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIIEVTCCAj0CAQAwEDEOMAwGA1UEAwwFQWxpY2UwggIiMA0GCSqGSIb3DQEBAQUA
+A4ICDwAwggIKAoICAQCac3+4rNmH4/N1s4HqR2X168tgS/aA6sHW5at8mWRnq54N
+m11RvnK55jHQYVAdBgJy5M07w0wakp8inxzlY95wqxBimYG63Un/1p7mX9FkB4L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MS7hb7GL7+bkRy9kWjmDL7z7Fp+EgzKhNmzuWII3E9X9va33HoQ/Q
+UdK3JVToxRQg6XRKOxL9+U/+8i6U8lxObLWkWh2cypZqbz5qJxa+2u5JYO/KEoHZ
+G963UX7XWezR98vZuTc1XHGZtBDMrjjDd7Kmb4/i/xBPeWwseeGtzFy9z2pnEnkL
+uKE4C8wUNpzUUlsn4LneZXObIoErE7FqAAlVFujVe7iaJBmXoUXZR36drbfiaODK
+vwAGyrYHaOlR
+-----END CERTIFICATE REQUEST-----
diff --git a/playwright/src/test/resources/client-certificates/client/trusted/key.pem b/playwright/src/test/resources/client-certificates/client/trusted/key.pem
new file mode 100644
index 00000000..d60201e5
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/client/trusted/key.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJRAIBADANBgkqhkiG9w0BAQEFAASCCS4wggkqAgEAAoICAQCac3+4rNmH4/N1
+s4HqR2X168tgS/aA6sHW5at8mWRnq54Nm11RvnK55jHQYVAdBgJy5M07w0wakp8i
+nxzlY95wqxBimYG63Un/1p7mX9FkB4LNISCc6j/s/Ufv85MXPbn0S5rm9UcQO9cI
+NJb1RP1YgDDLN5cxMz6X4nyofN8H6Lhvh4JDdBw4DfDEFERkVfF+bkZ7YW4XHECh
+gzm3RxCF0eeGzIXGrkkK9AsSdJAhOvTlHPFCQKXTYZhsL5+3Ma4RnWnDWvLTHx6K
+zoU+twTM2mYhhQuQgQpnmDHxGge8kGeHGtfdgAjtVJTE57xF/shP0JU+tuIV8NNh
+Q/vEmhL0Wa093/EvpTVp0EUEuDh9ORRH5K5M4bKJyU4XX5noiht6yOn00uaoJcWd
+uUAWsU+cDSvDTMw81opWWm0QIAV3G2yuRSkumHAKqvQLeyeyiKz+OEhyEiZ7EZNE
+xPD0TSpApSTU6aCTUAvPYGQ59VjsMHTuJ9r4wKIYaDvfL+t72vg2vTQma5cTOBJf
+IdxH9blFTjEnToH3LX8t0XndQ2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Za9k43HiX/C6nb6AAU7gQrHHmnehLN9FqeXh/TXCQkAuppDfOiAuUUPcfyiMqW6
+gVnacZV2rkNJPjKlX27RoaNATZ2e8lKqldpZHD11HKcrIzNPLDKIiPLtytmt3vhg
+mNSlAoIBAQDMN3FoQfV+Tlky5xt87ImsajdIhf7JI35hq6Zb4+vwR7/vofbzoomS
++fuivH1+1skQIuEn41G4uwZps9NPRm5sWrjOo869DYPn5Nm8qTGqv/GD28OQQClB
+3/vcwrn5limm3pbQg+z+67fFmorSyLHcZ+ky60lWeE9uXCsVjt7eH6B+Rhs9Jafg
+MbWRZ1C3Gezb1J42XVZ8hczn6r+qmWFTbSY4RzNBqd83motWXIgtybJIV4LB4t06
+JkVNCotSicw0vtZk95AfjQksemAq2fFzJfASxtw8IE/WHW4jtvfZ9PPWDt9U83ll
+Y+eu85cike5J4vnz8uG04yt7rXjIrUav
+-----END PRIVATE KEY-----
diff --git a/playwright/src/test/resources/client-certificates/server/server_cert.pem b/playwright/src/test/resources/client-certificates/server/server_cert.pem
new file mode 100644
index 00000000..52d8f531
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/server/server_cert.pem
@@ -0,0 +1,32 @@
+-----BEGIN CERTIFICATE-----
+MIIFdTCCA12gAwIBAgIUNPWupe2xcu8YYG1ozoqk9viqDJswDQYJKoZIhvcNAQEL
+BQAwNjESMBAGA1UEAwwJbG9jYWxob3N0MSAwHgYDVQQKDBdDbGllbnQgQ2VydGlm
+aWNhdGUgRGVtbzAeFw0yNDA3MTkxMjQ3MzNaFw0yNTA3MTkxMjQ3MzNaMDYxEjAQ
+BgNVBAMMCWxvY2FsaG9zdDEgMB4GA1UECgwXQ2xpZW50IENlcnRpZmljYXRlIERl
+bW8wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC+K5JWhlfvI47ZL/Az
+L0xnOl+cMelr2BqH+7XS8187SbvluhFfFkq/7V7rwgsHI64sn8pgRCOnqKWV6jtb
+651dGzn7Nby6InmyOQ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CKESQhrIcRUtu5eVk0lho6ttHODXF8bM7iWLoRc7
+rpcllI4HXHoXQqQkZHRa7KwTf0YVwwQbXTecZONWXwE9Ej5R5IcZzja5FWCSstsb
+ULNW0JVxGBE7j5aOjxasYAbRexDmlfEdLvnp6bctZuvMvuBxrB+x5HSEZl6bVnbC
+nvtoslylQJM1bwlZdCqJm04JXe1787HDBef2gABv27BjvG/zn89L5ipogZCrGpl6
+P9qs0eSERHuSrm3eHUVgXSQ1nbvOpk7RPFbsbp/npc1NbEDBdAMoXhLP9A+ytxLq
+TF+w08nfCF6yJJ3jTkvABo10UH6zcPnfH3Ys7JYsHRbcloMfn+mc88KrTaCO+VZx
+qjhFcz+zDu/AbtJkDJtxX2X7jNL0pzWS+9H8jFTrd3ta8XrJiSFq2VMxEU6R0IHk
+2Ct10prMWB/3
+-----END CERTIFICATE-----
diff --git a/playwright/src/test/resources/client-certificates/server/server_key.pem b/playwright/src/test/resources/client-certificates/server/server_key.pem
new file mode 100644
index 00000000..ff6a3fc1
--- /dev/null
+++ b/playwright/src/test/resources/client-certificates/server/server_key.pem
@@ -0,0 +1,52 @@
+-----BEGIN PRIVATE KEY-----
+MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQC+K5JWhlfvI47Z
+L/AzL0xnOl+cMelr2BqH+7XS8187SbvluhFfFkq/7V7rwgsHI64sn8pgRCOnqKWV
+6jtb651dGzn7Nby6InmyOQzF4VwfSVWQ6BYXgXuryS9Gm0gi8sOL1Ji/jV49n1gz
+LyIxLNhd7NG2DCCedTHJnxyz4xq8MWhI/qI85iWJqcHhxkDb8wtH1Vd6nd/ZRVDb
+jgTvPH3EDK7JqmnYG9+x4Jz0yEhvV7jL3gNu2mIyttvm7oRna9oHgaKFUJt4BCfP
+bT5U3ipvcq29hdD5/5QIDzTWcExTnklolg5xpFext1+3KPSppESxcfBBNoL3h1B8
+ZcZalEMC/IoFUIDJQj5gmSn4okwMWIxgf+AL0609MKEqQ2FavOsvBmh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cTGNRclzcZkJ9eojpllZqfWcx
+kqMJ3ulisoJ8zxAnvqK2sSSUVOFnYzSJA1HQ1NTp570xvYihI2R9wV5uDlAKcdP9
+bXEDI9Ebo2PfMpA9Hx3EwFnn4iDNfDWM6lgwzmgFtIE5+zqnbbSF0onN9R9o+oxc
+P8Val+rspzWwznFHJlZ0Uh478xlgVHh2wgpu+7ZKBfQM0kF8ryefkOXMBTr7SVXX
+BBLyn0Wxbzs+kFf+8B+c0mL17pQdzX0BXGMZNhEypBEtXYFSWD02Ky3cDCDOwsZR
+uQKCAQAKQtsUSO80N/kzsWuSxHhuLMTvNZfiE/qK1Mz5Rw1qXxMXfYNFZbU/MqW7
+5DLd4Kn7s3v1UlBn2tbLGLzghnHYRxT9kxF7ZnY6HZv2IrEUjE2I2YTTCQr/Q7Z5
+gRBQb5z+vJbKOYnlSHurTexKmuTjgJ/y/jRQiQABccVj1w5lIm1SPoxpdKzSFyWt
+0NVmff9VetoiWKJYldPBTOmqPUytuBZyX5fJ4pPixwgAns6ZaqJtVNyMZkZ/GoDk
+XP2CvB/HyMiS7vXK5QJYYumk7oyC15H6eDChITNPV3VGH2QqcdEvDLT81W+JZ2mX
+8ynLaTs3oV3BjQya9pAUyzIX5L67
+-----END PRIVATE KEY-----
diff --git a/playwright/src/test/resources/client-certificates/server/server_keystore.p12 b/playwright/src/test/resources/client-certificates/server/server_keystore.p12
new file mode 100644
index 00000000..b3f9a2a1
Binary files /dev/null and b/playwright/src/test/resources/client-certificates/server/server_keystore.p12 differ
diff --git a/scripts/DRIVER_VERSION b/scripts/DRIVER_VERSION
index 6e22ca2a..eeaaf946 100644
--- a/scripts/DRIVER_VERSION
+++ b/scripts/DRIVER_VERSION
@@ -1 +1 @@
-1.45.0-beta-1719505820000
+1.46.0-beta-1722449265000
diff --git a/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java b/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java
index e08b8b5f..ebe277e5 100644
--- a/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java
+++ b/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java
@@ -276,6 +276,11 @@ class TypeRef extends Element {
private static final Map customTypeNames = new HashMap<>();
static {
+ customTypeNames.put("APIRequest.newContext.options.clientCertificates", "ClientCertificate");
+ customTypeNames.put("Browser.newContext.options.clientCertificates", "ClientCertificate");
+ customTypeNames.put("Browser.newPage.options.clientCertificates", "ClientCertificate");
+ customTypeNames.put("BrowserType.launchPersistentContext.options.clientCertificates", "ClientCertificate");
+
customTypeNames.put("BrowserContext.addCookies.cookies", "Cookie");
customTypeNames.put("BrowserContext.cookies", "Cookie");
@@ -1095,8 +1100,9 @@ class CustomClass extends TypeDefinition {
@Override
void writeTo(List output, String offset) {
- if (asList("RecordHar", "RecordVideo").contains(name)) {
+ if (asList("ClientCertificate").contains(name)) {
output.add("import java.nio.file.Path;");
+ output.add("");
}
String access = (parent.typeScope() instanceof CustomClass) || topLevelTypes().containsKey(name) ? "public " : "";
output.add(offset + access + "class " + name + " {");