Skip to content

Commit

Permalink
chore: roll driver to 1.37.0-beta (#1348)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s committed Aug 11, 2023
1 parent 4b873ec commit d3495ca
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 41 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 -->115.0.5790.75<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| Chromium <!-- GEN:chromium-version -->116.0.5845.82<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| WebKit <!-- GEN:webkit-version -->17.0<!-- GEN:stop --> ||||
| Firefox <!-- GEN:firefox-version -->115.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |

Expand Down
32 changes: 16 additions & 16 deletions playwright/src/main/java/com/microsoft/playwright/Browser.java
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class NewContextOptions {
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public Boolean isMobile;
/**
Expand Down Expand Up @@ -236,8 +236,8 @@ class NewContextOptions {
*/
public String userAgent;
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down Expand Up @@ -351,7 +351,7 @@ public NewContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public NewContextOptions setIsMobile(boolean isMobile) {
this.isMobile = isMobile;
Expand Down Expand Up @@ -559,8 +559,8 @@ public NewContextOptions setUserAgent(String userAgent) {
return this;
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand All @@ -570,8 +570,8 @@ public NewContextOptions setViewportSize(int width, int height) {
return setViewportSize(new ViewportSize(width, height));
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down Expand Up @@ -646,7 +646,7 @@ class NewPageOptions {
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public Boolean isMobile;
/**
Expand Down Expand Up @@ -762,8 +762,8 @@ class NewPageOptions {
*/
public String userAgent;
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down Expand Up @@ -877,7 +877,7 @@ public NewPageOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public NewPageOptions setIsMobile(boolean isMobile) {
this.isMobile = isMobile;
Expand Down Expand Up @@ -1085,8 +1085,8 @@ public NewPageOptions setUserAgent(String userAgent) {
return this;
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand All @@ -1096,8 +1096,8 @@ public NewPageOptions setViewportSize(int width, int height) {
return setViewportSize(new ViewportSize(width, height));
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ default void route(Predicate<String> url, Consumer<Route> handler) {
void route(Predicate<String> url, Consumer<Route> handler, RouteOptions options);
/**
* If specified the network requests that are made in the context will be served from the HAR file. Read more about <a
* href="https://playwright.dev/java/docs/network#replaying-from-har">Replaying from HAR</a>.
* href="https://playwright.dev/java/docs/mock#replaying-from-har">Replaying from HAR</a>.
*
* <p> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a
* href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when
Expand All @@ -1131,7 +1131,7 @@ default void routeFromHAR(Path har) {
}
/**
* If specified the network requests that are made in the context will be served from the HAR file. Read more about <a
* href="https://playwright.dev/java/docs/network#replaying-from-har">Replaying from HAR</a>.
* href="https://playwright.dev/java/docs/mock#replaying-from-har">Replaying from HAR</a>.
*
* <p> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a
* href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when
Expand Down
59 changes: 51 additions & 8 deletions playwright/src/main/java/com/microsoft/playwright/BrowserType.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@
*/
public interface BrowserType {
class ConnectOptions {
/**
* This option exposes network available on the connecting client to the browser being connected to. Consists of a list of
* rules separated by comma.
*
* <p> Available rules:
* <ol>
* <li> Hostname pattern, for example: {@code example.com}, {@code *.org:99}, {@code x.*.y.com}, {@code *foo.org}.</li>
* <li> IP literal, for example: {@code 127.0.0.1}, {@code 0.0.0.0:99}, {@code [::1]}, {@code [0:0::1]:99}.</li>
* <li> {@code <loopback>} that matches local loopback interfaces: {@code localhost}, {@code *.localhost}, {@code 127.0.0.1},
* {@code [::1]}.</li>
* </ol>
*
* <p> Some common examples:
* <ol>
* <li> {@code "*"} to expose all network.</li>
* <li> {@code "<loopback>"} to expose localhost network.</li>
* <li> {@code "*.test.internal-domain,*.staging.internal-domain,<loopback>"} to expose test/staging deployments and localhost.</li>
* </ol>
*/
public String exposeNetwork;
/**
* Additional HTTP headers to be sent with web socket connect request. Optional.
*/
Expand All @@ -57,6 +77,29 @@ class ConnectOptions {
*/
public Double timeout;

/**
* This option exposes network available on the connecting client to the browser being connected to. Consists of a list of
* rules separated by comma.
*
* <p> Available rules:
* <ol>
* <li> Hostname pattern, for example: {@code example.com}, {@code *.org:99}, {@code x.*.y.com}, {@code *foo.org}.</li>
* <li> IP literal, for example: {@code 127.0.0.1}, {@code 0.0.0.0:99}, {@code [::1]}, {@code [0:0::1]:99}.</li>
* <li> {@code <loopback>} that matches local loopback interfaces: {@code localhost}, {@code *.localhost}, {@code 127.0.0.1},
* {@code [::1]}.</li>
* </ol>
*
* <p> Some common examples:
* <ol>
* <li> {@code "*"} to expose all network.</li>
* <li> {@code "<loopback>"} to expose localhost network.</li>
* <li> {@code "*.test.internal-domain,*.staging.internal-domain,<loopback>"} to expose test/staging deployments and localhost.</li>
* </ol>
*/
public ConnectOptions setExposeNetwork(String exposeNetwork) {
this.exposeNetwork = exposeNetwork;
return this;
}
/**
* Additional HTTP headers to be sent with web socket connect request. Optional.
*/
Expand Down Expand Up @@ -496,7 +539,7 @@ class LaunchPersistentContextOptions {
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public Boolean isMobile;
/**
Expand Down Expand Up @@ -610,8 +653,8 @@ class LaunchPersistentContextOptions {
*/
public String userAgent;
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down Expand Up @@ -839,7 +882,7 @@ public LaunchPersistentContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSEr
/**
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
*/
public LaunchPersistentContextOptions setIsMobile(boolean isMobile) {
this.isMobile = isMobile;
Expand Down Expand Up @@ -1044,8 +1087,8 @@ public LaunchPersistentContextOptions setUserAgent(String userAgent) {
return this;
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand All @@ -1055,8 +1098,8 @@ public LaunchPersistentContextOptions setViewportSize(int width, int height) {
return setViewportSize(new ViewportSize(width, height));
}
/**
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
* emulation</a>.
*
* <p> <strong>NOTE:</strong> The {@code null} value opts out from the default presets, makes viewport depend on the host window size defined by the
Expand Down
8 changes: 6 additions & 2 deletions playwright/src/main/java/com/microsoft/playwright/Frame.java
Original file line number Diff line number Diff line change
Expand Up @@ -4473,7 +4473,9 @@ default void setChecked(String selector, boolean checked) {
*/
void setChecked(String selector, boolean checked, SetCheckedOptions options);
/**
*
* This method internally calls <a
* href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific
* characteristics and behaviors.
*
* @param html HTML markup to assign to the page.
* @since v1.8
Expand All @@ -4482,7 +4484,9 @@ default void setContent(String html) {
setContent(html, null);
}
/**
*
* This method internally calls <a
* href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific
* characteristics and behaviors.
*
* @param html HTML markup to assign to the page.
* @since v1.8
Expand Down
14 changes: 10 additions & 4 deletions playwright/src/main/java/com/microsoft/playwright/Locator.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

/**
* Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a way
* to find element(s) on the page at any moment. Locator can be created with the {@link Page#locator Page.locator()}
* to find element(s) on the page at any moment. A locator can be created with the {@link Page#locator Page.locator()}
* method.
*
* <p> <a href="https://playwright.dev/java/docs/locators">Learn more about locators</a>.
Expand Down Expand Up @@ -2033,7 +2033,7 @@ public WaitForOptions setTimeout(double timeout) {
}
}
/**
* When locator points to a list of elements, returns array of locators, pointing to respective elements.
* When the locator points to a list of elements, this returns an array of locators, pointing to their respective elements.
*
* <p> <strong>NOTE:</strong> {@link Locator#all Locator.all()} does not wait for elements to match the locator, and instead immediately returns
* whatever is present in the page. When the list of elements changes dynamically, {@link Locator#all Locator.all()} will
Expand Down Expand Up @@ -4865,7 +4865,10 @@ default String textContent() {
*/
String textContent(TextContentOptions options);
/**
* Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
* <strong>NOTE:</strong> In most cases, you should use {@link Locator#fill Locator.fill()} instead. You only need to type characters if there is
* special keyboard handling on the page.
*
* <p> Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
* character in the text.
*
* <p> To press a special key, like {@code Control} or {@code ArrowDown}, use {@link Locator#press Locator.press()}.
Expand All @@ -4890,7 +4893,10 @@ default void type(String text) {
type(text, null);
}
/**
* Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
* <strong>NOTE:</strong> In most cases, you should use {@link Locator#fill Locator.fill()} instead. You only need to type characters if there is
* special keyboard handling on the page.
*
* <p> Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
* character in the text.
*
* <p> To press a special key, like {@code Control} or {@code ArrowDown}, use {@link Locator#press Locator.press()}.
Expand Down
Loading

0 comments on commit d3495ca

Please sign in to comment.