Skip to content

Commit d3495ca

Browse files
authored
chore: roll driver to 1.37.0-beta (#1348)
1 parent 4b873ec commit d3495ca

File tree

15 files changed

+172
-41
lines changed

15 files changed

+172
-41
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Playwright is a Java library to automate [Chromium](https://www.chromium.org/Hom
1111

1212
| | Linux | macOS | Windows |
1313
| :--- | :---: | :---: | :---: |
14-
| Chromium <!-- GEN:chromium-version -->115.0.5790.75<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
14+
| Chromium <!-- GEN:chromium-version -->116.0.5845.82<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1515
| WebKit <!-- GEN:webkit-version -->17.0<!-- GEN:stop --> ||||
1616
| Firefox <!-- GEN:firefox-version -->115.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1717

playwright/src/main/java/com/microsoft/playwright/Browser.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class NewContextOptions {
120120
/**
121121
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
122122
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
123-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
123+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
124124
*/
125125
public Boolean isMobile;
126126
/**
@@ -236,8 +236,8 @@ class NewContextOptions {
236236
*/
237237
public String userAgent;
238238
/**
239-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
240-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
239+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
240+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
241241
* emulation</a>.
242242
*
243243
* <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
@@ -351,7 +351,7 @@ public NewContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
351351
/**
352352
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
353353
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
354-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
354+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
355355
*/
356356
public NewContextOptions setIsMobile(boolean isMobile) {
357357
this.isMobile = isMobile;
@@ -559,8 +559,8 @@ public NewContextOptions setUserAgent(String userAgent) {
559559
return this;
560560
}
561561
/**
562-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
563-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
562+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
563+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
564564
* emulation</a>.
565565
*
566566
* <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
@@ -570,8 +570,8 @@ public NewContextOptions setViewportSize(int width, int height) {
570570
return setViewportSize(new ViewportSize(width, height));
571571
}
572572
/**
573-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
574-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
573+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
574+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
575575
* emulation</a>.
576576
*
577577
* <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
@@ -646,7 +646,7 @@ class NewPageOptions {
646646
/**
647647
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
648648
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
649-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
649+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
650650
*/
651651
public Boolean isMobile;
652652
/**
@@ -762,8 +762,8 @@ class NewPageOptions {
762762
*/
763763
public String userAgent;
764764
/**
765-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
766-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
765+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
766+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
767767
* emulation</a>.
768768
*
769769
* <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
@@ -877,7 +877,7 @@ public NewPageOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSErrors) {
877877
/**
878878
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
879879
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
880-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
880+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
881881
*/
882882
public NewPageOptions setIsMobile(boolean isMobile) {
883883
this.isMobile = isMobile;
@@ -1085,8 +1085,8 @@ public NewPageOptions setUserAgent(String userAgent) {
10851085
return this;
10861086
}
10871087
/**
1088-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
1089-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
1088+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
1089+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
10901090
* emulation</a>.
10911091
*
10921092
* <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
@@ -1096,8 +1096,8 @@ public NewPageOptions setViewportSize(int width, int height) {
10961096
return setViewportSize(new ViewportSize(width, height));
10971097
}
10981098
/**
1099-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
1100-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
1099+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
1100+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
11011101
* emulation</a>.
11021102
*
11031103
* <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

playwright/src/main/java/com/microsoft/playwright/BrowserContext.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,7 @@ default void route(Predicate<String> url, Consumer<Route> handler) {
11161116
void route(Predicate<String> url, Consumer<Route> handler, RouteOptions options);
11171117
/**
11181118
* If specified the network requests that are made in the context will be served from the HAR file. Read more about <a
1119-
* href="https://playwright.dev/java/docs/network#replaying-from-har">Replaying from HAR</a>.
1119+
* href="https://playwright.dev/java/docs/mock#replaying-from-har">Replaying from HAR</a>.
11201120
*
11211121
* <p> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a
11221122
* href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when
@@ -1131,7 +1131,7 @@ default void routeFromHAR(Path har) {
11311131
}
11321132
/**
11331133
* If specified the network requests that are made in the context will be served from the HAR file. Read more about <a
1134-
* href="https://playwright.dev/java/docs/network#replaying-from-har">Replaying from HAR</a>.
1134+
* href="https://playwright.dev/java/docs/mock#replaying-from-har">Replaying from HAR</a>.
11351135
*
11361136
* <p> Playwright will not serve requests intercepted by Service Worker from the HAR file. See <a
11371137
* href="https://github.com/microsoft/playwright/issues/1090">this</a> issue. We recommend disabling Service Workers when

playwright/src/main/java/com/microsoft/playwright/BrowserType.java

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,26 @@
4343
*/
4444
public interface BrowserType {
4545
class ConnectOptions {
46+
/**
47+
* This option exposes network available on the connecting client to the browser being connected to. Consists of a list of
48+
* rules separated by comma.
49+
*
50+
* <p> Available rules:
51+
* <ol>
52+
* <li> Hostname pattern, for example: {@code example.com}, {@code *.org:99}, {@code x.*.y.com}, {@code *foo.org}.</li>
53+
* <li> IP literal, for example: {@code 127.0.0.1}, {@code 0.0.0.0:99}, {@code [::1]}, {@code [0:0::1]:99}.</li>
54+
* <li> {@code <loopback>} that matches local loopback interfaces: {@code localhost}, {@code *.localhost}, {@code 127.0.0.1},
55+
* {@code [::1]}.</li>
56+
* </ol>
57+
*
58+
* <p> Some common examples:
59+
* <ol>
60+
* <li> {@code "*"} to expose all network.</li>
61+
* <li> {@code "<loopback>"} to expose localhost network.</li>
62+
* <li> {@code "*.test.internal-domain,*.staging.internal-domain,<loopback>"} to expose test/staging deployments and localhost.</li>
63+
* </ol>
64+
*/
65+
public String exposeNetwork;
4666
/**
4767
* Additional HTTP headers to be sent with web socket connect request. Optional.
4868
*/
@@ -57,6 +77,29 @@ class ConnectOptions {
5777
*/
5878
public Double timeout;
5979

80+
/**
81+
* This option exposes network available on the connecting client to the browser being connected to. Consists of a list of
82+
* rules separated by comma.
83+
*
84+
* <p> Available rules:
85+
* <ol>
86+
* <li> Hostname pattern, for example: {@code example.com}, {@code *.org:99}, {@code x.*.y.com}, {@code *foo.org}.</li>
87+
* <li> IP literal, for example: {@code 127.0.0.1}, {@code 0.0.0.0:99}, {@code [::1]}, {@code [0:0::1]:99}.</li>
88+
* <li> {@code <loopback>} that matches local loopback interfaces: {@code localhost}, {@code *.localhost}, {@code 127.0.0.1},
89+
* {@code [::1]}.</li>
90+
* </ol>
91+
*
92+
* <p> Some common examples:
93+
* <ol>
94+
* <li> {@code "*"} to expose all network.</li>
95+
* <li> {@code "<loopback>"} to expose localhost network.</li>
96+
* <li> {@code "*.test.internal-domain,*.staging.internal-domain,<loopback>"} to expose test/staging deployments and localhost.</li>
97+
* </ol>
98+
*/
99+
public ConnectOptions setExposeNetwork(String exposeNetwork) {
100+
this.exposeNetwork = exposeNetwork;
101+
return this;
102+
}
60103
/**
61104
* Additional HTTP headers to be sent with web socket connect request. Optional.
62105
*/
@@ -496,7 +539,7 @@ class LaunchPersistentContextOptions {
496539
/**
497540
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
498541
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
499-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
542+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
500543
*/
501544
public Boolean isMobile;
502545
/**
@@ -610,8 +653,8 @@ class LaunchPersistentContextOptions {
610653
*/
611654
public String userAgent;
612655
/**
613-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
614-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
656+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
657+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
615658
* emulation</a>.
616659
*
617660
* <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
@@ -839,7 +882,7 @@ public LaunchPersistentContextOptions setIgnoreHTTPSErrors(boolean ignoreHTTPSEr
839882
/**
840883
* Whether the {@code meta viewport} tag is taken into account and touch events are enabled. isMobile is a part of device,
841884
* so you don't actually need to set it manually. Defaults to {@code false} and is not supported in Firefox. Learn more
842-
* about <a href="https://playwright.dev/java/docs/emulation#isMobile">mobile emulation</a>.
885+
* about <a href="https://playwright.dev/java/docs/emulation#ismobile">mobile emulation</a>.
843886
*/
844887
public LaunchPersistentContextOptions setIsMobile(boolean isMobile) {
845888
this.isMobile = isMobile;
@@ -1044,8 +1087,8 @@ public LaunchPersistentContextOptions setUserAgent(String userAgent) {
10441087
return this;
10451088
}
10461089
/**
1047-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
1048-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
1090+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
1091+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
10491092
* emulation</a>.
10501093
*
10511094
* <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
@@ -1055,8 +1098,8 @@ public LaunchPersistentContextOptions setViewportSize(int width, int height) {
10551098
return setViewportSize(new ViewportSize(width, height));
10561099
}
10571100
/**
1058-
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the
1059-
* consistent viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
1101+
* Emulates consistent viewport for each page. Defaults to an 1280x720 viewport. Use {@code null} to disable the consistent
1102+
* viewport emulation. Learn more about <a href="https://playwright.dev/java/docs/emulation#viewport">viewport
10601103
* emulation</a>.
10611104
*
10621105
* <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

playwright/src/main/java/com/microsoft/playwright/Frame.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4473,7 +4473,9 @@ default void setChecked(String selector, boolean checked) {
44734473
*/
44744474
void setChecked(String selector, boolean checked, SetCheckedOptions options);
44754475
/**
4476-
*
4476+
* This method internally calls <a
4477+
* href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific
4478+
* characteristics and behaviors.
44774479
*
44784480
* @param html HTML markup to assign to the page.
44794481
* @since v1.8
@@ -4482,7 +4484,9 @@ default void setContent(String html) {
44824484
setContent(html, null);
44834485
}
44844486
/**
4485-
*
4487+
* This method internally calls <a
4488+
* href="https://developer.mozilla.org/en-US/docs/Web/API/Document/write">document.write()</a>, inheriting all its specific
4489+
* characteristics and behaviors.
44864490
*
44874491
* @param html HTML markup to assign to the page.
44884492
* @since v1.8

playwright/src/main/java/com/microsoft/playwright/Locator.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Locators are the central piece of Playwright's auto-waiting and retry-ability. In a nutshell, locators represent a way
26-
* to find element(s) on the page at any moment. Locator can be created with the {@link Page#locator Page.locator()}
26+
* to find element(s) on the page at any moment. A locator can be created with the {@link Page#locator Page.locator()}
2727
* method.
2828
*
2929
* <p> <a href="https://playwright.dev/java/docs/locators">Learn more about locators</a>.
@@ -2033,7 +2033,7 @@ public WaitForOptions setTimeout(double timeout) {
20332033
}
20342034
}
20352035
/**
2036-
* When locator points to a list of elements, returns array of locators, pointing to respective elements.
2036+
* When the locator points to a list of elements, this returns an array of locators, pointing to their respective elements.
20372037
*
20382038
* <p> <strong>NOTE:</strong> {@link Locator#all Locator.all()} does not wait for elements to match the locator, and instead immediately returns
20392039
* whatever is present in the page. When the list of elements changes dynamically, {@link Locator#all Locator.all()} will
@@ -4865,7 +4865,10 @@ default String textContent() {
48654865
*/
48664866
String textContent(TextContentOptions options);
48674867
/**
4868-
* Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
4868+
* <strong>NOTE:</strong> In most cases, you should use {@link Locator#fill Locator.fill()} instead. You only need to type characters if there is
4869+
* special keyboard handling on the page.
4870+
*
4871+
* <p> Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
48694872
* character in the text.
48704873
*
48714874
* <p> To press a special key, like {@code Control} or {@code ArrowDown}, use {@link Locator#press Locator.press()}.
@@ -4890,7 +4893,10 @@ default void type(String text) {
48904893
type(text, null);
48914894
}
48924895
/**
4893-
* Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
4896+
* <strong>NOTE:</strong> In most cases, you should use {@link Locator#fill Locator.fill()} instead. You only need to type characters if there is
4897+
* special keyboard handling on the page.
4898+
*
4899+
* <p> Focuses the element, and then sends a {@code keydown}, {@code keypress}/{@code input}, and {@code keyup} event for each
48944900
* character in the text.
48954901
*
48964902
* <p> To press a special key, like {@code Control} or {@code ArrowDown}, use {@link Locator#press Locator.press()}.

0 commit comments

Comments
 (0)