Skip to content

Commit 48d9528

Browse files
authored
chore: roll driver to 1.28.0-alpha-oct-26-2022 (#1106)
1 parent 4275ee3 commit 48d9528

File tree

22 files changed

+628
-95
lines changed

22 files changed

+628
-95
lines changed

README.md

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

1212
| | Linux | macOS | Windows |
1313
| :--- | :---: | :---: | :---: |
14-
| Chromium <!-- GEN:chromium-version -->107.0.5304.18<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
14+
| Chromium <!-- GEN:chromium-version -->107.0.5304.62<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1515
| WebKit <!-- GEN:webkit-version -->16.0<!-- GEN:stop --> ||||
16-
| Firefox <!-- GEN:firefox-version -->105.0.1<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
16+
| Firefox <!-- GEN:firefox-version -->106.0<!-- GEN:stop --> | :white_check_mark: | :white_check_mark: | :white_check_mark: |
1717

1818
Headless execution is supported for all the browsers on all platforms. Check out [system requirements](https://playwright.dev/java/docs/next/intro/#system-requirements) for details.
1919

driver-bundle/src/test/java/com/microsoft/playwright/impl/driver/jar/TestInstall.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@
1717
package com.microsoft.playwright.impl.driver.jar;
1818

1919
import com.microsoft.playwright.impl.driver.Driver;
20-
import org.junit.jupiter.api.AfterEach;
2120
import org.junit.jupiter.api.BeforeEach;
2221
import org.junit.jupiter.api.Test;
2322
import org.junit.jupiter.api.io.TempDir;
2423

2524
import java.io.IOException;
26-
import java.lang.reflect.Field;
2725
import java.net.ServerSocket;
2826
import java.net.URISyntaxException;
2927
import java.nio.charset.StandardCharsets;

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ class RouteFromHAROptions {
185185
*/
186186
public HarNotFound notFound;
187187
/**
188-
* If specified, updates the given HAR with the actual network information instead of serving from file.
188+
* If specified, updates the given HAR with the actual network information instead of serving from file. The file is
189+
* written to disk when {@link BrowserContext#close BrowserContext.close()} is called.
189190
*/
190191
public Boolean update;
191192
/**
@@ -207,7 +208,8 @@ public RouteFromHAROptions setNotFound(HarNotFound notFound) {
207208
return this;
208209
}
209210
/**
210-
* If specified, updates the given HAR with the actual network information instead of serving from file.
211+
* If specified, updates the given HAR with the actual network information instead of serving from file. The file is
212+
* written to disk when {@link BrowserContext#close BrowserContext.close()} is called.
211213
*/
212214
public RouteFromHAROptions setUpdate(boolean update) {
213215
this.update = update;

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

Lines changed: 89 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,52 @@ public CheckOptions setTrial(boolean trial) {
138138
return this;
139139
}
140140
}
141+
class ClearOptions {
142+
/**
143+
* Whether to bypass the <a href="https://playwright.dev/java/docs/actionability">actionability</a> checks. Defaults to
144+
* {@code false}.
145+
*/
146+
public Boolean force;
147+
/**
148+
* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
149+
* opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
150+
* inaccessible pages. Defaults to {@code false}.
151+
*/
152+
public Boolean noWaitAfter;
153+
/**
154+
* Maximum time in milliseconds, defaults to 30 seconds, pass {@code 0} to disable timeout. The default value can be changed by
155+
* using the {@link BrowserContext#setDefaultTimeout BrowserContext.setDefaultTimeout()} or {@link Page#setDefaultTimeout
156+
* Page.setDefaultTimeout()} methods.
157+
*/
158+
public Double timeout;
159+
160+
/**
161+
* Whether to bypass the <a href="https://playwright.dev/java/docs/actionability">actionability</a> checks. Defaults to
162+
* {@code false}.
163+
*/
164+
public ClearOptions setForce(boolean force) {
165+
this.force = force;
166+
return this;
167+
}
168+
/**
169+
* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
170+
* opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
171+
* inaccessible pages. Defaults to {@code false}.
172+
*/
173+
public ClearOptions setNoWaitAfter(boolean noWaitAfter) {
174+
this.noWaitAfter = noWaitAfter;
175+
return this;
176+
}
177+
/**
178+
* Maximum time in milliseconds, defaults to 30 seconds, pass {@code 0} to disable timeout. The default value can be changed by
179+
* using the {@link BrowserContext#setDefaultTimeout BrowserContext.setDefaultTimeout()} or {@link Page#setDefaultTimeout
180+
* Page.setDefaultTimeout()} methods.
181+
*/
182+
public ClearOptions setTimeout(double timeout) {
183+
this.timeout = timeout;
184+
return this;
185+
}
186+
}
141187
class ClickOptions {
142188
/**
143189
* Defaults to {@code left}.
@@ -438,6 +484,12 @@ class HoverOptions {
438484
* modifiers back. If not specified, currently pressed modifiers are used.
439485
*/
440486
public List<KeyboardModifier> modifiers;
487+
/**
488+
* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
489+
* opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
490+
* inaccessible pages. Defaults to {@code false}.
491+
*/
492+
public Boolean noWaitAfter;
441493
/**
442494
* A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the
443495
* element.
@@ -472,6 +524,15 @@ public HoverOptions setModifiers(List<KeyboardModifier> modifiers) {
472524
this.modifiers = modifiers;
473525
return this;
474526
}
527+
/**
528+
* Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can
529+
* opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to
530+
* inaccessible pages. Defaults to {@code false}.
531+
*/
532+
public HoverOptions setNoWaitAfter(boolean noWaitAfter) {
533+
this.noWaitAfter = noWaitAfter;
534+
return this;
535+
}
475536
/**
476537
* A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the
477538
* element.
@@ -607,7 +668,7 @@ class ScreenshotOptions {
607668
public Integer quality;
608669
/**
609670
* When set to {@code "css"}, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will
610-
* keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenhots of
671+
* keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenshots of
611672
* high-dpi devices will be twice as large or even larger.
612673
*
613674
* <p> Defaults to {@code "device"}.
@@ -680,7 +741,7 @@ public ScreenshotOptions setQuality(int quality) {
680741
}
681742
/**
682743
* When set to {@code "css"}, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will
683-
* keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenhots of
744+
* keep screenshots small. Using {@code "device"} option will produce a single pixel per each device pixel, so screenshots of
684745
* high-dpi devices will be twice as large or even larger.
685746
*
686747
* <p> Defaults to {@code "device"}.
@@ -1269,6 +1330,28 @@ default void check() {
12691330
* zero timeout disables this.
12701331
*/
12711332
void check(CheckOptions options);
1333+
/**
1334+
* This method waits for <a href="https://playwright.dev/java/docs/actionability">actionability</a> checks, focuses the
1335+
* element, clears it and triggers an {@code input} event after clearing.
1336+
*
1337+
* <p> If the target element is not an {@code <input>}, {@code <textarea>} or {@code [contenteditable]} element, this method throws an error.
1338+
* However, if the element is inside the {@code <label>} element that has an associated <a
1339+
* href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be
1340+
* cleared instead.
1341+
*/
1342+
default void clear() {
1343+
clear(null);
1344+
}
1345+
/**
1346+
* This method waits for <a href="https://playwright.dev/java/docs/actionability">actionability</a> checks, focuses the
1347+
* element, clears it and triggers an {@code input} event after clearing.
1348+
*
1349+
* <p> If the target element is not an {@code <input>}, {@code <textarea>} or {@code [contenteditable]} element, this method throws an error.
1350+
* However, if the element is inside the {@code <label>} element that has an associated <a
1351+
* href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLLabelElement/control">control</a>, the control will be
1352+
* cleared instead.
1353+
*/
1354+
void clear(ClearOptions options);
12721355
/**
12731356
* This method clicks the element by performing the following steps:
12741357
* <ol>
@@ -1438,7 +1521,7 @@ default void dispatchEvent(String type) {
14381521
*
14391522
* @param selector A selector to query for. See <a href="https://playwright.dev/java/docs/selectors">working with selectors</a> for more
14401523
* details.
1441-
* @param expression JavaScript expression to be evaluated in the browser context. If the expresion evaluates to a function, the function is
1524+
* @param expression JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is
14421525
* automatically invoked.
14431526
*/
14441527
default Object evalOnSelector(String selector, String expression) {
@@ -1464,7 +1547,7 @@ default Object evalOnSelector(String selector, String expression) {
14641547
*
14651548
* @param selector A selector to query for. See <a href="https://playwright.dev/java/docs/selectors">working with selectors</a> for more
14661549
* details.
1467-
* @param expression JavaScript expression to be evaluated in the browser context. If the expresion evaluates to a function, the function is
1550+
* @param expression JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is
14681551
* automatically invoked.
14691552
* @param arg Optional argument to pass to {@code expression}.
14701553
*/
@@ -1489,7 +1572,7 @@ default Object evalOnSelector(String selector, String expression) {
14891572
*
14901573
* @param selector A selector to query for. See <a href="https://playwright.dev/java/docs/selectors">working with selectors</a> for more
14911574
* details.
1492-
* @param expression JavaScript expression to be evaluated in the browser context. If the expresion evaluates to a function, the function is
1575+
* @param expression JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is
14931576
* automatically invoked.
14941577
*/
14951578
default Object evalOnSelectorAll(String selector, String expression) {
@@ -1515,7 +1598,7 @@ default Object evalOnSelectorAll(String selector, String expression) {
15151598
*
15161599
* @param selector A selector to query for. See <a href="https://playwright.dev/java/docs/selectors">working with selectors</a> for more
15171600
* details.
1518-
* @param expression JavaScript expression to be evaluated in the browser context. If the expresion evaluates to a function, the function is
1601+
* @param expression JavaScript expression to be evaluated in the browser context. If the expression evaluates to a function, the function is
15191602
* automatically invoked.
15201603
* @param arg Optional argument to pass to {@code expression}.
15211604
*/

0 commit comments

Comments
 (0)