Skip to content

Commit

Permalink
chore: roll to 1.35.0-beta (microsoft#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Jun 9, 2023
1 parent b8a9d88 commit 4e52859
Show file tree
Hide file tree
Showing 21 changed files with 267 additions and 124 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->114.0.5735.35<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->115.0.5790.13<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->16.4<!-- GEN:stop --> ||||
| Firefox <!-- GEN:firefox-version -->113.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class NewContextOptions {
*/
public String baseURL;
/**
* An object containing additional HTTP headers to be sent with every request.
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
public Map<String, String> extraHTTPHeaders;
/**
Expand Down Expand Up @@ -100,7 +100,7 @@ public NewContextOptions setBaseURL(String baseURL) {
return this;
}
/**
* An object containing additional HTTP headers to be sent with every request.
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
public NewContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) {
this.extraHTTPHeaders = extraHTTPHeaders;
Expand Down
84 changes: 46 additions & 38 deletions playwright/src/main/java/com/microsoft/playwright/Browser.java

Large diffs are not rendered by default.

36 changes: 20 additions & 16 deletions playwright/src/main/java/com/microsoft/playwright/BrowserType.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class LaunchPersistentContextOptions {
* Page.waitForURL()}, {@link Page#waitForRequest Page.waitForRequest()}, or {@link Page#waitForResponse
* Page.waitForResponse()} it takes the base URL in consideration by using the <a
* href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL">{@code URL()}</a> constructor for building the
* corresponding URL. Examples:
* corresponding URL. Unset by default. Examples:
* <ul>
* <li> baseURL: {@code http://localhost:3000} and navigating to {@code /bar.html} results in {@code
* http://localhost:3000/bar.html}</li>
Expand All @@ -394,7 +394,7 @@ class LaunchPersistentContextOptions {
*/
public String baseURL;
/**
* Toggles bypassing page's Content-Security-Policy.
* Toggles bypassing page's Content-Security-Policy. Defaults to {@code false}.
*/
public Boolean bypassCSP;
/**
Expand Down Expand Up @@ -440,7 +440,7 @@ class LaunchPersistentContextOptions {
*/
public Path executablePath;
/**
* An object containing additional HTTP headers to be sent with every request.
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
public Map<String, String> extraHTTPHeaders;
/**
Expand Down Expand Up @@ -506,8 +506,9 @@ class LaunchPersistentContextOptions {
public Boolean javaScriptEnabled;
/**
* Specify user locale, for example {@code en-GB}, {@code de-DE}, etc. Locale will affect {@code navigator.language} value,
* {@code Accept-Language} request header value as well as number and date formatting rules. Learn more about emulation in
* our <a href="https://playwright.dev/java/docs/emulation#locale--timezone">emulation guide</a>.
* {@code Accept-Language} request header value as well as number and date formatting rules. Defaults to the system default
* locale. Learn more about emulation in our <a
* href="https://playwright.dev/java/docs/emulation#locale--timezone">emulation guide</a>.
*/
public String locale;
/**
Expand All @@ -517,7 +518,7 @@ class LaunchPersistentContextOptions {
public Boolean offline;
/**
* A list of permissions to grant to all pages in this context. See {@link BrowserContext#grantPermissions
* BrowserContext.grantPermissions()} for more details.
* BrowserContext.grantPermissions()} for more details. Defaults to none.
*/
public List<String> permissions;
/**
Expand Down Expand Up @@ -585,7 +586,8 @@ class LaunchPersistentContextOptions {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors
* that imply single target DOM element will throw when more than one element matches the selector. This option does not
* affect any Locator APIs (Locators are always strict). See {@code Locator} to learn more about the strict mode.
* affect any Locator APIs (Locators are always strict). Defaults to {@code false}. See {@code Locator} to learn more about
* the strict mode.
*/
public Boolean strictSelectors;
/**
Expand All @@ -596,7 +598,7 @@ class LaunchPersistentContextOptions {
/**
* Changes the timezone of the context. See <a
* href="https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1">ICU's
* metaZones.txt</a> for a list of supported timezone IDs.
* metaZones.txt</a> for a list of supported timezone IDs. Defaults to the system timezone.
*/
public String timezoneId;
/**
Expand Down Expand Up @@ -637,7 +639,7 @@ public LaunchPersistentContextOptions setArgs(List<String> args) {
* Page.waitForURL()}, {@link Page#waitForRequest Page.waitForRequest()}, or {@link Page#waitForResponse
* Page.waitForResponse()} it takes the base URL in consideration by using the <a
* href="https://developer.mozilla.org/en-US/docs/Web/API/URL/URL">{@code URL()}</a> constructor for building the
* corresponding URL. Examples:
* corresponding URL. Unset by default. Examples:
* <ul>
* <li> baseURL: {@code http://localhost:3000} and navigating to {@code /bar.html} results in {@code
* http://localhost:3000/bar.html}</li>
Expand All @@ -652,7 +654,7 @@ public LaunchPersistentContextOptions setBaseURL(String baseURL) {
return this;
}
/**
* Toggles bypassing page's Content-Security-Policy.
* Toggles bypassing page's Content-Security-Policy. Defaults to {@code false}.
*/
public LaunchPersistentContextOptions setBypassCSP(boolean bypassCSP) {
this.bypassCSP = bypassCSP;
Expand Down Expand Up @@ -735,7 +737,7 @@ public LaunchPersistentContextOptions setExecutablePath(Path executablePath) {
return this;
}
/**
* An object containing additional HTTP headers to be sent with every request.
* An object containing additional HTTP headers to be sent with every request. Defaults to none.
*/
public LaunchPersistentContextOptions setExtraHTTPHeaders(Map<String, String> extraHTTPHeaders) {
this.extraHTTPHeaders = extraHTTPHeaders;
Expand Down Expand Up @@ -853,8 +855,9 @@ public LaunchPersistentContextOptions setJavaScriptEnabled(boolean javaScriptEna
}
/**
* Specify user locale, for example {@code en-GB}, {@code de-DE}, etc. Locale will affect {@code navigator.language} value,
* {@code Accept-Language} request header value as well as number and date formatting rules. Learn more about emulation in
* our <a href="https://playwright.dev/java/docs/emulation#locale--timezone">emulation guide</a>.
* {@code Accept-Language} request header value as well as number and date formatting rules. Defaults to the system default
* locale. Learn more about emulation in our <a
* href="https://playwright.dev/java/docs/emulation#locale--timezone">emulation guide</a>.
*/
public LaunchPersistentContextOptions setLocale(String locale) {
this.locale = locale;
Expand All @@ -870,7 +873,7 @@ public LaunchPersistentContextOptions setOffline(boolean offline) {
}
/**
* A list of permissions to grant to all pages in this context. See {@link BrowserContext#grantPermissions
* BrowserContext.grantPermissions()} for more details.
* BrowserContext.grantPermissions()} for more details. Defaults to none.
*/
public LaunchPersistentContextOptions setPermissions(List<String> permissions) {
this.permissions = permissions;
Expand Down Expand Up @@ -1002,7 +1005,8 @@ public LaunchPersistentContextOptions setSlowMo(double slowMo) {
/**
* If set to true, enables strict selectors mode for this context. In the strict selectors mode all operations on selectors
* that imply single target DOM element will throw when more than one element matches the selector. This option does not
* affect any Locator APIs (Locators are always strict). See {@code Locator} to learn more about the strict mode.
* affect any Locator APIs (Locators are always strict). Defaults to {@code false}. See {@code Locator} to learn more about
* the strict mode.
*/
public LaunchPersistentContextOptions setStrictSelectors(boolean strictSelectors) {
this.strictSelectors = strictSelectors;
Expand All @@ -1019,7 +1023,7 @@ public LaunchPersistentContextOptions setTimeout(double timeout) {
/**
* Changes the timezone of the context. See <a
* href="https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1">ICU's
* metaZones.txt</a> for a list of supported timezone IDs.
* metaZones.txt</a> for a list of supported timezone IDs. Defaults to the system timezone.
*/
public LaunchPersistentContextOptions setTimezoneId(String timezoneId) {
this.timezoneId = timezoneId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public interface ConsoleMessage {
/**
* The page that produced this console message, if any.
*
* @since v1.33
* @since v1.34
*/
Page page();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ default void accept() {
/**
* The page that initiated this dialog, if available.
*
* @since v1.33
* @since v1.34
*/
Page page();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -602,9 +602,15 @@ class ScreenshotOptions {
public ScreenshotCaret caret;
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public List<Locator> mask;
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public String maskColor;
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down Expand Up @@ -663,12 +669,21 @@ public ScreenshotOptions setCaret(ScreenshotCaret caret) {
}
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public ScreenshotOptions setMask(List<Locator> mask) {
this.mask = mask;
return this;
}
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public ScreenshotOptions setMaskColor(String maskColor) {
this.maskColor = maskColor;
return this;
}
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down
21 changes: 18 additions & 3 deletions playwright/src/main/java/com/microsoft/playwright/Locator.java
Original file line number Diff line number Diff line change
Expand Up @@ -1407,9 +1407,15 @@ class ScreenshotOptions {
public ScreenshotCaret caret;
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public List<Locator> mask;
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public String maskColor;
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down Expand Up @@ -1468,12 +1474,21 @@ public ScreenshotOptions setCaret(ScreenshotCaret caret) {
}
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public ScreenshotOptions setMask(List<Locator> mask) {
this.mask = mask;
return this;
}
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public ScreenshotOptions setMaskColor(String maskColor) {
this.maskColor = maskColor;
return this;
}
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down Expand Up @@ -2067,7 +2082,7 @@ public WaitForOptions setTimeout(double timeout) {
* }</pre>
*
* @param locator Additional locator to match.
* @since v1.33
* @since v1.34
*/
Locator and(Locator locator);
/**
Expand Down
19 changes: 17 additions & 2 deletions playwright/src/main/java/com/microsoft/playwright/Page.java
Original file line number Diff line number Diff line change
Expand Up @@ -2407,9 +2407,15 @@ class ScreenshotOptions {
public Boolean fullPage;
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public List<Locator> mask;
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public String maskColor;
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down Expand Up @@ -2489,12 +2495,21 @@ public ScreenshotOptions setFullPage(boolean fullPage) {
}
/**
* Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink box
* {@code #FF00FF} that completely covers its bounding box.
* {@code #FF00FF} (customized by {@code maskColor}) that completely covers its bounding box.
*/
public ScreenshotOptions setMask(List<Locator> mask) {
this.mask = mask;
return this;
}
/**
* Specify the color of the overlay box for masked elements, in <a
* href="https://developer.mozilla.org/en-US/docs/Web/CSS/color_value">CSS color format</a>. Default color is pink {@code
* #FF00FF}.
*/
public ScreenshotOptions setMaskColor(String maskColor) {
this.maskColor = maskColor;
return this;
}
/**
* Hides default white background and allows capturing screenshots with transparency. Not applicable to {@code jpeg}
* images. Defaults to {@code false}.
Expand Down
Loading

0 comments on commit 4e52859

Please sign in to comment.