Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->127.0.6533.17<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->127.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->128.0.6613.7<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->18.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->128.0<!-- GEN:stop --> | :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.

Expand Down
35 changes: 35 additions & 0 deletions playwright/src/main/java/com/microsoft/playwright/APIRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ class NewContextOptions {
* </ul>
*/
public String baseURL;
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> clientCertificates;
/**
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
Expand Down Expand Up @@ -100,6 +116,25 @@ public NewContextOptions setBaseURL(String baseURL) {
this.baseURL = baseURL;
return this;
}
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> clientCertificates) {
this.clientCertificates = clientCertificates;
return this;
}
/**
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
Expand Down
70 changes: 70 additions & 0 deletions playwright/src/main/java/com/microsoft/playwright/Browser.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,22 @@ class NewContextOptions {
* 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.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down Expand Up @@ -295,6 +311,25 @@ public NewContextOptions setBypassCSP(boolean bypassCSP) {
this.bypassCSP = bypassCSP;
return this;
}
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down Expand Up @@ -626,6 +661,22 @@ class NewPageOptions {
* 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.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down Expand Up @@ -825,6 +876,25 @@ public NewPageOptions setBypassCSP(boolean bypassCSP) {
this.bypassCSP = bypassCSP;
return this;
}
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,6 @@ public WaitForPageOptions setTimeout(double timeout) {
* browserContext.addCookies(Arrays.asList(cookieObject1, cookieObject2));
* }</pre>
*
* @param cookies Adds cookies to the browser context.
*
* <p> 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<Cookie> cookies);
Expand Down
35 changes: 35 additions & 0 deletions playwright/src/main/java/com/microsoft/playwright/BrowserType.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,22 @@ class LaunchPersistentContextOptions {
* Enable Chromium sandboxing. Defaults to {@code false}.
*/
public Boolean chromiumSandbox;
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down Expand Up @@ -742,6 +758,25 @@ public LaunchPersistentContextOptions setChromiumSandbox(boolean chromiumSandbox
this.chromiumSandbox = chromiumSandbox;
return this;
}
/**
* TLS Client Authentication allows the server to request a client certificate and verify it.
*
* <p> <strong>Details</strong>
*
* <p> 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.
*
* <p> <strong>NOTE:</strong> Using Client Certificates in combination with Proxy Servers is not supported.
*
* <p> <strong>NOTE:</strong> 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<ClientCertificate> 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
Expand Down
12 changes: 9 additions & 3 deletions playwright/src/main/java/com/microsoft/playwright/Clock.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ default void install() {
* page.clock().pauseAt("2020-02-02");
* }</pre>
*
* @param time Time to pause at.
* @since v1.45
*/
void pauseAt(long time);
Expand All @@ -193,6 +194,7 @@ default void install() {
* page.clock().pauseAt("2020-02-02");
* }</pre>
*
* @param time Time to pause at.
* @since v1.45
*/
void pauseAt(String time);
Expand All @@ -212,6 +214,7 @@ default void install() {
* page.clock().pauseAt("2020-02-02");
* }</pre>
*
* @param time Time to pause at.
* @since v1.45
*/
void pauseAt(Date time);
Expand All @@ -231,7 +234,7 @@ default void install() {
* page.clock().setFixedTime("2020-02-02");
* }</pre>
*
* @param time Time to be set.
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(long time);
Expand All @@ -245,7 +248,7 @@ default void install() {
* page.clock().setFixedTime("2020-02-02");
* }</pre>
*
* @param time Time to be set.
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(String time);
Expand All @@ -259,7 +262,7 @@ default void install() {
* page.clock().setFixedTime("2020-02-02");
* }</pre>
*
* @param time Time to be set.
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setFixedTime(Date time);
Expand All @@ -273,6 +276,7 @@ default void install() {
* page.clock().setSystemTime("2020-02-02");
* }</pre>
*
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(long time);
Expand All @@ -286,6 +290,7 @@ default void install() {
* page.clock().setSystemTime("2020-02-02");
* }</pre>
*
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(String time);
Expand All @@ -299,6 +304,7 @@ default void install() {
* page.clock().setSystemTime("2020-02-02");
* }</pre>
*
* @param time Time to be set in milliseconds.
* @since v1.45
*/
void setSystemTime(Date time);
Expand Down
Loading