diff --git a/playwright/src/main/java/com/microsoft/playwright/Browser.java b/playwright/src/main/java/com/microsoft/playwright/Browser.java index 361c1ce8..3f0d941a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Browser.java +++ b/playwright/src/main/java/com/microsoft/playwright/Browser.java @@ -66,7 +66,7 @@ public interface Browser extends AutoCloseable { public Boolean bypassCSP; /** * Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code "no-preference"}. See - * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to '{@code light}'. + * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to {@code "light"}. */ public ColorScheme colorScheme; /** @@ -286,7 +286,7 @@ public interface Browser extends AutoCloseable { public Boolean bypassCSP; /** * Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code "no-preference"}. See - * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to '{@code light}'. + * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to {@code "light"}. */ public ColorScheme colorScheme; /** diff --git a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java index 68bb8bb3..9aeb726a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/BrowserType.java +++ b/playwright/src/main/java/com/microsoft/playwright/BrowserType.java @@ -228,7 +228,7 @@ public interface BrowserType { public Boolean chromiumSandbox; /** * Emulates {@code "prefers-colors-scheme"} media feature, supported values are {@code "light"}, {@code "dark"}, {@code "no-preference"}. See - * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to '{@code light}'. + * {@link Page#emulateMedia Page.emulateMedia()} for more details. Defaults to {@code "light"}. */ public ColorScheme colorScheme; /** diff --git a/playwright/src/main/java/com/microsoft/playwright/Frame.java b/playwright/src/main/java/com/microsoft/playwright/Frame.java index e8eea924..b42e0ab2 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Frame.java +++ b/playwright/src/main/java/com/microsoft/playwright/Frame.java @@ -1334,7 +1334,7 @@ public interface Frame { * Returns the return value of {@code expression} as a {@code JSHandle}. * *

The only difference between {@link Frame#evaluate Frame.evaluate()} and {@link Frame#evaluateHandle - * Frame.evaluateHandle()} is that [method: Frame.evaluateHandle{@code ] returns }JSHandle`. + * Frame.evaluateHandle()} is that {@link Frame#evaluateHandle Frame.evaluateHandle()} returns {@code JSHandle}. * *

If the function, passed to the {@link Frame#evaluateHandle Frame.evaluateHandle()}, returns a Promise, then {@link @@ -1367,7 +1367,7 @@ public interface Frame { * Returns the return value of {@code expression} as a {@code JSHandle}. * *

The only difference between {@link Frame#evaluate Frame.evaluate()} and {@link Frame#evaluateHandle - * Frame.evaluateHandle()} is that [method: Frame.evaluateHandle{@code ] returns }JSHandle`. + * Frame.evaluateHandle()} is that {@link Frame#evaluateHandle Frame.evaluateHandle()} returns {@code JSHandle}. * *

If the function, passed to the {@link Frame#evaluateHandle Frame.evaluateHandle()}, returns a Promise, then {@link diff --git a/playwright/src/main/java/com/microsoft/playwright/PlaywrightException.java b/playwright/src/main/java/com/microsoft/playwright/PlaywrightException.java index 609d8781..d60d9479 100644 --- a/playwright/src/main/java/com/microsoft/playwright/PlaywrightException.java +++ b/playwright/src/main/java/com/microsoft/playwright/PlaywrightException.java @@ -16,6 +16,10 @@ package com.microsoft.playwright; +/** + * PlaywrightException is thrown whenever certain operations are terminated abnormally, e.g. browser closes while {@link + * Page#evaluate Page.evaluate()} is running. All Playwright exceptions inherit from this class. + */ public class PlaywrightException extends RuntimeException { public PlaywrightException(String message) { super(message); diff --git a/playwright/src/main/java/com/microsoft/playwright/Worker.java b/playwright/src/main/java/com/microsoft/playwright/Worker.java index 084b510c..e1614c6c 100644 --- a/playwright/src/main/java/com/microsoft/playwright/Worker.java +++ b/playwright/src/main/java/com/microsoft/playwright/Worker.java @@ -65,7 +65,7 @@ public interface Worker { * Worker#evaluate Worker.evaluate()} would wait for the promise to resolve and return its value. * *

If the function passed to the {@link Worker#evaluate Worker.evaluate()} returns a non-[Serializable] value, then {@link - * Worker#evaluate Worker.evaluate()} returns {@code undefined}. Playwright also supports transferring some additional values + * Worker#evaluate Worker.evaluate()} returns {@code undefined}. Playwright also supports transferring some additional values * that are not serializable by {@code JSON}: {@code -0}, {@code NaN}, {@code Infinity}, {@code -Infinity}. * * @param expression JavaScript expression to be evaluated in the browser context. If it looks like a function declaration, it is interpreted @@ -82,7 +82,7 @@ public interface Worker { * Worker#evaluate Worker.evaluate()} would wait for the promise to resolve and return its value. * *

If the function passed to the {@link Worker#evaluate Worker.evaluate()} returns a non-[Serializable] value, then {@link - * Worker#evaluate Worker.evaluate()} returns {@code undefined}. Playwright also supports transferring some additional values + * Worker#evaluate Worker.evaluate()} returns {@code undefined}. Playwright also supports transferring some additional values * that are not serializable by {@code JSON}: {@code -0}, {@code NaN}, {@code Infinity}, {@code -Infinity}. * * @param expression JavaScript expression to be evaluated in the browser context. If it looks like a function declaration, it is interpreted diff --git a/playwright/src/main/java/com/microsoft/playwright/options/FilePayload.java b/playwright/src/main/java/com/microsoft/playwright/options/FilePayload.java index 214a86fa..f445f4d5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/options/FilePayload.java +++ b/playwright/src/main/java/com/microsoft/playwright/options/FilePayload.java @@ -18,11 +18,11 @@ package com.microsoft.playwright.options; public class FilePayload { /** - * [File] name + * File name */ public String name; /** - * [File] type + * File type */ public String mimeType; /** diff --git a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextExposeFunction.java b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextExposeFunction.java index 21dcf648..d2c0ed43 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextExposeFunction.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestBrowserContextExposeFunction.java @@ -91,7 +91,8 @@ public class TestBrowserContextExposeFunction extends TestBase { page.addInitScript("window['woof']('page')"); actualArgs.clear(); page.reload(); - assertEquals(asList("context", "page"), actualArgs); + assertTrue(actualArgs.contains("context")); + assertTrue(actualArgs.contains("page")); } @Test diff --git a/playwright/src/test/java/com/microsoft/playwright/TestRequestContinue.java b/playwright/src/test/java/com/microsoft/playwright/TestRequestContinue.java index 16c5dc82..100d1555 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestRequestContinue.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestRequestContinue.java @@ -84,7 +84,7 @@ public class TestRequestContinue extends TestBase { }); page.navigate(server.EMPTY_PAGE); assertNotNull(error[0]); - assertTrue(error[0].getMessage().contains("New URL must have same protocol as overriden URL")); + assertTrue(error[0].getMessage().contains("New URL must have same protocol as overridden URL"), error[0].getMessage()); } @Test diff --git a/scripts/CLI_VERSION b/scripts/CLI_VERSION index f9581d9b..76530a62 100644 --- a/scripts/CLI_VERSION +++ b/scripts/CLI_VERSION @@ -1 +1 @@ -1.9.1-1614983396000 +1.10.0-next-1615230258000 diff --git a/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java b/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java index 93acd882..d78de0bb 100644 --- a/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java +++ b/tools/api-generator/src/main/java/com/microsoft/playwright/tools/ApiGenerator.java @@ -1039,7 +1039,7 @@ public class ApiGenerator { for (JsonElement entry: api) { String name = entry.getAsJsonObject().get("name").getAsString(); // We write this one manually. - if ("TimeoutError".equals(name)) { + if (asList("PlaywrightException", "TimeoutError").contains(name)) { continue; } List lines = new ArrayList<>();