From ba0c4d6195c6ce8e8416839926aec7276093b539 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 10:10:11 -0800 Subject: [PATCH 01/33] feat(protocol): typed sendMessage and connection-aware Gson adapters --- .../playwright/impl/ChannelOwner.java | 19 +++++ .../microsoft/playwright/impl/Connection.java | 71 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java index c25f33eb3..eebcd6158 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java @@ -142,6 +142,25 @@ JsonElement sendMessage(String method, JsonObject params, Double timeout) { return connection.sendMessage(guid, method, params, timeout); } + /** + * Typed counterpart of {@link #sendMessage(String, JsonObject, Double)}: {@code params} is serialized + * with the connection's Gson (channel owners travel as {@code {guid}}), the reply is deserialized into + * {@code resultClass}. {@code null} params mean an empty object, {@code null} or {@code Void.class} + * result class discards the reply. + */ + R sendMessage(String method, Object params, Class resultClass, Double timeout) { + JsonObject paramsJson = params == null ? new JsonObject() : connection.protocolGson().toJsonTree(params).getAsJsonObject(); + JsonElement result = sendMessage(method, paramsJson, timeout); + if (resultClass == null || resultClass == Void.class || result == null || result.isJsonNull()) { + return null; + } + return connection.protocolGson().fromJson(result, resultClass); + } + + void sendMessage(String method, Object params, Double timeout) { + sendMessage(method, params, Void.class, timeout); + } + private void checkNotCollected() { if (wasCollected) throw new PlaywrightException("The object has been collected to prevent unbounded heap growth."); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index 8bbae9cee..966e25208 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java @@ -16,6 +16,12 @@ package com.microsoft.playwright.impl; import com.google.gson.Gson; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonToken; +import com.google.gson.stream.JsonWriter; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -25,6 +31,7 @@ import java.io.IOException; import java.time.Duration; import java.util.ArrayList; +import java.util.Base64; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -61,6 +68,10 @@ public String toString() { public class Connection { private final Transport transport; private final Map objects = new HashMap<>(); + private final Gson protocolGson = gson().newBuilder() + .registerTypeAdapterFactory(new ChannelOwnerAdapterFactory()) + .registerTypeAdapter(byte[].class, new Base64Adapter().nullSafe()) + .create(); private final Root root; final boolean isRemote; private int lastId = 0; @@ -236,6 +247,11 @@ LocalUtils localUtils() { return localUtils; } + /** Gson that serializes channel owners as {guid} and resolves them back through this connection (see channelOwner.ts, connection.ts upstream). */ + Gson protocolGson() { + return protocolGson; + } + public T getExistingObject(String guid) { @SuppressWarnings("unchecked") T result = (T) objects.get(guid); if (result == null) @@ -262,6 +278,61 @@ boolean processOneMessage() { return true; } + private class ChannelOwnerAdapterFactory implements TypeAdapterFactory { + @Override + @SuppressWarnings("unchecked") + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelOwner.class.isAssignableFrom(type.getRawType())) { + return null; + } + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelOwner value) throws IOException { + if (value == null) { + out.nullValue(); + return; + } + out.beginObject(); + out.name("guid"); + out.value(value.guid); + out.endObject(); + } + + @Override + public ChannelOwner read(JsonReader in) throws IOException { + if (in.peek() == JsonToken.NULL) { + in.nextNull(); + return null; + } + String guid = null; + in.beginObject(); + while (in.hasNext()) { + String name = in.nextName(); + if ("guid".equals(name)) { + guid = in.nextString(); + } else { + in.skipValue(); + } + } + in.endObject(); + return getExistingObject(guid); + } + }; + } + } + + private static class Base64Adapter extends TypeAdapter { + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + out.value(Base64.getEncoder().encodeToString(value)); + } + + @Override + public byte[] read(JsonReader in) throws IOException { + return Base64.getDecoder().decode(in.nextString()); + } + } + private static String formatCallLog(JsonArray log) { if (log == null) { return ""; From 9f392b55a6f4b1b063beb7d7121a0a5f0e0db4d4 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 10:10:35 -0800 Subject: [PATCH 02/33] chore(protocol): generate protocol channel types from the upstream spec --- .../impl/APIRequestContextChannel.java | 147 +++ .../playwright/impl/ArtifactChannel.java | 121 +++ .../playwright/impl/BindingCallChannel.java | 51 + .../impl/BrowserContextChannel.java | 641 +++++++++++++ .../playwright/impl/BrowserTypeChannel.java | 220 +++++ .../playwright/impl/CDPSessionChannel.java | 64 ++ .../microsoft/playwright/impl/Connection.java | 28 +- .../impl/DebugControllerChannel.java | 126 +++ .../playwright/impl/DebuggerChannel.java | 126 +++ .../playwright/impl/DialogChannel.java | 53 ++ .../playwright/impl/DisposableChannel.java | 41 + .../playwright/impl/ElementHandleChannel.java | 562 +++++++++++ .../playwright/impl/FrameChannel.java | 791 ++++++++++++++++ .../playwright/impl/JSHandleChannel.java | 123 +++ .../playwright/impl/JsonPipeChannel.java | 59 ++ .../playwright/impl/LocalUtilsChannel.java | 199 ++++ .../playwright/impl/PageChannel.java | 875 ++++++++++++++++++ .../playwright/impl/PlaywrightChannel.java | 79 ++ .../microsoft/playwright/impl/Protocol.java | 97 +- .../impl/ProtocolBrowserChannel.java | 362 ++++++++ .../playwright/impl/ProtocolStructs.java | 408 ++++++++ .../playwright/impl/RequestChannel.java | 71 ++ .../playwright/impl/ResponseChannel.java | 129 +++ .../playwright/impl/RootChannel.java | 42 + .../playwright/impl/RouteChannel.java | 73 ++ .../playwright/impl/Serialization.java | 47 +- .../playwright/impl/StreamChannel.java | 53 ++ .../playwright/impl/TracingChannel.java | 136 +++ .../playwright/impl/WebSocketChannel.java | 51 + .../impl/WebSocketRouteChannel.java | 116 +++ .../playwright/impl/WorkerChannel.java | 95 ++ .../impl/WritableStreamChannel.java | 49 + scripts/generate_api.sh | 26 +- scripts/generate_java_channels.js | 363 ++++++++ 34 files changed, 6291 insertions(+), 133 deletions(-) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java create mode 100644 scripts/generate_java_channels.js diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java new file mode 100644 index 000000000..9e36463fd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java @@ -0,0 +1,147 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class APIRequestContextChannel { + private final ChannelOwner owner; + + APIRequestContextChannel(ChannelOwner owner) { + this.owner = owner; + } + + APIRequestContextFetchResult fetch(APIRequestContextFetchParams params, Double timeout) { + return owner.sendMessage("fetch", params, APIRequestContextFetchResult.class, timeout); + } + + APIRequestContextFetchResponseBodyResult fetchResponseBody(APIRequestContextFetchResponseBodyParams params, Double timeout) { + return owner.sendMessage("fetchResponseBody", params, APIRequestContextFetchResponseBodyResult.class, timeout); + } + + APIRequestContextFetchLogResult fetchLog(APIRequestContextFetchLogParams params, Double timeout) { + return owner.sendMessage("fetchLog", params, APIRequestContextFetchLogResult.class, timeout); + } + + void addCookies(APIRequestContextAddCookiesParams params, Double timeout) { + owner.sendMessage("addCookies", params, timeout); + } + + void clearCookies(APIRequestContextClearCookiesParams params, Double timeout) { + owner.sendMessage("clearCookies", params, timeout); + } + + APIRequestContextCookiesResult cookies(APIRequestContextCookiesParams params, Double timeout) { + return owner.sendMessage("cookies", params, APIRequestContextCookiesResult.class, timeout); + } + + APIRequestContextStorageStateResult storageState(APIRequestContextStorageStateParams params, Double timeout) { + return owner.sendMessage("storageState", params, APIRequestContextStorageStateResult.class, timeout); + } + + void disposeAPIResponse(APIRequestContextDisposeAPIResponseParams params, Double timeout) { + owner.sendMessage("disposeAPIResponse", params, timeout); + } + + void dispose(APIRequestContextDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } +} + +class APIRequestContextInitializer { + TracingImpl tracing; +} + +class APIRequestContextFetchParams { + String url; + String encodedParams; + List params; + String method; + List headers; + byte[] postData; + String jsonData; + List formData; + List multipartData; + Boolean failOnStatusCode; + Boolean ignoreHTTPSErrors; + Integer maxRedirects; + Integer maxRetries; +} + +class APIRequestContextFetchResult { + ProtocolAPIResponse response; +} + +class APIRequestContextFetchResponseBodyParams { + String fetchUid; +} + +class APIRequestContextFetchResponseBodyResult { + byte[] binary; +} + +class APIRequestContextFetchLogParams { + String fetchUid; +} + +class APIRequestContextFetchLogResult { + List log; +} + +class APIRequestContextAddCookiesParams { + List cookies; +} + +class APIRequestContextClearCookiesParams { + String name; + String nameRegexSource; + String nameRegexFlags; + String domain; + String domainRegexSource; + String domainRegexFlags; + String path; + String pathRegexSource; + String pathRegexFlags; +} + +class APIRequestContextCookiesParams { + List urls; +} + +class APIRequestContextCookiesResult { + List cookies; +} + +class APIRequestContextStorageStateParams { + Boolean indexedDB; + Boolean opfs; +} + +class APIRequestContextStorageStateResult { + List cookies; + List origins; +} + +class APIRequestContextDisposeAPIResponseParams { + String fetchUid; +} + +class APIRequestContextDisposeParams { + String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java new file mode 100644 index 000000000..abd7c4eed --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class ArtifactChannel { + private final ChannelOwner owner; + + ArtifactChannel(ChannelOwner owner) { + this.owner = owner; + } + + ArtifactPathAfterFinishedResult pathAfterFinished(ArtifactPathAfterFinishedParams params, Double timeout) { + return owner.sendMessage("pathAfterFinished", params, ArtifactPathAfterFinishedResult.class, timeout); + } + + ArtifactPathAfterFinishedResult pathAfterFinished(Double timeout) { + return pathAfterFinished(new ArtifactPathAfterFinishedParams(), timeout); + } + + void saveAs(ArtifactSaveAsParams params, Double timeout) { + owner.sendMessage("saveAs", params, timeout); + } + + ArtifactSaveAsStreamResult saveAsStream(ArtifactSaveAsStreamParams params, Double timeout) { + return owner.sendMessage("saveAsStream", params, ArtifactSaveAsStreamResult.class, timeout); + } + + ArtifactSaveAsStreamResult saveAsStream(Double timeout) { + return saveAsStream(new ArtifactSaveAsStreamParams(), timeout); + } + + ArtifactFailureResult failure(ArtifactFailureParams params, Double timeout) { + return owner.sendMessage("failure", params, ArtifactFailureResult.class, timeout); + } + + ArtifactFailureResult failure(Double timeout) { + return failure(new ArtifactFailureParams(), timeout); + } + + ArtifactStreamResult stream(ArtifactStreamParams params, Double timeout) { + return owner.sendMessage("stream", params, ArtifactStreamResult.class, timeout); + } + + ArtifactStreamResult stream(Double timeout) { + return stream(new ArtifactStreamParams(), timeout); + } + + void cancel(ArtifactCancelParams params, Double timeout) { + owner.sendMessage("cancel", params, timeout); + } + + void cancel(Double timeout) { + cancel(new ArtifactCancelParams(), timeout); + } + + void delete(ArtifactDeleteParams params, Double timeout) { + owner.sendMessage("delete", params, timeout); + } + + void delete(Double timeout) { + delete(new ArtifactDeleteParams(), timeout); + } +} + +class ArtifactInitializer { + String absolutePath; +} + +class ArtifactPathAfterFinishedParams { +} + +class ArtifactPathAfterFinishedResult { + String value; +} + +class ArtifactSaveAsParams { + String path; +} + +class ArtifactSaveAsStreamParams { +} + +class ArtifactSaveAsStreamResult { + Stream stream; +} + +class ArtifactFailureParams { +} + +class ArtifactFailureResult { + String error; +} + +class ArtifactStreamParams { +} + +class ArtifactStreamResult { + Stream stream; +} + +class ArtifactCancelParams { +} + +class ArtifactDeleteParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java new file mode 100644 index 000000000..66bb530e6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class BindingCallChannel { + private final ChannelOwner owner; + + BindingCallChannel(ChannelOwner owner) { + this.owner = owner; + } + + void reject(BindingCallRejectParams params, Double timeout) { + owner.sendMessage("reject", params, timeout); + } + + void resolve(BindingCallResolveParams params, Double timeout) { + owner.sendMessage("resolve", params, timeout); + } +} + +class BindingCallInitializer { + FrameImpl frame; + String name; + List args; +} + +class BindingCallRejectParams { + SerializedError error; +} + +class BindingCallResolveParams { + SerializedArgument result; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java new file mode 100644 index 000000000..12951a4a2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java @@ -0,0 +1,641 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class BrowserContextChannel { + private final ChannelOwner owner; + + BrowserContextChannel(ChannelOwner owner) { + this.owner = owner; + } + + void addCookies(BrowserContextAddCookiesParams params, Double timeout) { + owner.sendMessage("addCookies", params, timeout); + } + + BrowserContextAddInitScriptResult addInitScript(BrowserContextAddInitScriptParams params, Double timeout) { + return owner.sendMessage("addInitScript", params, BrowserContextAddInitScriptResult.class, timeout); + } + + void clearCookies(BrowserContextClearCookiesParams params, Double timeout) { + owner.sendMessage("clearCookies", params, timeout); + } + + void clearPermissions(BrowserContextClearPermissionsParams params, Double timeout) { + owner.sendMessage("clearPermissions", params, timeout); + } + + void clearPermissions(Double timeout) { + clearPermissions(new BrowserContextClearPermissionsParams(), timeout); + } + + void close(BrowserContextCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + BrowserContextCookiesResult cookies(BrowserContextCookiesParams params, Double timeout) { + return owner.sendMessage("cookies", params, BrowserContextCookiesResult.class, timeout); + } + + BrowserContextExposeBindingResult exposeBinding(BrowserContextExposeBindingParams params, Double timeout) { + return owner.sendMessage("exposeBinding", params, BrowserContextExposeBindingResult.class, timeout); + } + + void grantPermissions(BrowserContextGrantPermissionsParams params, Double timeout) { + owner.sendMessage("grantPermissions", params, timeout); + } + + BrowserContextNewPageResult newPage(BrowserContextNewPageParams params, Double timeout) { + return owner.sendMessage("newPage", params, BrowserContextNewPageResult.class, timeout); + } + + BrowserContextNewPageResult newPage(Double timeout) { + return newPage(new BrowserContextNewPageParams(), timeout); + } + + void registerSelectorEngine(BrowserContextRegisterSelectorEngineParams params, Double timeout) { + owner.sendMessage("registerSelectorEngine", params, timeout); + } + + void setTestIdAttributeName(BrowserContextSetTestIdAttributeNameParams params, Double timeout) { + owner.sendMessage("setTestIdAttributeName", params, timeout); + } + + void setExtraHTTPHeaders(BrowserContextSetExtraHTTPHeadersParams params, Double timeout) { + owner.sendMessage("setExtraHTTPHeaders", params, timeout); + } + + void setGeolocation(BrowserContextSetGeolocationParams params, Double timeout) { + owner.sendMessage("setGeolocation", params, timeout); + } + + void setHTTPCredentials(BrowserContextSetHTTPCredentialsParams params, Double timeout) { + owner.sendMessage("setHTTPCredentials", params, timeout); + } + + void setNetworkInterceptionPatterns(BrowserContextSetNetworkInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); + } + + void setWebSocketInterceptionPatterns(BrowserContextSetWebSocketInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); + } + + void setOffline(BrowserContextSetOfflineParams params, Double timeout) { + owner.sendMessage("setOffline", params, timeout); + } + + BrowserContextStorageStateResult storageState(BrowserContextStorageStateParams params, Double timeout) { + return owner.sendMessage("storageState", params, BrowserContextStorageStateResult.class, timeout); + } + + void setStorageState(BrowserContextSetStorageStateParams params, Double timeout) { + owner.sendMessage("setStorageState", params, timeout); + } + + void pause(BrowserContextPauseParams params, Double timeout) { + owner.sendMessage("pause", params, timeout); + } + + void pause(Double timeout) { + pause(new BrowserContextPauseParams(), timeout); + } + + void showRecorder(BrowserContextShowRecorderParams params, Double timeout) { + owner.sendMessage("showRecorder", params, timeout); + } + + void startRecording(BrowserContextStartRecordingParams params, Double timeout) { + owner.sendMessage("startRecording", params, timeout); + } + + void stopRecording(BrowserContextStopRecordingParams params, Double timeout) { + owner.sendMessage("stopRecording", params, timeout); + } + + void stopRecording(Double timeout) { + stopRecording(new BrowserContextStopRecordingParams(), timeout); + } + + void exposeConsoleApi(BrowserContextExposeConsoleApiParams params, Double timeout) { + owner.sendMessage("exposeConsoleApi", params, timeout); + } + + void exposeConsoleApi(Double timeout) { + exposeConsoleApi(new BrowserContextExposeConsoleApiParams(), timeout); + } + + BrowserContextNewCDPSessionResult newCDPSession(BrowserContextNewCDPSessionParams params, Double timeout) { + return owner.sendMessage("newCDPSession", params, BrowserContextNewCDPSessionResult.class, timeout); + } + + BrowserContextCreateTempFilesResult createTempFiles(BrowserContextCreateTempFilesParams params, Double timeout) { + return owner.sendMessage("createTempFiles", params, BrowserContextCreateTempFilesResult.class, timeout); + } + + void updateSubscription(BrowserContextUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } + + void clockFastForward(BrowserContextClockFastForwardParams params, Double timeout) { + owner.sendMessage("clockFastForward", params, timeout); + } + + void clockInstall(BrowserContextClockInstallParams params, Double timeout) { + owner.sendMessage("clockInstall", params, timeout); + } + + void clockPauseAt(BrowserContextClockPauseAtParams params, Double timeout) { + owner.sendMessage("clockPauseAt", params, timeout); + } + + void clockResume(BrowserContextClockResumeParams params, Double timeout) { + owner.sendMessage("clockResume", params, timeout); + } + + void clockResume(Double timeout) { + clockResume(new BrowserContextClockResumeParams(), timeout); + } + + void clockRunFor(BrowserContextClockRunForParams params, Double timeout) { + owner.sendMessage("clockRunFor", params, timeout); + } + + void clockSetFixedTime(BrowserContextClockSetFixedTimeParams params, Double timeout) { + owner.sendMessage("clockSetFixedTime", params, timeout); + } + + void clockSetSystemTime(BrowserContextClockSetSystemTimeParams params, Double timeout) { + owner.sendMessage("clockSetSystemTime", params, timeout); + } + + void credentialsInstall(BrowserContextCredentialsInstallParams params, Double timeout) { + owner.sendMessage("credentialsInstall", params, timeout); + } + + void credentialsInstall(Double timeout) { + credentialsInstall(new BrowserContextCredentialsInstallParams(), timeout); + } + + BrowserContextCredentialsCreateResult credentialsCreate(BrowserContextCredentialsCreateParams params, Double timeout) { + return owner.sendMessage("credentialsCreate", params, BrowserContextCredentialsCreateResult.class, timeout); + } + + BrowserContextCredentialsGetResult credentialsGet(BrowserContextCredentialsGetParams params, Double timeout) { + return owner.sendMessage("credentialsGet", params, BrowserContextCredentialsGetResult.class, timeout); + } + + void credentialsDelete(BrowserContextCredentialsDeleteParams params, Double timeout) { + owner.sendMessage("credentialsDelete", params, timeout); + } +} + +class BrowserContextInitializer { + DebuggerImpl debugger; + APIRequestContextImpl requestContext; + TracingImpl tracing; + BrowserContextInitializerOptions options; + + static class BrowserContextInitializerOptions { + Boolean noDefaultViewport; + BrowserContextInitializerOptionsViewport viewport; + BrowserContextInitializerOptionsScreen screen; + Boolean ignoreHTTPSErrors; + List clientCertificates; + Boolean javaScriptEnabled; + Boolean bypassCSP; + String userAgent; + String locale; + String timezoneId; + BrowserContextInitializerOptionsGeolocation geolocation; + List permissions; + List extraHTTPHeaders; + Boolean offline; + List httpCredentials; + Double deviceScaleFactor; + Boolean isMobile; + Boolean hasTouch; + String colorScheme; + String reducedMotion; + String forcedColors; + String acceptDownloads; + String contrast; + String baseURL; + BrowserContextInitializerOptionsRecordVideo recordVideo; + Boolean strictSelectors; + String serviceWorkers; + List selectorEngines; + String testIdAttributeName; + + static class BrowserContextInitializerOptionsViewport { + Integer width; + Integer height; + } + + static class BrowserContextInitializerOptionsScreen { + Integer width; + Integer height; + } + + static class BrowserContextInitializerOptionsClientCertificates { + String origin; + byte[] cert; + byte[] key; + String passphrase; + byte[] pfx; + } + + static class BrowserContextInitializerOptionsGeolocation { + Double longitude; + Double latitude; + Double accuracy; + } + + static class BrowserContextInitializerOptionsRecordVideo { + String dir; + BrowserContextInitializerOptionsRecordVideoSize size; + Integer fps; + BrowserContextInitializerOptionsRecordVideoShowActions showActions; + + static class BrowserContextInitializerOptionsRecordVideoSize { + Integer width; + Integer height; + } + + static class BrowserContextInitializerOptionsRecordVideoShowActions { + Double duration; + String position; + Integer fontSize; + String cursor; + BrowserContextInitializerOptionsRecordVideoShowActionsStyle style; + + static class BrowserContextInitializerOptionsRecordVideoShowActionsStyle { + String point; + String highlight; + String title; + } + } + } + } +} + +class BrowserContextAddCookiesParams { + List cookies; +} + +class BrowserContextAddInitScriptParams { + String source; +} + +class BrowserContextAddInitScriptResult { + DisposableObject disposable; +} + +class BrowserContextClearCookiesParams { + String name; + String nameRegexSource; + String nameRegexFlags; + String domain; + String domainRegexSource; + String domainRegexFlags; + String path; + String pathRegexSource; + String pathRegexFlags; +} + +class BrowserContextClearPermissionsParams { +} + +class BrowserContextCloseParams { + String reason; +} + +class BrowserContextCookiesParams { + List urls; +} + +class BrowserContextCookiesResult { + List cookies; +} + +class BrowserContextExposeBindingParams { + String name; + Boolean noGlobal; +} + +class BrowserContextExposeBindingResult { + DisposableObject disposable; +} + +class BrowserContextGrantPermissionsParams { + List permissions; + String origin; +} + +class BrowserContextNewPageParams { +} + +class BrowserContextNewPageResult { + PageImpl page; +} + +class BrowserContextRegisterSelectorEngineParams { + SelectorEngine selectorEngine; +} + +class BrowserContextSetTestIdAttributeNameParams { + String testIdAttributeName; +} + +class BrowserContextSetExtraHTTPHeadersParams { + List headers; +} + +class BrowserContextSetGeolocationParams { + BrowserContextSetGeolocationParamsGeolocation geolocation; + + static class BrowserContextSetGeolocationParamsGeolocation { + Double longitude; + Double latitude; + Double accuracy; + } +} + +class BrowserContextSetHTTPCredentialsParams { + List httpCredentials; +} + +class BrowserContextSetNetworkInterceptionPatternsParams { + List patterns; + + static class BrowserContextSetNetworkInterceptionPatternsParamsPatterns { + String glob; + String regexSource; + String regexFlags; + URLPattern urlPattern; + } +} + +class BrowserContextSetWebSocketInterceptionPatternsParams { + List patterns; + + static class BrowserContextSetWebSocketInterceptionPatternsParamsPatterns { + String glob; + String regexSource; + String regexFlags; + URLPattern urlPattern; + } +} + +class BrowserContextSetOfflineParams { + Boolean offline; +} + +class BrowserContextStorageStateParams { + Boolean indexedDB; + Boolean opfs; + Boolean credentials; +} + +class BrowserContextStorageStateResult { + List cookies; + List origins; + List credentials; +} + +class BrowserContextSetStorageStateParams { + BrowserContextSetStorageStateParamsStorageState storageState; + + static class BrowserContextSetStorageStateParamsStorageState { + List cookies; + List origins; + List credentials; + } +} + +class BrowserContextPauseParams { +} + +class BrowserContextShowRecorderParams { + String language; + String mode; + Boolean pauseOnNextStatement; + String testIdAttributeName; + JsonElement launchOptions; + JsonElement contextOptions; + String device; + String saveStorage; + String outputFile; + Boolean handleSIGINT; + Boolean omitCallTracking; +} + +class BrowserContextStartRecordingParams { + String language; +} + +class BrowserContextStopRecordingParams { +} + +class BrowserContextExposeConsoleApiParams { +} + +class BrowserContextNewCDPSessionParams { + PageImpl page; + FrameImpl frame; +} + +class BrowserContextNewCDPSessionResult { + CDPSessionImpl session; +} + +class BrowserContextCreateTempFilesParams { + String rootDirName; + List items; + + static class BrowserContextCreateTempFilesParamsItems { + String name; + Double lastModifiedMs; + } +} + +class BrowserContextCreateTempFilesResult { + WritableStream rootDir; + List writableStreams; +} + +class BrowserContextUpdateSubscriptionParams { + String event; + Boolean enabled; +} + +class BrowserContextClockFastForwardParams { + Double ticksNumber; + String ticksString; +} + +class BrowserContextClockInstallParams { + Double timeNumber; + String timeString; +} + +class BrowserContextClockPauseAtParams { + Double timeNumber; + String timeString; +} + +class BrowserContextClockResumeParams { +} + +class BrowserContextClockRunForParams { + Double ticksNumber; + String ticksString; +} + +class BrowserContextClockSetFixedTimeParams { + Double timeNumber; + String timeString; +} + +class BrowserContextClockSetSystemTimeParams { + Double timeNumber; + String timeString; +} + +class BrowserContextCredentialsInstallParams { +} + +class BrowserContextCredentialsCreateParams { + String rpId; + String id; + String userHandle; + String privateKey; + String publicKey; + Integer signCount; +} + +class BrowserContextCredentialsCreateResult { + ProtocolVirtualCredential credential; +} + +class BrowserContextCredentialsGetParams { + String rpId; + String id; +} + +class BrowserContextCredentialsGetResult { + List credentials; +} + +class BrowserContextCredentialsDeleteParams { + String id; +} + +class BrowserContextBindingCallEvent { + BindingCall binding; +} + +class BrowserContextConsoleEvent { + String type; + String text; + List args; + BrowserContextConsoleEventLocation location; + Double timestamp; + PageImpl page; + WorkerImpl worker; + + static class BrowserContextConsoleEventLocation { + String url; + Integer lineNumber; + Integer columnNumber; + } +} + +class BrowserContextCloseEvent { +} + +class BrowserContextDialogEvent { + DialogImpl dialog; +} + +class BrowserContextDialogClosedEvent { + DialogImpl dialog; +} + +class BrowserContextPageEvent { + PageImpl page; +} + +class BrowserContextPageErrorEvent { + SerializedError error; + PageImpl page; + BrowserContextPageErrorEventLocation location; + + static class BrowserContextPageErrorEventLocation { + String url; + Integer line; + Integer column; + } +} + +class BrowserContextRouteEvent { + RouteImpl route; +} + +class BrowserContextWebSocketRouteEvent { + WebSocketRouteImpl webSocketRoute; +} + +class BrowserContextServiceWorkerEvent { + WorkerImpl worker; +} + +class BrowserContextRequestEvent { + RequestImpl request; + PageImpl page; +} + +class BrowserContextRequestFailedEvent { + RequestImpl request; + String failureText; + Double responseEndTiming; + PageImpl page; +} + +class BrowserContextRequestFinishedEvent { + RequestImpl request; + ResponseImpl response; + Double responseEndTiming; + PageImpl page; +} + +class BrowserContextResponseEvent { + ResponseImpl response; + PageImpl page; +} + +class BrowserContextRecorderEventEvent { + String event; + JsonElement data; + PageImpl page; + String code; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java new file mode 100644 index 000000000..4d0680dfb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java @@ -0,0 +1,220 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class BrowserTypeChannel { + private final ChannelOwner owner; + + BrowserTypeChannel(ChannelOwner owner) { + this.owner = owner; + } + + BrowserTypeLaunchResult launch(BrowserTypeLaunchParams params, Double timeout) { + return owner.sendMessage("launch", params, BrowserTypeLaunchResult.class, timeout); + } + + BrowserTypeLaunchPersistentContextResult launchPersistentContext(BrowserTypeLaunchPersistentContextParams params, Double timeout) { + return owner.sendMessage("launchPersistentContext", params, BrowserTypeLaunchPersistentContextResult.class, timeout); + } + + BrowserTypeConnectOverCDPResult connectOverCDP(BrowserTypeConnectOverCDPParams params, Double timeout) { + return owner.sendMessage("connectOverCDP", params, BrowserTypeConnectOverCDPResult.class, timeout); + } + + BrowserTypeConnectToWorkerResult connectToWorker(BrowserTypeConnectToWorkerParams params, Double timeout) { + return owner.sendMessage("connectToWorker", params, BrowserTypeConnectToWorkerResult.class, timeout); + } +} + +class BrowserTypeInitializer { + String executablePath; + String name; +} + +class BrowserTypeLaunchParams { + String channel; + String executablePath; + List args; + Boolean ignoreAllDefaultArgs; + List ignoreDefaultArgs; + Boolean handleSIGINT; + Boolean handleSIGTERM; + Boolean handleSIGHUP; + List env; + Boolean headless; + BrowserTypeLaunchParamsProxy proxy; + String downloadsPath; + String tracesDir; + String artifactsDir; + Boolean chromiumSandbox; + JsonElement firefoxUserPrefs; + Integer cdpPort; + Double slowMo; + + static class BrowserTypeLaunchParamsProxy { + String server; + String bypass; + String username; + String password; + } +} + +class BrowserTypeLaunchResult { + BrowserImpl browser; +} + +class BrowserTypeLaunchPersistentContextParams { + String channel; + String executablePath; + List args; + Boolean ignoreAllDefaultArgs; + List ignoreDefaultArgs; + Boolean handleSIGINT; + Boolean handleSIGTERM; + Boolean handleSIGHUP; + List env; + Boolean headless; + BrowserTypeLaunchPersistentContextParamsProxy proxy; + String downloadsPath; + String tracesDir; + String artifactsDir; + Boolean chromiumSandbox; + JsonElement firefoxUserPrefs; + Integer cdpPort; + Boolean noDefaultViewport; + BrowserTypeLaunchPersistentContextParamsViewport viewport; + BrowserTypeLaunchPersistentContextParamsScreen screen; + Boolean ignoreHTTPSErrors; + List clientCertificates; + Boolean javaScriptEnabled; + Boolean bypassCSP; + String userAgent; + String locale; + String timezoneId; + BrowserTypeLaunchPersistentContextParamsGeolocation geolocation; + List permissions; + List extraHTTPHeaders; + Boolean offline; + List httpCredentials; + Double deviceScaleFactor; + Boolean isMobile; + Boolean hasTouch; + String colorScheme; + String reducedMotion; + String forcedColors; + String acceptDownloads; + String contrast; + String baseURL; + BrowserTypeLaunchPersistentContextParamsRecordVideo recordVideo; + Boolean strictSelectors; + String serviceWorkers; + List selectorEngines; + String testIdAttributeName; + String userDataDir; + Double slowMo; + + static class BrowserTypeLaunchPersistentContextParamsProxy { + String server; + String bypass; + String username; + String password; + } + + static class BrowserTypeLaunchPersistentContextParamsViewport { + Integer width; + Integer height; + } + + static class BrowserTypeLaunchPersistentContextParamsScreen { + Integer width; + Integer height; + } + + static class BrowserTypeLaunchPersistentContextParamsClientCertificates { + String origin; + byte[] cert; + byte[] key; + String passphrase; + byte[] pfx; + } + + static class BrowserTypeLaunchPersistentContextParamsGeolocation { + Double longitude; + Double latitude; + Double accuracy; + } + + static class BrowserTypeLaunchPersistentContextParamsRecordVideo { + String dir; + BrowserTypeLaunchPersistentContextParamsRecordVideoSize size; + Integer fps; + BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions showActions; + + static class BrowserTypeLaunchPersistentContextParamsRecordVideoSize { + Integer width; + Integer height; + } + + static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions { + Double duration; + String position; + Integer fontSize; + String cursor; + BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle style; + + static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle { + String point; + String highlight; + String title; + } + } + } +} + +class BrowserTypeLaunchPersistentContextResult { + BrowserImpl browser; + BrowserContextImpl context; +} + +class BrowserTypeConnectOverCDPParams { + String endpointURL; + List headers; + Double slowMo; + Boolean isLocal; + Boolean noDefaults; + Boolean isWebView; + String artifactsDir; + byte[] transport; +} + +class BrowserTypeConnectOverCDPResult { + BrowserImpl browser; + BrowserContextImpl defaultContext; +} + +class BrowserTypeConnectToWorkerParams { + String endpoint; +} + +class BrowserTypeConnectToWorkerResult { + WorkerImpl worker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java new file mode 100644 index 000000000..d67203a60 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; + +class CDPSessionChannel { + private final ChannelOwner owner; + + CDPSessionChannel(ChannelOwner owner) { + this.owner = owner; + } + + CDPSessionSendResult send(CDPSessionSendParams params, Double timeout) { + return owner.sendMessage("send", params, CDPSessionSendResult.class, timeout); + } + + void detach(CDPSessionDetachParams params, Double timeout) { + owner.sendMessage("detach", params, timeout); + } + + void detach(Double timeout) { + detach(new CDPSessionDetachParams(), timeout); + } +} + +class CDPSessionInitializer { +} + +class CDPSessionSendParams { + String method; + JsonElement params; +} + +class CDPSessionSendResult { + JsonElement result; +} + +class CDPSessionDetachParams { +} + +class CDPSessionEventEvent { + String method; + JsonElement params; +} + +class CDPSessionCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index 966e25208..72dfc855d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java @@ -59,7 +59,7 @@ public String toString() { ", method='" + method + '\'' + ", params=" + (params == null ? null : "<...>") + ", result='" + result + '\'' + - ", error='" + error + '\'' + + ", error='" + Connection.errorToString(error) + '\'' + '}'; } } @@ -333,6 +333,24 @@ public byte[] read(JsonReader in) throws IOException { } } + // Format of the driver error message; tests match on it. + static String errorToString(SerializedError.SerializedErrorError error) { + return "Error {\n" + + " message='" + error.message + '\n' + + " name='" + error.name + '\n' + + " stack='" + error.stack + '\n' + + '}'; + } + + static String errorToString(SerializedError error) { + if (error.error != null) { + return errorToString(error.error); + } + return "SerializedError{" + + "value=" + error.value + + '}'; + } + private static String formatCallLog(JsonArray log) { if (log == null) { return ""; @@ -372,13 +390,13 @@ private void dispatch(Message message) { String callLog = formatCallLog(message.log); PlaywrightException exception; if (message.error.error == null) { - exception = new PlaywrightException(message.error + callLog); + exception = new PlaywrightException(errorToString(message.error) + callLog); } else if ("TimeoutError".equals(message.error.error.name)) { - exception = new TimeoutError(message.error.error + callLog); + exception = new TimeoutError(errorToString(message.error.error) + callLog); } else if ("TargetClosedError".equals(message.error.error.name)) { - exception = new TargetClosedError(message.error.error + callLog); + exception = new TargetClosedError(errorToString(message.error.error) + callLog); } else { - exception = new DriverException(message.error.error + callLog); + exception = new DriverException(errorToString(message.error.error) + callLog); } if (message.errorDetails != null) { exception = new ServerErrorWithDetails(exception, message.errorDetails, message.log); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java new file mode 100644 index 000000000..35706cdd4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class DebugControllerChannel { + private final ChannelOwner owner; + + DebugControllerChannel(ChannelOwner owner) { + this.owner = owner; + } + + void initialize(DebugControllerInitializeParams params, Double timeout) { + owner.sendMessage("initialize", params, timeout); + } + + void setReportStateChanged(DebugControllerSetReportStateChangedParams params, Double timeout) { + owner.sendMessage("setReportStateChanged", params, timeout); + } + + void setRecorderMode(DebugControllerSetRecorderModeParams params, Double timeout) { + owner.sendMessage("setRecorderMode", params, timeout); + } + + void highlight(DebugControllerHighlightParams params, Double timeout) { + owner.sendMessage("highlight", params, timeout); + } + + void hideHighlight(DebugControllerHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + void hideHighlight(Double timeout) { + hideHighlight(new DebugControllerHideHighlightParams(), timeout); + } + + void resume(DebugControllerResumeParams params, Double timeout) { + owner.sendMessage("resume", params, timeout); + } + + void resume(Double timeout) { + resume(new DebugControllerResumeParams(), timeout); + } + + void kill(DebugControllerKillParams params, Double timeout) { + owner.sendMessage("kill", params, timeout); + } + + void kill(Double timeout) { + kill(new DebugControllerKillParams(), timeout); + } +} + +class DebugControllerInitializer { +} + +class DebugControllerInitializeParams { + String codegenId; + String sdkLanguage; +} + +class DebugControllerSetReportStateChangedParams { + Boolean enabled; +} + +class DebugControllerSetRecorderModeParams { + String mode; + String testIdAttributeName; + Boolean generateAutoExpect; +} + +class DebugControllerHighlightParams { + String selector; + String ariaTemplate; +} + +class DebugControllerHideHighlightParams { +} + +class DebugControllerResumeParams { +} + +class DebugControllerKillParams { +} + +class DebugControllerInspectRequestedEvent { + String selector; + String locator; + String ariaSnapshot; +} + +class DebugControllerSetModeRequestedEvent { + String mode; +} + +class DebugControllerStateChangedEvent { + Integer pageCount; +} + +class DebugControllerSourceChangedEvent { + String text; + String header; + String footer; + List actions; +} + +class DebugControllerPausedEvent { + Boolean paused; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java new file mode 100644 index 000000000..e19d97da0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class DebuggerChannel { + private final ChannelOwner owner; + + DebuggerChannel(ChannelOwner owner) { + this.owner = owner; + } + + void requestPause(DebuggerRequestPauseParams params, Double timeout) { + owner.sendMessage("requestPause", params, timeout); + } + + void requestPause(Double timeout) { + requestPause(new DebuggerRequestPauseParams(), timeout); + } + + void resume(DebuggerResumeParams params, Double timeout) { + owner.sendMessage("resume", params, timeout); + } + + void resume(Double timeout) { + resume(new DebuggerResumeParams(), timeout); + } + + void next(DebuggerNextParams params, Double timeout) { + owner.sendMessage("next", params, timeout); + } + + void next(Double timeout) { + next(new DebuggerNextParams(), timeout); + } + + void runTo(DebuggerRunToParams params, Double timeout) { + owner.sendMessage("runTo", params, timeout); + } + + void enable(DebuggerEnableParams params, Double timeout) { + owner.sendMessage("enable", params, timeout); + } + + void enable(Double timeout) { + enable(new DebuggerEnableParams(), timeout); + } +} + +class DebuggerInitializer { +} + +class DebuggerRequestPauseParams { +} + +class DebuggerResumeParams { +} + +class DebuggerNextParams { +} + +class DebuggerRunToParams { + DebuggerRunToParamsLocation location; + + static class DebuggerRunToParamsLocation { + String file; + Integer line; + Integer column; + } +} + +class DebuggerEnableParams { +} + +class DebuggerPausedStateChangedEvent { + DebuggerPausedStateChangedEventPausedDetails pausedDetails; + + static class DebuggerPausedStateChangedEventPausedDetails { + DebuggerPausedStateChangedEventPausedDetailsLocation location; + String title; + String stack; + + static class DebuggerPausedStateChangedEventPausedDetailsLocation { + String file; + Integer line; + Integer column; + } + } +} + +class DebuggerApiCallsUpdatedEvent { + List apiCalls; + + static class DebuggerApiCallsUpdatedEventApiCalls { + String id; + String title; + DebuggerApiCallsUpdatedEventApiCallsLocation location; + List newLogEntries; + Point actionPoint; + String status; + String error; + + static class DebuggerApiCallsUpdatedEventApiCallsLocation { + String file; + Integer line; + Integer column; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java new file mode 100644 index 000000000..6fc8176fb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class DialogChannel { + private final ChannelOwner owner; + + DialogChannel(ChannelOwner owner) { + this.owner = owner; + } + + void accept(DialogAcceptParams params, Double timeout) { + owner.sendMessage("accept", params, timeout); + } + + void dismiss(DialogDismissParams params, Double timeout) { + owner.sendMessage("dismiss", params, timeout); + } + + void dismiss(Double timeout) { + dismiss(new DialogDismissParams(), timeout); + } +} + +class DialogInitializer { + PageImpl page; + String type; + String message; + String defaultValue; +} + +class DialogAcceptParams { + String promptText; +} + +class DialogDismissParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java new file mode 100644 index 000000000..34b3315db --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class DisposableChannel { + private final ChannelOwner owner; + + DisposableChannel(ChannelOwner owner) { + this.owner = owner; + } + + void dispose(DisposableDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + void dispose(Double timeout) { + dispose(new DisposableDisposeParams(), timeout); + } +} + +class DisposableInitializer { +} + +class DisposableDisposeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java new file mode 100644 index 000000000..8b222f894 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java @@ -0,0 +1,562 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class ElementHandleChannel { + private final ChannelOwner owner; + + ElementHandleChannel(ChannelOwner owner) { + this.owner = owner; + } + + ElementHandleEvalOnSelectorResult evalOnSelector(ElementHandleEvalOnSelectorParams params, Double timeout) { + return owner.sendMessage("evalOnSelector", params, ElementHandleEvalOnSelectorResult.class, timeout); + } + + ElementHandleEvalOnSelectorAllResult evalOnSelectorAll(ElementHandleEvalOnSelectorAllParams params, Double timeout) { + return owner.sendMessage("evalOnSelectorAll", params, ElementHandleEvalOnSelectorAllResult.class, timeout); + } + + ElementHandleBoundingBoxResult boundingBox(ElementHandleBoundingBoxParams params, Double timeout) { + return owner.sendMessage("boundingBox", params, ElementHandleBoundingBoxResult.class, timeout); + } + + ElementHandleBoundingBoxResult boundingBox(Double timeout) { + return boundingBox(new ElementHandleBoundingBoxParams(), timeout); + } + + void check(ElementHandleCheckParams params, Double timeout) { + owner.sendMessage("check", params, timeout); + } + + void click(ElementHandleClickParams params, Double timeout) { + owner.sendMessage("click", params, timeout); + } + + ElementHandleContentFrameResult contentFrame(ElementHandleContentFrameParams params, Double timeout) { + return owner.sendMessage("contentFrame", params, ElementHandleContentFrameResult.class, timeout); + } + + ElementHandleContentFrameResult contentFrame(Double timeout) { + return contentFrame(new ElementHandleContentFrameParams(), timeout); + } + + void dblclick(ElementHandleDblclickParams params, Double timeout) { + owner.sendMessage("dblclick", params, timeout); + } + + void dispatchEvent(ElementHandleDispatchEventParams params, Double timeout) { + owner.sendMessage("dispatchEvent", params, timeout); + } + + void fill(ElementHandleFillParams params, Double timeout) { + owner.sendMessage("fill", params, timeout); + } + + void focus(ElementHandleFocusParams params, Double timeout) { + owner.sendMessage("focus", params, timeout); + } + + void focus(Double timeout) { + focus(new ElementHandleFocusParams(), timeout); + } + + ElementHandleGetAttributeResult getAttribute(ElementHandleGetAttributeParams params, Double timeout) { + return owner.sendMessage("getAttribute", params, ElementHandleGetAttributeResult.class, timeout); + } + + void hover(ElementHandleHoverParams params, Double timeout) { + owner.sendMessage("hover", params, timeout); + } + + ElementHandleInnerHTMLResult innerHTML(ElementHandleInnerHTMLParams params, Double timeout) { + return owner.sendMessage("innerHTML", params, ElementHandleInnerHTMLResult.class, timeout); + } + + ElementHandleInnerHTMLResult innerHTML(Double timeout) { + return innerHTML(new ElementHandleInnerHTMLParams(), timeout); + } + + ElementHandleInnerTextResult innerText(ElementHandleInnerTextParams params, Double timeout) { + return owner.sendMessage("innerText", params, ElementHandleInnerTextResult.class, timeout); + } + + ElementHandleInnerTextResult innerText(Double timeout) { + return innerText(new ElementHandleInnerTextParams(), timeout); + } + + ElementHandleInputValueResult inputValue(ElementHandleInputValueParams params, Double timeout) { + return owner.sendMessage("inputValue", params, ElementHandleInputValueResult.class, timeout); + } + + ElementHandleInputValueResult inputValue(Double timeout) { + return inputValue(new ElementHandleInputValueParams(), timeout); + } + + ElementHandleIsCheckedResult isChecked(ElementHandleIsCheckedParams params, Double timeout) { + return owner.sendMessage("isChecked", params, ElementHandleIsCheckedResult.class, timeout); + } + + ElementHandleIsCheckedResult isChecked(Double timeout) { + return isChecked(new ElementHandleIsCheckedParams(), timeout); + } + + ElementHandleIsDisabledResult isDisabled(ElementHandleIsDisabledParams params, Double timeout) { + return owner.sendMessage("isDisabled", params, ElementHandleIsDisabledResult.class, timeout); + } + + ElementHandleIsDisabledResult isDisabled(Double timeout) { + return isDisabled(new ElementHandleIsDisabledParams(), timeout); + } + + ElementHandleIsEditableResult isEditable(ElementHandleIsEditableParams params, Double timeout) { + return owner.sendMessage("isEditable", params, ElementHandleIsEditableResult.class, timeout); + } + + ElementHandleIsEditableResult isEditable(Double timeout) { + return isEditable(new ElementHandleIsEditableParams(), timeout); + } + + ElementHandleIsEnabledResult isEnabled(ElementHandleIsEnabledParams params, Double timeout) { + return owner.sendMessage("isEnabled", params, ElementHandleIsEnabledResult.class, timeout); + } + + ElementHandleIsEnabledResult isEnabled(Double timeout) { + return isEnabled(new ElementHandleIsEnabledParams(), timeout); + } + + ElementHandleIsHiddenResult isHidden(ElementHandleIsHiddenParams params, Double timeout) { + return owner.sendMessage("isHidden", params, ElementHandleIsHiddenResult.class, timeout); + } + + ElementHandleIsHiddenResult isHidden(Double timeout) { + return isHidden(new ElementHandleIsHiddenParams(), timeout); + } + + ElementHandleIsVisibleResult isVisible(ElementHandleIsVisibleParams params, Double timeout) { + return owner.sendMessage("isVisible", params, ElementHandleIsVisibleResult.class, timeout); + } + + ElementHandleIsVisibleResult isVisible(Double timeout) { + return isVisible(new ElementHandleIsVisibleParams(), timeout); + } + + ElementHandleOwnerFrameResult ownerFrame(ElementHandleOwnerFrameParams params, Double timeout) { + return owner.sendMessage("ownerFrame", params, ElementHandleOwnerFrameResult.class, timeout); + } + + ElementHandleOwnerFrameResult ownerFrame(Double timeout) { + return ownerFrame(new ElementHandleOwnerFrameParams(), timeout); + } + + void press(ElementHandlePressParams params, Double timeout) { + owner.sendMessage("press", params, timeout); + } + + ElementHandleQuerySelectorResult querySelector(ElementHandleQuerySelectorParams params, Double timeout) { + return owner.sendMessage("querySelector", params, ElementHandleQuerySelectorResult.class, timeout); + } + + ElementHandleQuerySelectorAllResult querySelectorAll(ElementHandleQuerySelectorAllParams params, Double timeout) { + return owner.sendMessage("querySelectorAll", params, ElementHandleQuerySelectorAllResult.class, timeout); + } + + ElementHandleScreenshotResult screenshot(ElementHandleScreenshotParams params, Double timeout) { + return owner.sendMessage("screenshot", params, ElementHandleScreenshotResult.class, timeout); + } + + void scrollIntoViewIfNeeded(ElementHandleScrollIntoViewIfNeededParams params, Double timeout) { + owner.sendMessage("scrollIntoViewIfNeeded", params, timeout); + } + + void scrollIntoViewIfNeeded(Double timeout) { + scrollIntoViewIfNeeded(new ElementHandleScrollIntoViewIfNeededParams(), timeout); + } + + ElementHandleSelectOptionResult selectOption(ElementHandleSelectOptionParams params, Double timeout) { + return owner.sendMessage("selectOption", params, ElementHandleSelectOptionResult.class, timeout); + } + + void selectText(ElementHandleSelectTextParams params, Double timeout) { + owner.sendMessage("selectText", params, timeout); + } + + void setInputFiles(ElementHandleSetInputFilesParams params, Double timeout) { + owner.sendMessage("setInputFiles", params, timeout); + } + + void tap(ElementHandleTapParams params, Double timeout) { + owner.sendMessage("tap", params, timeout); + } + + ElementHandleTextContentResult textContent(ElementHandleTextContentParams params, Double timeout) { + return owner.sendMessage("textContent", params, ElementHandleTextContentResult.class, timeout); + } + + ElementHandleTextContentResult textContent(Double timeout) { + return textContent(new ElementHandleTextContentParams(), timeout); + } + + void type(ElementHandleTypeParams params, Double timeout) { + owner.sendMessage("type", params, timeout); + } + + void uncheck(ElementHandleUncheckParams params, Double timeout) { + owner.sendMessage("uncheck", params, timeout); + } + + void waitForElementState(ElementHandleWaitForElementStateParams params, Double timeout) { + owner.sendMessage("waitForElementState", params, timeout); + } + + ElementHandleWaitForSelectorResult waitForSelector(ElementHandleWaitForSelectorParams params, Double timeout) { + return owner.sendMessage("waitForSelector", params, ElementHandleWaitForSelectorResult.class, timeout); + } + + void dispose(JSHandleDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + void dispose(Double timeout) { + dispose(new JSHandleDisposeParams(), timeout); + } + + JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); + } + + JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); + } + + JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { + return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); + } + + JSHandleGetPropertyListResult getPropertyList(Double timeout) { + return getPropertyList(new JSHandleGetPropertyListParams(), timeout); + } + + JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { + return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); + } + + JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { + return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); + } + + JSHandleJsonValueResult jsonValue(Double timeout) { + return jsonValue(new JSHandleJsonValueParams(), timeout); + } +} + +class ElementHandleInitializer extends JSHandleInitializer { +} + +class ElementHandleEvalOnSelectorParams { + String selector; + Boolean strict; + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class ElementHandleEvalOnSelectorResult { + SerializedValue value; +} + +class ElementHandleEvalOnSelectorAllParams { + String selector; + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class ElementHandleEvalOnSelectorAllResult { + SerializedValue value; +} + +class ElementHandleBoundingBoxParams { +} + +class ElementHandleBoundingBoxResult { + Rect value; +} + +class ElementHandleCheckParams { + Boolean force; + String scroll; + Point position; + Boolean trial; +} + +class ElementHandleClickParams { + Boolean force; + String scroll; + Boolean noWaitAfter; + List modifiers; + Point position; + Double delay; + String button; + Integer clickCount; + Boolean trial; + Integer steps; +} + +class ElementHandleContentFrameParams { +} + +class ElementHandleContentFrameResult { + FrameImpl frame; +} + +class ElementHandleDblclickParams { + Boolean force; + String scroll; + List modifiers; + Point position; + Double delay; + String button; + Boolean trial; + Integer steps; +} + +class ElementHandleDispatchEventParams { + String type; + SerializedArgument eventInit; +} + +class ElementHandleFillParams { + String value; + Boolean force; +} + +class ElementHandleFocusParams { +} + +class ElementHandleGetAttributeParams { + String name; +} + +class ElementHandleGetAttributeResult { + String value; +} + +class ElementHandleHoverParams { + Boolean force; + String scroll; + List modifiers; + Point position; + Boolean trial; +} + +class ElementHandleInnerHTMLParams { +} + +class ElementHandleInnerHTMLResult { + String value; +} + +class ElementHandleInnerTextParams { +} + +class ElementHandleInnerTextResult { + String value; +} + +class ElementHandleInputValueParams { +} + +class ElementHandleInputValueResult { + String value; +} + +class ElementHandleIsCheckedParams { +} + +class ElementHandleIsCheckedResult { + Boolean value; +} + +class ElementHandleIsDisabledParams { +} + +class ElementHandleIsDisabledResult { + Boolean value; +} + +class ElementHandleIsEditableParams { +} + +class ElementHandleIsEditableResult { + Boolean value; +} + +class ElementHandleIsEnabledParams { +} + +class ElementHandleIsEnabledResult { + Boolean value; +} + +class ElementHandleIsHiddenParams { +} + +class ElementHandleIsHiddenResult { + Boolean value; +} + +class ElementHandleIsVisibleParams { +} + +class ElementHandleIsVisibleResult { + Boolean value; +} + +class ElementHandleOwnerFrameParams { +} + +class ElementHandleOwnerFrameResult { + FrameImpl frame; +} + +class ElementHandlePressParams { + String key; + Double delay; + Boolean noWaitAfter; +} + +class ElementHandleQuerySelectorParams { + String selector; + Boolean strict; +} + +class ElementHandleQuerySelectorResult { + ElementHandleImpl element; +} + +class ElementHandleQuerySelectorAllParams { + String selector; +} + +class ElementHandleQuerySelectorAllResult { + List elements; +} + +class ElementHandleScreenshotParams { + String type; + Integer quality; + Boolean omitBackground; + String caret; + String animations; + String scale; + List mask; + String maskColor; + String style; + + static class ElementHandleScreenshotParamsMask { + FrameImpl frame; + String selector; + } +} + +class ElementHandleScreenshotResult { + byte[] binary; +} + +class ElementHandleScrollIntoViewIfNeededParams { +} + +class ElementHandleSelectOptionParams { + List elements; + List options; + Boolean force; + + static class ElementHandleSelectOptionParamsOptions { + String valueOrLabel; + String value; + String label; + Integer index; + } +} + +class ElementHandleSelectOptionResult { + List values; +} + +class ElementHandleSelectTextParams { + Boolean force; +} + +class ElementHandleSetInputFilesParams { + List payloads; + String localDirectory; + WritableStream directoryStream; + List localPaths; + List streams; + + static class ElementHandleSetInputFilesParamsPayloads { + String name; + String mimeType; + byte[] buffer; + } +} + +class ElementHandleTapParams { + Boolean force; + String scroll; + List modifiers; + Point position; + Boolean trial; +} + +class ElementHandleTextContentParams { +} + +class ElementHandleTextContentResult { + String value; +} + +class ElementHandleTypeParams { + String text; + Double delay; +} + +class ElementHandleUncheckParams { + Boolean force; + String scroll; + Point position; + Boolean trial; +} + +class ElementHandleWaitForElementStateParams { + String state; +} + +class ElementHandleWaitForSelectorParams { + String selector; + Boolean strict; + String state; +} + +class ElementHandleWaitForSelectorResult { + ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java new file mode 100644 index 000000000..7965cd547 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java @@ -0,0 +1,791 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class FrameChannel { + private final ChannelOwner owner; + + FrameChannel(ChannelOwner owner) { + this.owner = owner; + } + + FrameEvalOnSelectorResult evalOnSelector(FrameEvalOnSelectorParams params, Double timeout) { + return owner.sendMessage("evalOnSelector", params, FrameEvalOnSelectorResult.class, timeout); + } + + FrameEvalOnSelectorAllResult evalOnSelectorAll(FrameEvalOnSelectorAllParams params, Double timeout) { + return owner.sendMessage("evalOnSelectorAll", params, FrameEvalOnSelectorAllResult.class, timeout); + } + + FrameAddScriptTagResult addScriptTag(FrameAddScriptTagParams params, Double timeout) { + return owner.sendMessage("addScriptTag", params, FrameAddScriptTagResult.class, timeout); + } + + FrameAddStyleTagResult addStyleTag(FrameAddStyleTagParams params, Double timeout) { + return owner.sendMessage("addStyleTag", params, FrameAddStyleTagResult.class, timeout); + } + + FrameAriaSnapshotResult ariaSnapshot(FrameAriaSnapshotParams params, Double timeout) { + return owner.sendMessage("ariaSnapshot", params, FrameAriaSnapshotResult.class, timeout); + } + + FrameAriaSnapshotJSONResult ariaSnapshotJSON(FrameAriaSnapshotJSONParams params, Double timeout) { + return owner.sendMessage("ariaSnapshotJSON", params, FrameAriaSnapshotJSONResult.class, timeout); + } + + void blur(FrameBlurParams params, Double timeout) { + owner.sendMessage("blur", params, timeout); + } + + void check(FrameCheckParams params, Double timeout) { + owner.sendMessage("check", params, timeout); + } + + void click(FrameClickParams params, Double timeout) { + owner.sendMessage("click", params, timeout); + } + + FrameContentResult content(FrameContentParams params, Double timeout) { + return owner.sendMessage("content", params, FrameContentResult.class, timeout); + } + + void dragAndDrop(FrameDragAndDropParams params, Double timeout) { + owner.sendMessage("dragAndDrop", params, timeout); + } + + void drop(FrameDropParams params, Double timeout) { + owner.sendMessage("drop", params, timeout); + } + + void dblclick(FrameDblclickParams params, Double timeout) { + owner.sendMessage("dblclick", params, timeout); + } + + void dispatchEvent(FrameDispatchEventParams params, Double timeout) { + owner.sendMessage("dispatchEvent", params, timeout); + } + + FrameEvaluateExpressionResult evaluateExpression(FrameEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, FrameEvaluateExpressionResult.class, timeout); + } + + FrameEvaluateExpressionHandleResult evaluateExpressionHandle(FrameEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, FrameEvaluateExpressionHandleResult.class, timeout); + } + + void fill(FrameFillParams params, Double timeout) { + owner.sendMessage("fill", params, timeout); + } + + void focus(FrameFocusParams params, Double timeout) { + owner.sendMessage("focus", params, timeout); + } + + FrameFrameElementResult frameElement(FrameFrameElementParams params, Double timeout) { + return owner.sendMessage("frameElement", params, FrameFrameElementResult.class, timeout); + } + + FrameFrameElementResult frameElement(Double timeout) { + return frameElement(new FrameFrameElementParams(), timeout); + } + + FrameResolveSelectorResult resolveSelector(FrameResolveSelectorParams params, Double timeout) { + return owner.sendMessage("resolveSelector", params, FrameResolveSelectorResult.class, timeout); + } + + void highlight(FrameHighlightParams params, Double timeout) { + owner.sendMessage("highlight", params, timeout); + } + + void hideHighlight(FrameHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + FrameGetAttributeResult getAttribute(FrameGetAttributeParams params, Double timeout) { + return owner.sendMessage("getAttribute", params, FrameGetAttributeResult.class, timeout); + } + + FrameGotoResult goto_(FrameGotoParams params, Double timeout) { + return owner.sendMessage("goto", params, FrameGotoResult.class, timeout); + } + + void hover(FrameHoverParams params, Double timeout) { + owner.sendMessage("hover", params, timeout); + } + + FrameInnerHTMLResult innerHTML(FrameInnerHTMLParams params, Double timeout) { + return owner.sendMessage("innerHTML", params, FrameInnerHTMLResult.class, timeout); + } + + FrameInnerTextResult innerText(FrameInnerTextParams params, Double timeout) { + return owner.sendMessage("innerText", params, FrameInnerTextResult.class, timeout); + } + + FrameInputValueResult inputValue(FrameInputValueParams params, Double timeout) { + return owner.sendMessage("inputValue", params, FrameInputValueResult.class, timeout); + } + + FrameIsCheckedResult isChecked(FrameIsCheckedParams params, Double timeout) { + return owner.sendMessage("isChecked", params, FrameIsCheckedResult.class, timeout); + } + + FrameIsDisabledResult isDisabled(FrameIsDisabledParams params, Double timeout) { + return owner.sendMessage("isDisabled", params, FrameIsDisabledResult.class, timeout); + } + + FrameIsEnabledResult isEnabled(FrameIsEnabledParams params, Double timeout) { + return owner.sendMessage("isEnabled", params, FrameIsEnabledResult.class, timeout); + } + + FrameIsHiddenResult isHidden(FrameIsHiddenParams params, Double timeout) { + return owner.sendMessage("isHidden", params, FrameIsHiddenResult.class, timeout); + } + + FrameIsVisibleResult isVisible(FrameIsVisibleParams params, Double timeout) { + return owner.sendMessage("isVisible", params, FrameIsVisibleResult.class, timeout); + } + + FrameIsEditableResult isEditable(FrameIsEditableParams params, Double timeout) { + return owner.sendMessage("isEditable", params, FrameIsEditableResult.class, timeout); + } + + void press(FramePressParams params, Double timeout) { + owner.sendMessage("press", params, timeout); + } + + FrameQuerySelectorResult querySelector(FrameQuerySelectorParams params, Double timeout) { + return owner.sendMessage("querySelector", params, FrameQuerySelectorResult.class, timeout); + } + + FrameQuerySelectorAllResult querySelectorAll(FrameQuerySelectorAllParams params, Double timeout) { + return owner.sendMessage("querySelectorAll", params, FrameQuerySelectorAllResult.class, timeout); + } + + FrameQueryCountResult queryCount(FrameQueryCountParams params, Double timeout) { + return owner.sendMessage("queryCount", params, FrameQueryCountResult.class, timeout); + } + + FrameSelectOptionResult selectOption(FrameSelectOptionParams params, Double timeout) { + return owner.sendMessage("selectOption", params, FrameSelectOptionResult.class, timeout); + } + + void setContent(FrameSetContentParams params, Double timeout) { + owner.sendMessage("setContent", params, timeout); + } + + void setInputFiles(FrameSetInputFilesParams params, Double timeout) { + owner.sendMessage("setInputFiles", params, timeout); + } + + void tap(FrameTapParams params, Double timeout) { + owner.sendMessage("tap", params, timeout); + } + + FrameTextContentResult textContent(FrameTextContentParams params, Double timeout) { + return owner.sendMessage("textContent", params, FrameTextContentResult.class, timeout); + } + + FrameTitleResult title(FrameTitleParams params, Double timeout) { + return owner.sendMessage("title", params, FrameTitleResult.class, timeout); + } + + FrameTitleResult title(Double timeout) { + return title(new FrameTitleParams(), timeout); + } + + void type(FrameTypeParams params, Double timeout) { + owner.sendMessage("type", params, timeout); + } + + void uncheck(FrameUncheckParams params, Double timeout) { + owner.sendMessage("uncheck", params, timeout); + } + + void waitForTimeout(FrameWaitForTimeoutParams params, Double timeout) { + owner.sendMessage("waitForTimeout", params, timeout); + } + + FrameWaitForFunctionResult waitForFunction(FrameWaitForFunctionParams params, Double timeout) { + return owner.sendMessage("waitForFunction", params, FrameWaitForFunctionResult.class, timeout); + } + + FrameWaitForSelectorResult waitForSelector(FrameWaitForSelectorParams params, Double timeout) { + return owner.sendMessage("waitForSelector", params, FrameWaitForSelectorResult.class, timeout); + } + + void expect(FrameExpectParams params, Double timeout) { + owner.sendMessage("expect", params, timeout); + } + + FrameWebmcpToolsResult webmcpTools(FrameWebmcpToolsParams params, Double timeout) { + return owner.sendMessage("webmcpTools", params, FrameWebmcpToolsResult.class, timeout); + } + + FrameWebmcpToolsResult webmcpTools(Double timeout) { + return webmcpTools(new FrameWebmcpToolsParams(), timeout); + } + + FrameWebmcpCallToolResult webmcpCallTool(FrameWebmcpCallToolParams params, Double timeout) { + return owner.sendMessage("webmcpCallTool", params, FrameWebmcpCallToolResult.class, timeout); + } +} + +class FrameInitializer { + String url; + String name; + FrameImpl parentFrame; + List loadStates; +} + +class FrameEvalOnSelectorParams { + String selector; + Boolean strict; + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class FrameEvalOnSelectorResult { + SerializedValue value; +} + +class FrameEvalOnSelectorAllParams { + String selector; + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class FrameEvalOnSelectorAllResult { + SerializedValue value; +} + +class FrameAddScriptTagParams { + String url; + String content; + String type; +} + +class FrameAddScriptTagResult { + ElementHandleImpl element; +} + +class FrameAddStyleTagParams { + String url; + String content; +} + +class FrameAddStyleTagResult { + ElementHandleImpl element; +} + +class FrameAriaSnapshotParams { + String mode; + String selector; + Integer depth; + Boolean boxes; +} + +class FrameAriaSnapshotResult { + String snapshot; +} + +class FrameAriaSnapshotJSONParams { + String mode; + String selector; + Integer depth; + Boolean boxes; +} + +class FrameAriaSnapshotJSONResult { + JsonElement snapshot; +} + +class FrameBlurParams { + String selector; + Boolean strict; +} + +class FrameCheckParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + Point position; + Boolean trial; +} + +class FrameClickParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + Boolean noWaitAfter; + List modifiers; + Point position; + Double delay; + String button; + Integer clickCount; + Boolean trial; + Integer steps; +} + +class FrameContentParams { + Boolean includeShadow; +} + +class FrameContentResult { + String value; +} + +class FrameDragAndDropParams { + String source; + String target; + Boolean force; + String scroll; + Boolean trial; + Point sourcePosition; + Point targetPosition; + Boolean strict; + Integer steps; +} + +class FrameDropParams { + String selector; + Boolean strict; + Point position; + List payloads; + List localPaths; + List streams; + List data; + + static class FrameDropParamsPayloads { + String name; + String mimeType; + byte[] buffer; + } + + static class FrameDropParamsData { + String mimeType; + String value; + } +} + +class FrameDblclickParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + List modifiers; + Point position; + Double delay; + String button; + Boolean trial; + Integer steps; +} + +class FrameDispatchEventParams { + String selector; + Boolean strict; + String type; + SerializedArgument eventInit; +} + +class FrameEvaluateExpressionParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class FrameEvaluateExpressionResult { + SerializedValue value; +} + +class FrameEvaluateExpressionHandleParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class FrameEvaluateExpressionHandleResult { + JSHandleImpl handle; +} + +class FrameFillParams { + String selector; + Boolean strict; + String value; + Boolean force; +} + +class FrameFocusParams { + String selector; + Boolean strict; +} + +class FrameFrameElementParams { +} + +class FrameFrameElementResult { + ElementHandleImpl element; +} + +class FrameResolveSelectorParams { + String selector; + String sdkLanguage; +} + +class FrameResolveSelectorResult { + String resolvedSelector; + String locatorCode; +} + +class FrameHighlightParams { + String selector; + String style; +} + +class FrameHideHighlightParams { + String selector; +} + +class FrameGetAttributeParams { + String selector; + Boolean strict; + String name; +} + +class FrameGetAttributeResult { + String value; +} + +class FrameGotoParams { + String url; + String waitUntil; + String referer; +} + +class FrameGotoResult { + ResponseImpl response; +} + +class FrameHoverParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + List modifiers; + Point position; + Boolean trial; +} + +class FrameInnerHTMLParams { + String selector; + Boolean strict; +} + +class FrameInnerHTMLResult { + String value; +} + +class FrameInnerTextParams { + String selector; + Boolean strict; +} + +class FrameInnerTextResult { + String value; +} + +class FrameInputValueParams { + String selector; + Boolean strict; +} + +class FrameInputValueResult { + String value; +} + +class FrameIsCheckedParams { + String selector; + Boolean strict; +} + +class FrameIsCheckedResult { + Boolean value; +} + +class FrameIsDisabledParams { + String selector; + Boolean strict; +} + +class FrameIsDisabledResult { + Boolean value; +} + +class FrameIsEnabledParams { + String selector; + Boolean strict; +} + +class FrameIsEnabledResult { + Boolean value; +} + +class FrameIsHiddenParams { + String selector; + Boolean strict; +} + +class FrameIsHiddenResult { + Boolean value; +} + +class FrameIsVisibleParams { + String selector; + Boolean strict; +} + +class FrameIsVisibleResult { + Boolean value; +} + +class FrameIsEditableParams { + String selector; + Boolean strict; +} + +class FrameIsEditableResult { + Boolean value; +} + +class FramePressParams { + String selector; + Boolean strict; + String key; + Double delay; + Boolean noWaitAfter; +} + +class FrameQuerySelectorParams { + String selector; + Boolean strict; +} + +class FrameQuerySelectorResult { + ElementHandleImpl element; +} + +class FrameQuerySelectorAllParams { + String selector; +} + +class FrameQuerySelectorAllResult { + List elements; +} + +class FrameQueryCountParams { + String selector; +} + +class FrameQueryCountResult { + Integer value; +} + +class FrameSelectOptionParams { + String selector; + Boolean strict; + List elements; + List options; + Boolean force; + + static class FrameSelectOptionParamsOptions { + String valueOrLabel; + String value; + String label; + Integer index; + } +} + +class FrameSelectOptionResult { + List values; +} + +class FrameSetContentParams { + String html; + String waitUntil; +} + +class FrameSetInputFilesParams { + String selector; + Boolean strict; + List payloads; + String localDirectory; + WritableStream directoryStream; + List localPaths; + List streams; + + static class FrameSetInputFilesParamsPayloads { + String name; + String mimeType; + byte[] buffer; + } +} + +class FrameTapParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + List modifiers; + Point position; + Boolean trial; +} + +class FrameTextContentParams { + String selector; + Boolean strict; +} + +class FrameTextContentResult { + String value; +} + +class FrameTitleParams { +} + +class FrameTitleResult { + String value; +} + +class FrameTypeParams { + String selector; + Boolean strict; + String text; + Double delay; +} + +class FrameUncheckParams { + String selector; + Boolean strict; + Boolean force; + String scroll; + Point position; + Boolean trial; +} + +class FrameWaitForTimeoutParams { + Double waitTimeout; +} + +class FrameWaitForFunctionParams { + String expression; + Boolean isFunction; + SerializedArgument arg; + Double pollingInterval; + String selector; + Boolean strict; +} + +class FrameWaitForFunctionResult { + JSHandleImpl handle; +} + +class FrameWaitForSelectorParams { + String selector; + Boolean strict; + String state; + Boolean omitReturnValue; +} + +class FrameWaitForSelectorResult { + ElementHandleImpl element; +} + +class FrameExpectParams { + String selector; + String expression; + JsonElement expressionArg; + String pseudo; + List expectedText; + Double expectedNumber; + SerializedArgument expectedValue; + Boolean useInnerText; + Boolean isNot; +} + +class FrameExpectErrorDetails { + FrameExpectErrorDetailsReceived received; + Boolean timedOut; + String customErrorMessage; + + static class FrameExpectErrorDetailsReceived { + SerializedValue value; + String ariaSnapshot; + } +} + +class FrameWebmcpToolsParams { +} + +class FrameWebmcpToolsResult { + List tools; + + static class FrameWebmcpToolsResultTools { + String name; + String description; + JsonElement inputSchema; + FrameWebmcpToolsResultToolsAnnotations annotations; + + static class FrameWebmcpToolsResultToolsAnnotations { + Boolean readOnly; + Boolean untrustedContent; + Boolean consequential; + } + } +} + +class FrameWebmcpCallToolParams { + String name; + SerializedArgument input; +} + +class FrameWebmcpCallToolResult { + SerializedValue result; +} + +class FrameLoadstateEvent { + String add; + String remove; +} + +class FrameNavigatedEvent { + String url; + String name; + FrameNavigatedEventNewDocument newDocument; + String error; + + static class FrameNavigatedEventNewDocument { + RequestImpl request; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java new file mode 100644 index 000000000..031a38eb6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class JSHandleChannel { + private final ChannelOwner owner; + + JSHandleChannel(ChannelOwner owner) { + this.owner = owner; + } + + void dispose(JSHandleDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + void dispose(Double timeout) { + dispose(new JSHandleDisposeParams(), timeout); + } + + JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); + } + + JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); + } + + JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { + return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); + } + + JSHandleGetPropertyListResult getPropertyList(Double timeout) { + return getPropertyList(new JSHandleGetPropertyListParams(), timeout); + } + + JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { + return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); + } + + JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { + return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); + } + + JSHandleJsonValueResult jsonValue(Double timeout) { + return jsonValue(new JSHandleJsonValueParams(), timeout); + } +} + +class JSHandleInitializer { + String preview; +} + +class JSHandleDisposeParams { +} + +class JSHandleEvaluateExpressionParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class JSHandleEvaluateExpressionResult { + SerializedValue value; +} + +class JSHandleEvaluateExpressionHandleParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class JSHandleEvaluateExpressionHandleResult { + JSHandleImpl handle; +} + +class JSHandleGetPropertyListParams { +} + +class JSHandleGetPropertyListResult { + List properties; + + static class JSHandleGetPropertyListResultProperties { + String name; + JSHandleImpl value; + } +} + +class JSHandleGetPropertyParams { + String name; +} + +class JSHandleGetPropertyResult { + JSHandleImpl handle; +} + +class JSHandleJsonValueParams { +} + +class JSHandleJsonValueResult { + SerializedValue value; +} + +class JSHandlePreviewUpdatedEvent { + String preview; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java new file mode 100644 index 000000000..5cad7bf75 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; + +class JsonPipeChannel { + private final ChannelOwner owner; + + JsonPipeChannel(ChannelOwner owner) { + this.owner = owner; + } + + void send(JsonPipeSendParams params, Double timeout) { + owner.sendMessage("send", params, timeout); + } + + void close(JsonPipeCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + void close(Double timeout) { + close(new JsonPipeCloseParams(), timeout); + } +} + +class JsonPipeInitializer { +} + +class JsonPipeSendParams { + JsonElement message; +} + +class JsonPipeCloseParams { +} + +class JsonPipeMessageEvent { + JsonElement message; +} + +class JsonPipeClosedEvent { + String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java new file mode 100644 index 000000000..b92038a60 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class LocalUtilsChannel { + private final ChannelOwner owner; + + LocalUtilsChannel(ChannelOwner owner) { + this.owner = owner; + } + + void zip(LocalUtilsZipParams params, Double timeout) { + owner.sendMessage("zip", params, timeout); + } + + LocalUtilsHarOpenResult harOpen(LocalUtilsHarOpenParams params, Double timeout) { + return owner.sendMessage("harOpen", params, LocalUtilsHarOpenResult.class, timeout); + } + + LocalUtilsHarLookupResult harLookup(LocalUtilsHarLookupParams params, Double timeout) { + return owner.sendMessage("harLookup", params, LocalUtilsHarLookupResult.class, timeout); + } + + void harClose(LocalUtilsHarCloseParams params, Double timeout) { + owner.sendMessage("harClose", params, timeout); + } + + void harUnzip(LocalUtilsHarUnzipParams params, Double timeout) { + owner.sendMessage("harUnzip", params, timeout); + } + + LocalUtilsConnectResult connect(LocalUtilsConnectParams params, Double timeout) { + return owner.sendMessage("connect", params, LocalUtilsConnectResult.class, timeout); + } + + LocalUtilsTracingStartedResult tracingStarted(LocalUtilsTracingStartedParams params, Double timeout) { + return owner.sendMessage("tracingStarted", params, LocalUtilsTracingStartedResult.class, timeout); + } + + void addStackToTracingNoReply(LocalUtilsAddStackToTracingNoReplyParams params, Double timeout) { + owner.sendMessage("addStackToTracingNoReply", params, timeout); + } + + void traceDiscarded(LocalUtilsTraceDiscardedParams params, Double timeout) { + owner.sendMessage("traceDiscarded", params, timeout); + } + + LocalUtilsGlobToRegexResult globToRegex(LocalUtilsGlobToRegexParams params, Double timeout) { + return owner.sendMessage("globToRegex", params, LocalUtilsGlobToRegexResult.class, timeout); + } + + LocalUtilsAsLocatorDescriptionResult asLocatorDescription(LocalUtilsAsLocatorDescriptionParams params, Double timeout) { + return owner.sendMessage("asLocatorDescription", params, LocalUtilsAsLocatorDescriptionResult.class, timeout); + } +} + +class LocalUtilsInitializer { + List deviceDescriptors; + + static class LocalUtilsInitializerDeviceDescriptors { + String name; + LocalUtilsInitializerDeviceDescriptorsDescriptor descriptor; + + static class LocalUtilsInitializerDeviceDescriptorsDescriptor { + String userAgent; + LocalUtilsInitializerDeviceDescriptorsDescriptorViewport viewport; + LocalUtilsInitializerDeviceDescriptorsDescriptorScreen screen; + Double deviceScaleFactor; + Boolean isMobile; + Boolean hasTouch; + String defaultBrowserType; + + static class LocalUtilsInitializerDeviceDescriptorsDescriptorViewport { + Integer width; + Integer height; + } + + static class LocalUtilsInitializerDeviceDescriptorsDescriptorScreen { + Integer width; + Integer height; + } + } + } +} + +class LocalUtilsZipParams { + String zipFile; + List entries; + String stacksId; + String mode; + Boolean includeSources; + List additionalSources; +} + +class LocalUtilsHarOpenParams { + String file; +} + +class LocalUtilsHarOpenResult { + String harId; + String error; +} + +class LocalUtilsHarLookupParams { + String harId; + String url; + String method; + List headers; + byte[] postData; + Boolean isNavigationRequest; +} + +class LocalUtilsHarLookupResult { + String action; + String message; + String redirectURL; + Integer status; + List headers; + byte[] body; +} + +class LocalUtilsHarCloseParams { + String harId; +} + +class LocalUtilsHarUnzipParams { + String zipFile; + String harFile; + String resourcesDir; +} + +class LocalUtilsConnectParams { + String endpoint; + JsonElement headers; + String exposeNetwork; + Double slowMo; + Integer socksProxyRedirectPortForTest; +} + +class LocalUtilsConnectResult { + JsonPipe pipe; + List headers; +} + +class LocalUtilsTracingStartedParams { + String tracesDir; + String traceName; + Boolean live; +} + +class LocalUtilsTracingStartedResult { + String stacksId; +} + +class LocalUtilsAddStackToTracingNoReplyParams { + ClientSideCallMetadata callData; +} + +class LocalUtilsTraceDiscardedParams { + String stacksId; +} + +class LocalUtilsGlobToRegexParams { + String glob; + String baseURL; + Boolean webSocketUrl; +} + +class LocalUtilsGlobToRegexResult { + String regex; +} + +class LocalUtilsAsLocatorDescriptionParams { + String selector; + String sdkLanguage; +} + +class LocalUtilsAsLocatorDescriptionResult { + String description; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java new file mode 100644 index 000000000..29d335cb2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java @@ -0,0 +1,875 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class PageChannel { + private final ChannelOwner owner; + + PageChannel(ChannelOwner owner) { + this.owner = owner; + } + + PageAddInitScriptResult addInitScript(PageAddInitScriptParams params, Double timeout) { + return owner.sendMessage("addInitScript", params, PageAddInitScriptResult.class, timeout); + } + + void close(PageCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + void runBeforeUnload(PageRunBeforeUnloadParams params, Double timeout) { + owner.sendMessage("runBeforeUnload", params, timeout); + } + + void runBeforeUnload(Double timeout) { + runBeforeUnload(new PageRunBeforeUnloadParams(), timeout); + } + + void clearConsoleMessages(PageClearConsoleMessagesParams params, Double timeout) { + owner.sendMessage("clearConsoleMessages", params, timeout); + } + + void clearConsoleMessages(Double timeout) { + clearConsoleMessages(new PageClearConsoleMessagesParams(), timeout); + } + + PageConsoleMessagesResult consoleMessages(PageConsoleMessagesParams params, Double timeout) { + return owner.sendMessage("consoleMessages", params, PageConsoleMessagesResult.class, timeout); + } + + void emulateMedia(PageEmulateMediaParams params, Double timeout) { + owner.sendMessage("emulateMedia", params, timeout); + } + + PageExposeBindingResult exposeBinding(PageExposeBindingParams params, Double timeout) { + return owner.sendMessage("exposeBinding", params, PageExposeBindingResult.class, timeout); + } + + PageGoBackResult goBack(PageGoBackParams params, Double timeout) { + return owner.sendMessage("goBack", params, PageGoBackResult.class, timeout); + } + + PageGoForwardResult goForward(PageGoForwardParams params, Double timeout) { + return owner.sendMessage("goForward", params, PageGoForwardResult.class, timeout); + } + + void requestGC(PageRequestGCParams params, Double timeout) { + owner.sendMessage("requestGC", params, timeout); + } + + void requestGC(Double timeout) { + requestGC(new PageRequestGCParams(), timeout); + } + + PageRegisterLocatorHandlerResult registerLocatorHandler(PageRegisterLocatorHandlerParams params, Double timeout) { + return owner.sendMessage("registerLocatorHandler", params, PageRegisterLocatorHandlerResult.class, timeout); + } + + void resolveLocatorHandlerNoReply(PageResolveLocatorHandlerNoReplyParams params, Double timeout) { + owner.sendMessage("resolveLocatorHandlerNoReply", params, timeout); + } + + void unregisterLocatorHandler(PageUnregisterLocatorHandlerParams params, Double timeout) { + owner.sendMessage("unregisterLocatorHandler", params, timeout); + } + + PageReloadResult reload(PageReloadParams params, Double timeout) { + return owner.sendMessage("reload", params, PageReloadResult.class, timeout); + } + + PageExpectScreenshotResult expectScreenshot(PageExpectScreenshotParams params, Double timeout) { + return owner.sendMessage("expectScreenshot", params, PageExpectScreenshotResult.class, timeout); + } + + PageScreenshotResult screenshot(PageScreenshotParams params, Double timeout) { + return owner.sendMessage("screenshot", params, PageScreenshotResult.class, timeout); + } + + void setExtraHTTPHeaders(PageSetExtraHTTPHeadersParams params, Double timeout) { + owner.sendMessage("setExtraHTTPHeaders", params, timeout); + } + + void setNetworkInterceptionPatterns(PageSetNetworkInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); + } + + void setWebSocketInterceptionPatterns(PageSetWebSocketInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); + } + + void setViewportSize(PageSetViewportSizeParams params, Double timeout) { + owner.sendMessage("setViewportSize", params, timeout); + } + + void keyboardDown(PageKeyboardDownParams params, Double timeout) { + owner.sendMessage("keyboardDown", params, timeout); + } + + void keyboardUp(PageKeyboardUpParams params, Double timeout) { + owner.sendMessage("keyboardUp", params, timeout); + } + + void keyboardInsertText(PageKeyboardInsertTextParams params, Double timeout) { + owner.sendMessage("keyboardInsertText", params, timeout); + } + + void keyboardType(PageKeyboardTypeParams params, Double timeout) { + owner.sendMessage("keyboardType", params, timeout); + } + + void keyboardPress(PageKeyboardPressParams params, Double timeout) { + owner.sendMessage("keyboardPress", params, timeout); + } + + void mouseMove(PageMouseMoveParams params, Double timeout) { + owner.sendMessage("mouseMove", params, timeout); + } + + void mouseDown(PageMouseDownParams params, Double timeout) { + owner.sendMessage("mouseDown", params, timeout); + } + + void mouseUp(PageMouseUpParams params, Double timeout) { + owner.sendMessage("mouseUp", params, timeout); + } + + void mouseClick(PageMouseClickParams params, Double timeout) { + owner.sendMessage("mouseClick", params, timeout); + } + + void mouseWheel(PageMouseWheelParams params, Double timeout) { + owner.sendMessage("mouseWheel", params, timeout); + } + + void touchscreenTap(PageTouchscreenTapParams params, Double timeout) { + owner.sendMessage("touchscreenTap", params, timeout); + } + + void clearPageErrors(PageClearPageErrorsParams params, Double timeout) { + owner.sendMessage("clearPageErrors", params, timeout); + } + + void clearPageErrors(Double timeout) { + clearPageErrors(new PageClearPageErrorsParams(), timeout); + } + + PagePageErrorsResult pageErrors(PagePageErrorsParams params, Double timeout) { + return owner.sendMessage("pageErrors", params, PagePageErrorsResult.class, timeout); + } + + PagePdfResult pdf(PagePdfParams params, Double timeout) { + return owner.sendMessage("pdf", params, PagePdfResult.class, timeout); + } + + PageRequestsResult requests(PageRequestsParams params, Double timeout) { + return owner.sendMessage("requests", params, PageRequestsResult.class, timeout); + } + + PageRequestsResult requests(Double timeout) { + return requests(new PageRequestsParams(), timeout); + } + + void startJSCoverage(PageStartJSCoverageParams params, Double timeout) { + owner.sendMessage("startJSCoverage", params, timeout); + } + + PageStopJSCoverageResult stopJSCoverage(PageStopJSCoverageParams params, Double timeout) { + return owner.sendMessage("stopJSCoverage", params, PageStopJSCoverageResult.class, timeout); + } + + PageStopJSCoverageResult stopJSCoverage(Double timeout) { + return stopJSCoverage(new PageStopJSCoverageParams(), timeout); + } + + void startCSSCoverage(PageStartCSSCoverageParams params, Double timeout) { + owner.sendMessage("startCSSCoverage", params, timeout); + } + + PageStopCSSCoverageResult stopCSSCoverage(PageStopCSSCoverageParams params, Double timeout) { + return owner.sendMessage("stopCSSCoverage", params, PageStopCSSCoverageResult.class, timeout); + } + + PageStopCSSCoverageResult stopCSSCoverage(Double timeout) { + return stopCSSCoverage(new PageStopCSSCoverageParams(), timeout); + } + + void bringToFront(PageBringToFrontParams params, Double timeout) { + owner.sendMessage("bringToFront", params, timeout); + } + + void bringToFront(Double timeout) { + bringToFront(new PageBringToFrontParams(), timeout); + } + + PagePickLocatorResult pickLocator(PagePickLocatorParams params, Double timeout) { + return owner.sendMessage("pickLocator", params, PagePickLocatorResult.class, timeout); + } + + PagePickLocatorResult pickLocator(Double timeout) { + return pickLocator(new PagePickLocatorParams(), timeout); + } + + void cancelPickLocator(PageCancelPickLocatorParams params, Double timeout) { + owner.sendMessage("cancelPickLocator", params, timeout); + } + + void cancelPickLocator(Double timeout) { + cancelPickLocator(new PageCancelPickLocatorParams(), timeout); + } + + void hideHighlight(PageHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + void hideHighlight(Double timeout) { + hideHighlight(new PageHideHighlightParams(), timeout); + } + + PageScreencastShowOverlayResult screencastShowOverlay(PageScreencastShowOverlayParams params, Double timeout) { + return owner.sendMessage("screencastShowOverlay", params, PageScreencastShowOverlayResult.class, timeout); + } + + void screencastRemoveOverlay(PageScreencastRemoveOverlayParams params, Double timeout) { + owner.sendMessage("screencastRemoveOverlay", params, timeout); + } + + void screencastChapter(PageScreencastChapterParams params, Double timeout) { + owner.sendMessage("screencastChapter", params, timeout); + } + + void screencastSetOverlayVisible(PageScreencastSetOverlayVisibleParams params, Double timeout) { + owner.sendMessage("screencastSetOverlayVisible", params, timeout); + } + + void screencastShowActions(PageScreencastShowActionsParams params, Double timeout) { + owner.sendMessage("screencastShowActions", params, timeout); + } + + void screencastHideActions(PageScreencastHideActionsParams params, Double timeout) { + owner.sendMessage("screencastHideActions", params, timeout); + } + + void screencastHideActions(Double timeout) { + screencastHideActions(new PageScreencastHideActionsParams(), timeout); + } + + PageScreencastStartResult screencastStart(PageScreencastStartParams params, Double timeout) { + return owner.sendMessage("screencastStart", params, PageScreencastStartResult.class, timeout); + } + + void screencastFrameAck(PageScreencastFrameAckParams params, Double timeout) { + owner.sendMessage("screencastFrameAck", params, timeout); + } + + void screencastStop(PageScreencastStopParams params, Double timeout) { + owner.sendMessage("screencastStop", params, timeout); + } + + void screencastStop(Double timeout) { + screencastStop(new PageScreencastStopParams(), timeout); + } + + void updateSubscription(PageUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } + + void setDockTile(PageSetDockTileParams params, Double timeout) { + owner.sendMessage("setDockTile", params, timeout); + } + + PageWebStorageItemsResult webStorageItems(PageWebStorageItemsParams params, Double timeout) { + return owner.sendMessage("webStorageItems", params, PageWebStorageItemsResult.class, timeout); + } + + PageWebStorageGetItemResult webStorageGetItem(PageWebStorageGetItemParams params, Double timeout) { + return owner.sendMessage("webStorageGetItem", params, PageWebStorageGetItemResult.class, timeout); + } + + void webStorageSetItem(PageWebStorageSetItemParams params, Double timeout) { + owner.sendMessage("webStorageSetItem", params, timeout); + } + + void webStorageRemoveItem(PageWebStorageRemoveItemParams params, Double timeout) { + owner.sendMessage("webStorageRemoveItem", params, timeout); + } + + void webStorageClear(PageWebStorageClearParams params, Double timeout) { + owner.sendMessage("webStorageClear", params, timeout); + } +} + +class PageInitializer { + FrameImpl mainFrame; + PageInitializerViewportSize viewportSize; + Boolean isClosed; + PageImpl opener; + ArtifactImpl video; + + static class PageInitializerViewportSize { + Integer width; + Integer height; + } +} + +class PageAddInitScriptParams { + String source; +} + +class PageAddInitScriptResult { + DisposableObject disposable; +} + +class PageCloseParams { + String reason; +} + +class PageRunBeforeUnloadParams { +} + +class PageClearConsoleMessagesParams { +} + +class PageConsoleMessagesParams { + String filter; +} + +class PageConsoleMessagesResult { + List messages; + + static class PageConsoleMessagesResultMessages { + String type; + String text; + List args; + PageConsoleMessagesResultMessagesLocation location; + Double timestamp; + + static class PageConsoleMessagesResultMessagesLocation { + String url; + Integer lineNumber; + Integer columnNumber; + } + } +} + +class PageEmulateMediaParams { + String media; + String colorScheme; + String reducedMotion; + String forcedColors; + String contrast; +} + +class PageExposeBindingParams { + String name; + Boolean noGlobal; +} + +class PageExposeBindingResult { + DisposableObject disposable; +} + +class PageGoBackParams { + String waitUntil; +} + +class PageGoBackResult { + ResponseImpl response; +} + +class PageGoForwardParams { + String waitUntil; +} + +class PageGoForwardResult { + ResponseImpl response; +} + +class PageRequestGCParams { +} + +class PageRegisterLocatorHandlerParams { + String selector; + Boolean noWaitAfter; +} + +class PageRegisterLocatorHandlerResult { + Integer uid; +} + +class PageResolveLocatorHandlerNoReplyParams { + Integer uid; + Boolean remove; +} + +class PageUnregisterLocatorHandlerParams { + Integer uid; +} + +class PageReloadParams { + String waitUntil; +} + +class PageReloadResult { + ResponseImpl response; +} + +class PageExpectScreenshotParams { + byte[] expected; + Boolean isNot; + PageExpectScreenshotParamsLocator locator; + String comparator; + Integer maxDiffPixels; + Double maxDiffPixelRatio; + Double threshold; + Boolean fullPage; + Rect clip; + String type; + Boolean omitBackground; + String caret; + String animations; + String scale; + List mask; + String maskColor; + String style; + + static class PageExpectScreenshotParamsLocator { + FrameImpl frame; + String selector; + } + + static class PageExpectScreenshotParamsMask { + FrameImpl frame; + String selector; + } +} + +class PageExpectScreenshotResult { + byte[] actual; +} + +class PageExpectScreenshotErrorDetails { + byte[] diff; + String customErrorMessage; + byte[] actual; + byte[] previous; + Boolean timedOut; + List log; +} + +class PageScreenshotParams { + String type; + Integer quality; + Boolean fullPage; + Rect clip; + Boolean omitBackground; + String caret; + String animations; + String scale; + List mask; + String maskColor; + String style; + + static class PageScreenshotParamsMask { + FrameImpl frame; + String selector; + } +} + +class PageScreenshotResult { + byte[] binary; +} + +class PageSetExtraHTTPHeadersParams { + List headers; +} + +class PageSetNetworkInterceptionPatternsParams { + List patterns; + + static class PageSetNetworkInterceptionPatternsParamsPatterns { + String glob; + String regexSource; + String regexFlags; + URLPattern urlPattern; + } +} + +class PageSetWebSocketInterceptionPatternsParams { + List patterns; + + static class PageSetWebSocketInterceptionPatternsParamsPatterns { + String glob; + String regexSource; + String regexFlags; + URLPattern urlPattern; + } +} + +class PageSetViewportSizeParams { + PageSetViewportSizeParamsViewportSize viewportSize; + + static class PageSetViewportSizeParamsViewportSize { + Integer width; + Integer height; + } +} + +class PageKeyboardDownParams { + String key; +} + +class PageKeyboardUpParams { + String key; +} + +class PageKeyboardInsertTextParams { + String text; +} + +class PageKeyboardTypeParams { + String text; + Double delay; +} + +class PageKeyboardPressParams { + String key; + Double delay; +} + +class PageMouseMoveParams { + Double x; + Double y; + Integer steps; +} + +class PageMouseDownParams { + String button; + Integer clickCount; +} + +class PageMouseUpParams { + String button; + Integer clickCount; +} + +class PageMouseClickParams { + Double x; + Double y; + Double delay; + String button; + Integer clickCount; +} + +class PageMouseWheelParams { + Double deltaX; + Double deltaY; +} + +class PageTouchscreenTapParams { + Double x; + Double y; +} + +class PageClearPageErrorsParams { +} + +class PagePageErrorsParams { + String filter; +} + +class PagePageErrorsResult { + List errors; +} + +class PagePdfParams { + Double scale; + Boolean displayHeaderFooter; + String headerTemplate; + String footerTemplate; + Boolean printBackground; + Boolean landscape; + String pageRanges; + String format; + String width; + String height; + Boolean preferCSSPageSize; + PagePdfParamsMargin margin; + Boolean tagged; + Boolean outline; + + static class PagePdfParamsMargin { + String top; + String bottom; + String left; + String right; + } +} + +class PagePdfResult { + byte[] pdf; +} + +class PageRequestsParams { +} + +class PageRequestsResult { + List requests; +} + +class PageStartJSCoverageParams { + Boolean resetOnNavigation; + Boolean reportAnonymousScripts; +} + +class PageStopJSCoverageParams { +} + +class PageStopJSCoverageResult { + List entries; + + static class PageStopJSCoverageResultEntries { + String url; + String scriptId; + String source; + List functions; + + static class PageStopJSCoverageResultEntriesFunctions { + String functionName; + Boolean isBlockCoverage; + List ranges; + + static class PageStopJSCoverageResultEntriesFunctionsRanges { + Integer startOffset; + Integer endOffset; + Integer count; + } + } + } +} + +class PageStartCSSCoverageParams { + Boolean resetOnNavigation; +} + +class PageStopCSSCoverageParams { +} + +class PageStopCSSCoverageResult { + List entries; + + static class PageStopCSSCoverageResultEntries { + String url; + String text; + List ranges; + + static class PageStopCSSCoverageResultEntriesRanges { + Integer start; + Integer end; + } + } +} + +class PageBringToFrontParams { +} + +class PagePickLocatorParams { +} + +class PagePickLocatorResult { + String selector; +} + +class PageCancelPickLocatorParams { +} + +class PageHideHighlightParams { +} + +class PageScreencastShowOverlayParams { + String html; + Double duration; +} + +class PageScreencastShowOverlayResult { + String id; +} + +class PageScreencastRemoveOverlayParams { + String id; +} + +class PageScreencastChapterParams { + String title; + String description; + Double duration; +} + +class PageScreencastSetOverlayVisibleParams { + Boolean visible; +} + +class PageScreencastShowActionsParams { + Double duration; + String position; + Integer fontSize; + String cursor; + PageScreencastShowActionsParamsStyle style; + + static class PageScreencastShowActionsParamsStyle { + String point; + String highlight; + String title; + } +} + +class PageScreencastHideActionsParams { +} + +class PageScreencastStartParams { + PageScreencastStartParamsSize size; + Integer quality; + Integer fps; + Boolean sendFrames; + Boolean record; + + static class PageScreencastStartParamsSize { + Integer width; + Integer height; + } +} + +class PageScreencastStartResult { + ArtifactImpl artifact; +} + +class PageScreencastFrameAckParams { + Integer frameId; +} + +class PageScreencastStopParams { +} + +class PageUpdateSubscriptionParams { + String event; + Boolean enabled; +} + +class PageSetDockTileParams { + byte[] image; +} + +class PageWebStorageItemsParams { + String kind; +} + +class PageWebStorageItemsResult { + List items; +} + +class PageWebStorageGetItemParams { + String kind; + String name; +} + +class PageWebStorageGetItemResult { + String value; +} + +class PageWebStorageSetItemParams { + String kind; + String name; + String value; +} + +class PageWebStorageRemoveItemParams { + String kind; + String name; +} + +class PageWebStorageClearParams { + String kind; +} + +class PageBindingCallEvent { + BindingCall binding; +} + +class PageCloseEvent { +} + +class PageCrashEvent { +} + +class PageDownloadEvent { + String url; + String suggestedFilename; + ArtifactImpl artifact; +} + +class PageViewportSizeChangedEvent { + PageViewportSizeChangedEventViewportSize viewportSize; + + static class PageViewportSizeChangedEventViewportSize { + Integer width; + Integer height; + } +} + +class PageFileChooserEvent { + ElementHandleImpl element; + Boolean isMultiple; +} + +class PageFrameAttachedEvent { + FrameImpl frame; +} + +class PageFrameDetachedEvent { + FrameImpl frame; +} + +class PageLocatorHandlerTriggeredEvent { + Integer uid; +} + +class PageRouteEvent { + RouteImpl route; +} + +class PageScreencastFrameEvent { + Integer frameId; + byte[] data; + Double timestamp; + Integer viewportWidth; + Integer viewportHeight; +} + +class PageWebSocketRouteEvent { + WebSocketRouteImpl webSocketRoute; +} + +class PageWebSocketEvent { + WebSocketImpl webSocket; +} + +class PageWorkerEvent { + WorkerImpl worker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java new file mode 100644 index 000000000..36cd31c13 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class PlaywrightChannel { + private final ChannelOwner owner; + + PlaywrightChannel(ChannelOwner owner) { + this.owner = owner; + } + + PlaywrightNewRequestResult newRequest(PlaywrightNewRequestParams params, Double timeout) { + return owner.sendMessage("newRequest", params, PlaywrightNewRequestResult.class, timeout); + } +} + +class PlaywrightInitializer { + BrowserTypeImpl chromium; + BrowserTypeImpl firefox; + BrowserTypeImpl webkit; + LocalUtils utils; + BrowserImpl preLaunchedBrowser; +} + +class PlaywrightNewRequestParams { + String baseURL; + String userAgent; + Boolean ignoreHTTPSErrors; + List extraHTTPHeaders; + Boolean failOnStatusCode; + List clientCertificates; + Integer maxRedirects; + List httpCredentials; + PlaywrightNewRequestParamsProxy proxy; + PlaywrightNewRequestParamsStorageState storageState; + String tracesDir; + + static class PlaywrightNewRequestParamsClientCertificates { + String origin; + byte[] cert; + byte[] key; + String passphrase; + byte[] pfx; + } + + static class PlaywrightNewRequestParamsProxy { + String server; + String bypass; + String username; + String password; + } + + static class PlaywrightNewRequestParamsStorageState { + List cookies; + List origins; + } +} + +class PlaywrightNewRequestResult { + APIRequestContextImpl request; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java index b7e02eed2..ac4f56d60 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java @@ -18,88 +18,6 @@ import java.util.List; -class Channel { - String guid; -} - -class SerializedValue{ - Number n; - Boolean b; - String s; - // Possible values: { 'null, 'undefined, 'NaN, 'Infinity, '-Infinity, '-0 } - String v; - String d; - String u; - String bi; - public static class E { - String m; - String n; - String s; - } - E e; - public static class R { - String p; - String f; - } - R r; - SerializedValue[] a; - public static class O { - String k; - SerializedValue v; - } - O[] o; - Number h; - Integer id; - Integer ref; - // JS representation of Map: [[key1, value1], [key2, value2], ...]. - SerializedValue m; - // JS representation of Set: [item1, item2, ...]. - SerializedValue se; -} - -class SerializedArgument{ - SerializedValue value; - Channel[] handles; -} - -class SerializedError{ - public static class Error { - String message; - String name; - String stack; - - @Override - public String toString() { - return "Error {\n" + - " message='" + message + '\n' + - " name='" + name + '\n' + - " stack='" + stack + '\n' + - '}'; - } - } - Error error; - SerializedValue value; - - @Override - public String toString() { - if (error != null) { - return error.toString(); - } - return "SerializedError{" + - "value=" + value + - '}'; - } -} - -class ExpectedTextValue { - String string; - String regexSource; - String regexFlags; - Boolean ignoreCase; - Boolean matchSubstring; - Boolean normalizeWhiteSpace; -} - class FrameExpectOptions { Object expressionArg; List expectedText; @@ -111,21 +29,10 @@ class FrameExpectOptions { Double timeout; } +// Client-side outcome of Frame.expect: the command has no result, a mismatch arrives as an error with FrameExpectErrorDetails. class FrameExpectResult { - static class Received { - SerializedValue value; - String ariaSnapshot; - } boolean matches; - Received received; + FrameExpectErrorDetails.FrameExpectErrorDetailsReceived received; String errorMessage; List log; } - -class FrameExpectErrorDetails { - FrameExpectResult.Received received; - Boolean timedOut; - String customErrorMessage; -} - - diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java new file mode 100644 index 000000000..9712044dc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java @@ -0,0 +1,362 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class ProtocolBrowserChannel { + private final ChannelOwner owner; + + ProtocolBrowserChannel(ChannelOwner owner) { + this.owner = owner; + } + + BrowserStartServerResult startServer(BrowserStartServerParams params, Double timeout) { + return owner.sendMessage("startServer", params, BrowserStartServerResult.class, timeout); + } + + void stopServer(BrowserStopServerParams params, Double timeout) { + owner.sendMessage("stopServer", params, timeout); + } + + void stopServer(Double timeout) { + stopServer(new BrowserStopServerParams(), timeout); + } + + void close(BrowserCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + void killForTests(BrowserKillForTestsParams params, Double timeout) { + owner.sendMessage("killForTests", params, timeout); + } + + void killForTests(Double timeout) { + killForTests(new BrowserKillForTestsParams(), timeout); + } + + BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(BrowserDefaultUserAgentForTestParams params, Double timeout) { + return owner.sendMessage("defaultUserAgentForTest", params, BrowserDefaultUserAgentForTestResult.class, timeout); + } + + BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(Double timeout) { + return defaultUserAgentForTest(new BrowserDefaultUserAgentForTestParams(), timeout); + } + + BrowserNewContextResult newContext(BrowserNewContextParams params, Double timeout) { + return owner.sendMessage("newContext", params, BrowserNewContextResult.class, timeout); + } + + BrowserNewContextForReuseResult newContextForReuse(BrowserNewContextForReuseParams params, Double timeout) { + return owner.sendMessage("newContextForReuse", params, BrowserNewContextForReuseResult.class, timeout); + } + + void disconnectFromReusedContext(BrowserDisconnectFromReusedContextParams params, Double timeout) { + owner.sendMessage("disconnectFromReusedContext", params, timeout); + } + + BrowserNewBrowserCDPSessionResult newBrowserCDPSession(BrowserNewBrowserCDPSessionParams params, Double timeout) { + return owner.sendMessage("newBrowserCDPSession", params, BrowserNewBrowserCDPSessionResult.class, timeout); + } + + BrowserNewBrowserCDPSessionResult newBrowserCDPSession(Double timeout) { + return newBrowserCDPSession(new BrowserNewBrowserCDPSessionParams(), timeout); + } + + void startTracing(BrowserStartTracingParams params, Double timeout) { + owner.sendMessage("startTracing", params, timeout); + } + + BrowserStopTracingResult stopTracing(BrowserStopTracingParams params, Double timeout) { + return owner.sendMessage("stopTracing", params, BrowserStopTracingResult.class, timeout); + } + + BrowserStopTracingResult stopTracing(Double timeout) { + return stopTracing(new BrowserStopTracingParams(), timeout); + } +} + +class BrowserInitializer { + String version; + String name; + String browserName; +} + +class BrowserStartServerParams { + String title; + String workspaceDir; + JsonElement metadata; + String host; + Integer port; +} + +class BrowserStartServerResult { + String endpoint; +} + +class BrowserStopServerParams { +} + +class BrowserCloseParams { + String reason; +} + +class BrowserKillForTestsParams { +} + +class BrowserDefaultUserAgentForTestParams { +} + +class BrowserDefaultUserAgentForTestResult { + String userAgent; +} + +class BrowserNewContextParams { + Boolean noDefaultViewport; + BrowserNewContextParamsViewport viewport; + BrowserNewContextParamsScreen screen; + Boolean ignoreHTTPSErrors; + List clientCertificates; + Boolean javaScriptEnabled; + Boolean bypassCSP; + String userAgent; + String locale; + String timezoneId; + BrowserNewContextParamsGeolocation geolocation; + List permissions; + List extraHTTPHeaders; + Boolean offline; + List httpCredentials; + Double deviceScaleFactor; + Boolean isMobile; + Boolean hasTouch; + String colorScheme; + String reducedMotion; + String forcedColors; + String acceptDownloads; + String contrast; + String baseURL; + BrowserNewContextParamsRecordVideo recordVideo; + Boolean strictSelectors; + String serviceWorkers; + List selectorEngines; + String testIdAttributeName; + BrowserNewContextParamsProxy proxy; + BrowserNewContextParamsStorageState storageState; + + static class BrowserNewContextParamsViewport { + Integer width; + Integer height; + } + + static class BrowserNewContextParamsScreen { + Integer width; + Integer height; + } + + static class BrowserNewContextParamsClientCertificates { + String origin; + byte[] cert; + byte[] key; + String passphrase; + byte[] pfx; + } + + static class BrowserNewContextParamsGeolocation { + Double longitude; + Double latitude; + Double accuracy; + } + + static class BrowserNewContextParamsRecordVideo { + String dir; + BrowserNewContextParamsRecordVideoSize size; + Integer fps; + BrowserNewContextParamsRecordVideoShowActions showActions; + + static class BrowserNewContextParamsRecordVideoSize { + Integer width; + Integer height; + } + + static class BrowserNewContextParamsRecordVideoShowActions { + Double duration; + String position; + Integer fontSize; + String cursor; + BrowserNewContextParamsRecordVideoShowActionsStyle style; + + static class BrowserNewContextParamsRecordVideoShowActionsStyle { + String point; + String highlight; + String title; + } + } + } + + static class BrowserNewContextParamsProxy { + String server; + String bypass; + String username; + String password; + } + + static class BrowserNewContextParamsStorageState { + List cookies; + List origins; + List credentials; + } +} + +class BrowserNewContextResult { + BrowserContextImpl context; +} + +class BrowserNewContextForReuseParams { + Boolean noDefaultViewport; + BrowserNewContextForReuseParamsViewport viewport; + BrowserNewContextForReuseParamsScreen screen; + Boolean ignoreHTTPSErrors; + List clientCertificates; + Boolean javaScriptEnabled; + Boolean bypassCSP; + String userAgent; + String locale; + String timezoneId; + BrowserNewContextForReuseParamsGeolocation geolocation; + List permissions; + List extraHTTPHeaders; + Boolean offline; + List httpCredentials; + Double deviceScaleFactor; + Boolean isMobile; + Boolean hasTouch; + String colorScheme; + String reducedMotion; + String forcedColors; + String acceptDownloads; + String contrast; + String baseURL; + BrowserNewContextForReuseParamsRecordVideo recordVideo; + Boolean strictSelectors; + String serviceWorkers; + List selectorEngines; + String testIdAttributeName; + BrowserNewContextForReuseParamsProxy proxy; + BrowserNewContextForReuseParamsStorageState storageState; + + static class BrowserNewContextForReuseParamsViewport { + Integer width; + Integer height; + } + + static class BrowserNewContextForReuseParamsScreen { + Integer width; + Integer height; + } + + static class BrowserNewContextForReuseParamsClientCertificates { + String origin; + byte[] cert; + byte[] key; + String passphrase; + byte[] pfx; + } + + static class BrowserNewContextForReuseParamsGeolocation { + Double longitude; + Double latitude; + Double accuracy; + } + + static class BrowserNewContextForReuseParamsRecordVideo { + String dir; + BrowserNewContextForReuseParamsRecordVideoSize size; + Integer fps; + BrowserNewContextForReuseParamsRecordVideoShowActions showActions; + + static class BrowserNewContextForReuseParamsRecordVideoSize { + Integer width; + Integer height; + } + + static class BrowserNewContextForReuseParamsRecordVideoShowActions { + Double duration; + String position; + Integer fontSize; + String cursor; + BrowserNewContextForReuseParamsRecordVideoShowActionsStyle style; + + static class BrowserNewContextForReuseParamsRecordVideoShowActionsStyle { + String point; + String highlight; + String title; + } + } + } + + static class BrowserNewContextForReuseParamsProxy { + String server; + String bypass; + String username; + String password; + } + + static class BrowserNewContextForReuseParamsStorageState { + List cookies; + List origins; + List credentials; + } +} + +class BrowserNewContextForReuseResult { + BrowserContextImpl context; +} + +class BrowserDisconnectFromReusedContextParams { + String reason; +} + +class BrowserNewBrowserCDPSessionParams { +} + +class BrowserNewBrowserCDPSessionResult { + CDPSessionImpl session; +} + +class BrowserStartTracingParams { + PageImpl page; + Boolean screenshots; + List categories; +} + +class BrowserStopTracingParams { +} + +class BrowserStopTracingResult { + ArtifactImpl artifact; +} + +class BrowserContextEvent { + BrowserContextImpl context; +} + +class BrowserCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java new file mode 100644 index 000000000..e09f05af9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java @@ -0,0 +1,408 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import com.google.gson.JsonElement; +import java.util.List; + +class AndroidWebView { + Integer pid; + String pkg; + String socketName; +} + +class AndroidSelector { + Boolean checkable; + Boolean checked; + String clazz; + Boolean clickable; + Integer depth; + String desc; + Boolean enabled; + Boolean focusable; + Boolean focused; + AndroidSelectorHasChild hasChild; + AndroidSelectorHasDescendant hasDescendant; + Boolean longClickable; + String pkg; + String res; + Boolean scrollable; + Boolean selected; + String text; + + static class AndroidSelectorHasChild { + } + + static class AndroidSelectorHasDescendant { + Integer maxDepth; + } +} + +class AndroidElementInfo { + String clazz; + String desc; + String res; + String pkg; + String text; + Rect bounds; + Boolean checkable; + Boolean checked; + Boolean clickable; + Boolean enabled; + Boolean focusable; + Boolean focused; + Boolean longClickable; + Boolean scrollable; + Boolean selected; +} + +class ProtocolAPIResponse { + String fetchUid; + String url; + Integer status; + String statusText; + List headers; + ProtocolSecurityDetails securityDetails; + RemoteAddr serverAddr; + ResourceTiming timing; + Double responseEndTiming; +} + +class Metadata { + MetadataLocation location; + String title; + Boolean internal; + Double timeout; + + static class MetadataLocation { + String file; + Integer line; + Integer column; + } +} + +class ClientSideCallMetadata { + String id; + List stack; +} + +class SDKLanguage { + static final String JAVASCRIPT = "javascript"; + static final String PYTHON = "python"; + static final String JAVA = "java"; + static final String CSHARP = "csharp"; +} + +class WaitInfo { + String waitId; + String phase; + String event; + String message; + String error; +} + +class ProtocolHttpCredentials { + String username; + String password; + String origin; + String send; +} + +class SetNetworkCookie { + String name; + String value; + String url; + String domain; + String path; + Double expires; + Boolean httpOnly; + Boolean secure; + String sameSite; + String partitionKey; + Boolean _crHasCrossSiteAncestor; +} + +class NetworkCookie { + String name; + String value; + String domain; + String path; + Double expires; + Boolean httpOnly; + Boolean secure; + String sameSite; + String partitionKey; + Boolean _crHasCrossSiteAncestor; +} + +class ResourceTiming { + Double startTime; + Double domainLookupStart; + Double domainLookupEnd; + Double connectStart; + Double secureConnectionStart; + Double connectEnd; + Double requestStart; + Double responseStart; +} + +class ProtocolSecurityDetails { + String issuer; + String protocol; + String subjectName; + Double validFrom; + Double validTo; +} + +class RequestSizes { + Integer requestBodySize; + Integer requestHeadersSize; + Integer responseBodySize; + Integer responseHeadersSize; +} + +class RemoteAddr { + String ipAddress; + Integer port; +} + +class ExpectedTextValue { + String string; + String regexSource; + String regexFlags; + Boolean matchSubstring; + Boolean ignoreCase; + Boolean normalizeWhiteSpace; +} + +class SelectorEngine { + String name; + String source; + Boolean contentScript; +} + +class FormField { + String name; + String value; + FormFieldFile file; + + static class FormFieldFile { + String name; + String mimeType; + byte[] buffer; + } +} + +class LifecycleEvent { + static final String LOAD = "load"; + static final String DOMCONTENTLOADED = "domcontentloaded"; + static final String NETWORKIDLE = "networkidle"; + static final String COMMIT = "commit"; +} + +class ProtocolConsoleMessagesFilter { + static final String ALL = "all"; + static final String SINCE_NAVIGATION = "since-navigation"; +} + +class RecorderSource { + Boolean isRecorded; + String id; + String label; + String text; + String language; + List highlight; + Integer revealLine; + String group; + + static class RecorderSourceHighlight { + Integer line; + String type; + } +} + +class IndexedDBDatabase { + String name; + Integer version; + List stores; + + static class IndexedDBDatabaseStores { + String name; + Boolean autoIncrement; + String keyPath; + List keyPathArray; + List records; + List indexes; + + static class IndexedDBDatabaseStoresRecords { + JsonElement key; + JsonElement keyEncoded; + JsonElement value; + JsonElement valueEncoded; + } + + static class IndexedDBDatabaseStoresIndexes { + String name; + String keyPath; + List keyPathArray; + Boolean multiEntry; + Boolean unique; + } + } +} + +class OPFSEntry { + String path; + String type; + String base64; +} + +class SetOriginStorage { + String origin; + List localStorage; + List indexedDB; + List opfs; +} + +class OriginStorage { + String origin; + List localStorage; + List indexedDB; + List opfs; +} + +class RecordHarOptions { + String content; + String mode; + String urlGlob; + String urlRegexSource; + String urlRegexFlags; + String harPath; + String resourcesDir; +} + +class SerializedValue { + Double n; + Boolean b; + String s; + String v; + String d; + String u; + String bi; + SerializedValueTa ta; + SerializedValueE e; + SerializedValueR r; + List a; + List o; + Integer h; + String fn; + Integer id; + Integer ref; + + static class SerializedValueTa { + byte[] b; + String k; + } + + static class SerializedValueE { + String m; + String n; + String s; + } + + static class SerializedValueR { + String p; + String f; + } + + static class SerializedValueO { + String k; + SerializedValue v; + } +} + +class SerializedArgument { + SerializedValue value; + List handles; +} + +class SerializedError { + SerializedErrorError error; + SerializedValue value; + + static class SerializedErrorError { + String message; + String name; + String stack; + String code; + } +} + +class StackFrame { + String file; + Integer line; + Integer column; + String function; +} + +class ProtocolVirtualCredential { + String id; + String rpId; + String userHandle; + String privateKey; + String publicKey; + Integer signCount; +} + +class SetVirtualCredential { + String id; + String rpId; + String userHandle; + String privateKey; + String publicKey; + Integer signCount; +} + +class Point { + Double x; + Double y; +} + +class Rect { + Double x; + Double y; + Double width; + Double height; +} + +class URLPattern { + String hash; + String hostname; + String password; + String pathname; + String port; + String protocol; + String search; + String username; +} + +class NameValue { + String name; + String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java new file mode 100644 index 000000000..33d96044f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class RequestChannel { + private final ChannelOwner owner; + + RequestChannel(ChannelOwner owner) { + this.owner = owner; + } + + RequestResponseResult response(RequestResponseParams params, Double timeout) { + return owner.sendMessage("response", params, RequestResponseResult.class, timeout); + } + + RequestResponseResult response(Double timeout) { + return response(new RequestResponseParams(), timeout); + } + + RequestRawRequestHeadersResult rawRequestHeaders(RequestRawRequestHeadersParams params, Double timeout) { + return owner.sendMessage("rawRequestHeaders", params, RequestRawRequestHeadersResult.class, timeout); + } + + RequestRawRequestHeadersResult rawRequestHeaders(Double timeout) { + return rawRequestHeaders(new RequestRawRequestHeadersParams(), timeout); + } +} + +class RequestInitializer { + FrameImpl frame; + WorkerImpl serviceWorker; + String url; + String resourceType; + String method; + byte[] postData; + List headers; + Boolean isNavigationRequest; + RequestImpl redirectedFrom; +} + +class RequestResponseParams { +} + +class RequestResponseResult { + ResponseImpl response; +} + +class RequestRawRequestHeadersParams { +} + +class RequestRawRequestHeadersResult { + List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java new file mode 100644 index 000000000..7de880044 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class ResponseChannel { + private final ChannelOwner owner; + + ResponseChannel(ChannelOwner owner) { + this.owner = owner; + } + + ResponseBodyResult body(ResponseBodyParams params, Double timeout) { + return owner.sendMessage("body", params, ResponseBodyResult.class, timeout); + } + + ResponseBodyResult body(Double timeout) { + return body(new ResponseBodyParams(), timeout); + } + + ResponseSecurityDetailsResult securityDetails(ResponseSecurityDetailsParams params, Double timeout) { + return owner.sendMessage("securityDetails", params, ResponseSecurityDetailsResult.class, timeout); + } + + ResponseSecurityDetailsResult securityDetails(Double timeout) { + return securityDetails(new ResponseSecurityDetailsParams(), timeout); + } + + ResponseServerAddrResult serverAddr(ResponseServerAddrParams params, Double timeout) { + return owner.sendMessage("serverAddr", params, ResponseServerAddrResult.class, timeout); + } + + ResponseServerAddrResult serverAddr(Double timeout) { + return serverAddr(new ResponseServerAddrParams(), timeout); + } + + ResponseRawResponseHeadersResult rawResponseHeaders(ResponseRawResponseHeadersParams params, Double timeout) { + return owner.sendMessage("rawResponseHeaders", params, ResponseRawResponseHeadersResult.class, timeout); + } + + ResponseRawResponseHeadersResult rawResponseHeaders(Double timeout) { + return rawResponseHeaders(new ResponseRawResponseHeadersParams(), timeout); + } + + ResponseHttpVersionResult httpVersion(ResponseHttpVersionParams params, Double timeout) { + return owner.sendMessage("httpVersion", params, ResponseHttpVersionResult.class, timeout); + } + + ResponseHttpVersionResult httpVersion(Double timeout) { + return httpVersion(new ResponseHttpVersionParams(), timeout); + } + + ResponseSizesResult sizes(ResponseSizesParams params, Double timeout) { + return owner.sendMessage("sizes", params, ResponseSizesResult.class, timeout); + } + + ResponseSizesResult sizes(Double timeout) { + return sizes(new ResponseSizesParams(), timeout); + } +} + +class ResponseInitializer { + RequestImpl request; + String url; + Integer status; + String statusText; + List headers; + ResourceTiming timing; + Boolean fromServiceWorker; +} + +class ResponseBodyParams { +} + +class ResponseBodyResult { + byte[] binary; +} + +class ResponseSecurityDetailsParams { +} + +class ResponseSecurityDetailsResult { + ProtocolSecurityDetails value; +} + +class ResponseServerAddrParams { +} + +class ResponseServerAddrResult { + RemoteAddr value; +} + +class ResponseRawResponseHeadersParams { +} + +class ResponseRawResponseHeadersResult { + List headers; +} + +class ResponseHttpVersionParams { +} + +class ResponseHttpVersionResult { + String value; +} + +class ResponseSizesParams { +} + +class ResponseSizesResult { + RequestSizes sizes; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java new file mode 100644 index 000000000..dfcef789f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class RootChannel { + private final ChannelOwner owner; + + RootChannel(ChannelOwner owner) { + this.owner = owner; + } + + RootInitializeResult initialize(RootInitializeParams params, Double timeout) { + return owner.sendMessage("initialize", params, RootInitializeResult.class, timeout); + } +} + +class RootInitializer { +} + +class RootInitializeParams { + String sdkLanguage; +} + +class RootInitializeResult { + PlaywrightImpl playwright; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java new file mode 100644 index 000000000..4fd7ceaec --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class RouteChannel { + private final ChannelOwner owner; + + RouteChannel(ChannelOwner owner) { + this.owner = owner; + } + + void redirectNavigationRequest(RouteRedirectNavigationRequestParams params, Double timeout) { + owner.sendMessage("redirectNavigationRequest", params, timeout); + } + + void abort(RouteAbortParams params, Double timeout) { + owner.sendMessage("abort", params, timeout); + } + + void continue_(RouteContinueParams params, Double timeout) { + owner.sendMessage("continue", params, timeout); + } + + void fulfill(RouteFulfillParams params, Double timeout) { + owner.sendMessage("fulfill", params, timeout); + } +} + +class RouteInitializer { + RequestImpl request; +} + +class RouteRedirectNavigationRequestParams { + String url; +} + +class RouteAbortParams { + String errorCode; +} + +class RouteContinueParams { + String url; + String method; + List headers; + byte[] postData; + Boolean isFallback; +} + +class RouteFulfillParams { + Integer status; + List headers; + String body; + Boolean isBase64; + String fetchResponseUid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java index bf50fda02..63cb31c6c 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java @@ -69,6 +69,7 @@ class Serialization { .registerTypeAdapter((new TypeToken>(){}).getType(), new KeyboardModifiersSerializer()) .registerTypeAdapter(Optional.class, new OptionalSerializer()) .registerTypeHierarchyAdapter(JSHandleImpl.class, new HandleSerializer()) + .registerTypeHierarchyAdapter(ChannelOwner.class, new ChannelOwnerSerializer()) .registerTypeAdapter((new TypeToken>(){}).getType(), new StringMapSerializer()) .registerTypeAdapter((new TypeToken>(){}).getType(), new FirefoxUserPrefsSerializer()) .registerTypeAdapter(LocatorImpl.class, new LocatorImplSerializer()) @@ -87,7 +88,7 @@ static Gson gson() { static SerializedError serializeError(Throwable e) { SerializedError result = new SerializedError(); - result.error = new SerializedError.Error(); + result.error = new SerializedError.SerializedErrorError(); result.error.message = e.getMessage(); result.error.name = e.getClass().getName(); @@ -128,13 +129,7 @@ public int hashCode() { SerializedArgument toSerializedArgument() { SerializedArgument result = new SerializedArgument(); result.value = serializedValue; - result.handles = new Channel[handles.size()]; - int i = 0; - for (JSHandleImpl handle : handles) { - result.handles[i] = new Channel(); - result.handles[i].guid = handle.guid; - ++i; - } + result.handles = new ArrayList<>(handles); return result; } @@ -163,7 +158,7 @@ private SerializedValue serializeValue(Object value) { } else if (value instanceof Boolean) { result.b = (Boolean) value; } else if (value instanceof Integer) { - result.n = (Integer) value; + result.n = ((Integer) value).doubleValue(); } else if (value instanceof String) { result.s = (String) value; } else if (value instanceof Date) { @@ -175,12 +170,12 @@ private SerializedValue serializeValue(Object value) { } else if (value instanceof BigInteger) { result.bi = ((BigInteger)value).toString(); } else if (value instanceof Pattern) { - result.r = new SerializedValue.R(); + result.r = new SerializedValue.SerializedValueR(); result.r.p = ((Pattern)value).pattern(); result.r.f = toJsRegexFlags(((Pattern)value)); } else if (value instanceof Exception) { Exception exception = (Exception) value; - result.e = new SerializedValue.E(); + result.e = new SerializedValue.SerializedValueE(); result.e.m = exception.getMessage(); result.e.n = exception.getClass().getSimpleName(); StringWriter sw = new StringWriter(); @@ -199,24 +194,24 @@ private SerializedValue serializeValue(Object value) { for (Object o : (List) value) { list.add(serializeValue(o)); } - result.a = list.toArray(new SerializedValue[0]); + result.a = list; } else if (value instanceof Map) { - List list = new ArrayList<>(); + List list = new ArrayList<>(); @SuppressWarnings("unchecked") Map map = (Map) value; for (Map.Entry e : map.entrySet()) { - SerializedValue.O o = new SerializedValue.O(); + SerializedValue.SerializedValueO o = new SerializedValue.SerializedValueO(); o.k = e.getKey(); o.v = serializeValue(e.getValue()); list.add(o); } - result.o = list.toArray(new SerializedValue.O[0]); + result.o = list; } else if (value instanceof Object[]) { List list = new ArrayList<>(); for (Object o : (Object[]) value) { list.add(serializeValue(o)); } - result.a = list.toArray(new SerializedValue[0]); + result.a = list; } else { throw new PlaywrightException("Unsupported type of argument: " + value); } @@ -295,21 +290,11 @@ private static T deserialize(SerializedValue value, Map idT if (value.o != null) { Map map = new LinkedHashMap<>(); idToValue.put(value.id, map); - for (SerializedValue.O o : value.o) { + for (SerializedValue.SerializedValueO o : value.o) { map.put(o.k, deserialize(o.v, idToValue)); } return (T) map; } - if (value.m != null) { - Map map = new LinkedHashMap<>(); - idToValue.put(value.id, map); - return (T) map; - } - if (value.se != null) { - Map map = new LinkedHashMap<>(); - idToValue.put(value.id, map); - return (T) map; - } throw new PlaywrightException("Unexpected result: " + gson().toJson(value)); } @@ -486,6 +471,14 @@ public JsonElement serialize(JSHandleImpl src, Type typeOfSrc, JsonSerialization } } + // Serialization only: a channel owner travels as {guid}. Deserialization needs a connection, see Connection.gson(). + private static class ChannelOwnerSerializer implements JsonSerializer { + @Override + public JsonElement serialize(ChannelOwner src, Type typeOfSrc, JsonSerializationContext context) { + return src.toProtocolRef(); + } + } + private static class FirefoxUserPrefsSerializer implements JsonSerializer> { @Override public JsonElement serialize(Map src, Type typeOfSrc, JsonSerializationContext context) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java new file mode 100644 index 000000000..272d4529d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class StreamChannel { + private final ChannelOwner owner; + + StreamChannel(ChannelOwner owner) { + this.owner = owner; + } + + StreamReadResult read(StreamReadParams params, Double timeout) { + return owner.sendMessage("read", params, StreamReadResult.class, timeout); + } + + void close(StreamCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + void close(Double timeout) { + close(new StreamCloseParams(), timeout); + } +} + +class StreamInitializer { +} + +class StreamReadParams { + Integer size; +} + +class StreamReadResult { + byte[] binary; +} + +class StreamCloseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java new file mode 100644 index 000000000..2250e11ef --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class TracingChannel { + private final ChannelOwner owner; + + TracingChannel(ChannelOwner owner) { + this.owner = owner; + } + + void tracingStart(TracingTracingStartParams params, Double timeout) { + owner.sendMessage("tracingStart", params, timeout); + } + + TracingTracingStartChunkResult tracingStartChunk(TracingTracingStartChunkParams params, Double timeout) { + return owner.sendMessage("tracingStartChunk", params, TracingTracingStartChunkResult.class, timeout); + } + + void tracingGroup(TracingTracingGroupParams params, Double timeout) { + owner.sendMessage("tracingGroup", params, timeout); + } + + void tracingGroupEnd(TracingTracingGroupEndParams params, Double timeout) { + owner.sendMessage("tracingGroupEnd", params, timeout); + } + + void tracingGroupEnd(Double timeout) { + tracingGroupEnd(new TracingTracingGroupEndParams(), timeout); + } + + TracingTracingStopChunkResult tracingStopChunk(TracingTracingStopChunkParams params, Double timeout) { + return owner.sendMessage("tracingStopChunk", params, TracingTracingStopChunkResult.class, timeout); + } + + void tracingStop(TracingTracingStopParams params, Double timeout) { + owner.sendMessage("tracingStop", params, timeout); + } + + void tracingStop(Double timeout) { + tracingStop(new TracingTracingStopParams(), timeout); + } + + TracingHarStartResult harStart(TracingHarStartParams params, Double timeout) { + return owner.sendMessage("harStart", params, TracingHarStartResult.class, timeout); + } + + TracingHarExportResult harExport(TracingHarExportParams params, Double timeout) { + return owner.sendMessage("harExport", params, TracingHarExportResult.class, timeout); + } +} + +class TracingInitializer { +} + +class TracingTracingStartParams { + String name; + Boolean snapshotDom; + Boolean snapshotAria; + Boolean snapshotScreen; + Boolean screencast; + Boolean coverage; + Boolean live; +} + +class TracingTracingStartChunkParams { + String name; + String title; +} + +class TracingTracingStartChunkResult { + String traceName; +} + +class TracingTracingGroupParams { + String name; + TracingTracingGroupParamsLocation location; + + static class TracingTracingGroupParamsLocation { + String file; + Integer line; + Integer column; + } +} + +class TracingTracingGroupEndParams { +} + +class TracingTracingStopChunkParams { + String mode; +} + +class TracingTracingStopChunkResult { + ArtifactImpl artifact; + List entries; +} + +class TracingTracingStopParams { +} + +class TracingHarStartParams { + PageImpl page; + RecordHarOptions options; +} + +class TracingHarStartResult { + String harId; +} + +class TracingHarExportParams { + String harId; + String mode; +} + +class TracingHarExportResult { + ArtifactImpl artifact; + List entries; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java new file mode 100644 index 000000000..e62410fab --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class WebSocketChannel { + private final ChannelOwner owner; + + WebSocketChannel(ChannelOwner owner) { + this.owner = owner; + } +} + +class WebSocketInitializer { + String url; +} + +class WebSocketOpenEvent { +} + +class WebSocketFrameSentEvent { + Integer opcode; + String data; +} + +class WebSocketFrameReceivedEvent { + Integer opcode; + String data; +} + +class WebSocketSocketErrorEvent { + String error; +} + +class WebSocketCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java new file mode 100644 index 000000000..d95b378b4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class WebSocketRouteChannel { + private final ChannelOwner owner; + + WebSocketRouteChannel(ChannelOwner owner) { + this.owner = owner; + } + + void connect(WebSocketRouteConnectParams params, Double timeout) { + owner.sendMessage("connect", params, timeout); + } + + void connect(Double timeout) { + connect(new WebSocketRouteConnectParams(), timeout); + } + + void ensureOpened(WebSocketRouteEnsureOpenedParams params, Double timeout) { + owner.sendMessage("ensureOpened", params, timeout); + } + + void ensureOpened(Double timeout) { + ensureOpened(new WebSocketRouteEnsureOpenedParams(), timeout); + } + + void sendToPage(WebSocketRouteSendToPageParams params, Double timeout) { + owner.sendMessage("sendToPage", params, timeout); + } + + void sendToServer(WebSocketRouteSendToServerParams params, Double timeout) { + owner.sendMessage("sendToServer", params, timeout); + } + + void closePage(WebSocketRouteClosePageParams params, Double timeout) { + owner.sendMessage("closePage", params, timeout); + } + + void closeServer(WebSocketRouteCloseServerParams params, Double timeout) { + owner.sendMessage("closeServer", params, timeout); + } +} + +class WebSocketRouteInitializer { + String url; + List protocols; +} + +class WebSocketRouteConnectParams { +} + +class WebSocketRouteEnsureOpenedParams { +} + +class WebSocketRouteSendToPageParams { + String message; + Boolean isBase64; +} + +class WebSocketRouteSendToServerParams { + String message; + Boolean isBase64; +} + +class WebSocketRouteClosePageParams { + Integer code; + String reason; + Boolean wasClean; +} + +class WebSocketRouteCloseServerParams { + Integer code; + String reason; + Boolean wasClean; +} + +class WebSocketRouteMessageFromPageEvent { + String message; + Boolean isBase64; +} + +class WebSocketRouteMessageFromServerEvent { + String message; + Boolean isBase64; +} + +class WebSocketRouteClosePageEvent { + Integer code; + String reason; + Boolean wasClean; +} + +class WebSocketRouteCloseServerEvent { + Integer code; + String reason; + Boolean wasClean; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java new file mode 100644 index 000000000..a3f47eb21 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +import java.util.List; + +class WorkerChannel { + private final ChannelOwner owner; + + WorkerChannel(ChannelOwner owner) { + this.owner = owner; + } + + void disconnect(WorkerDisconnectParams params, Double timeout) { + owner.sendMessage("disconnect", params, timeout); + } + + WorkerEvaluateExpressionResult evaluateExpression(WorkerEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, WorkerEvaluateExpressionResult.class, timeout); + } + + WorkerEvaluateExpressionHandleResult evaluateExpressionHandle(WorkerEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, WorkerEvaluateExpressionHandleResult.class, timeout); + } + + void updateSubscription(WorkerUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } +} + +class WorkerInitializer { + String url; +} + +class WorkerDisconnectParams { + String reason; +} + +class WorkerEvaluateExpressionParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class WorkerEvaluateExpressionResult { + SerializedValue value; +} + +class WorkerEvaluateExpressionHandleParams { + String expression; + Boolean isFunction; + SerializedArgument arg; +} + +class WorkerEvaluateExpressionHandleResult { + JSHandleImpl handle; +} + +class WorkerUpdateSubscriptionParams { + String event; + Boolean enabled; +} + +class WorkerConsoleEvent { + String type; + String text; + List args; + WorkerConsoleEventLocation location; + Double timestamp; + + static class WorkerConsoleEventLocation { + String url; + Integer lineNumber; + Integer columnNumber; + } +} + +class WorkerCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java new file mode 100644 index 000000000..a4d96dea1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl; + +class WritableStreamChannel { + private final ChannelOwner owner; + + WritableStreamChannel(ChannelOwner owner) { + this.owner = owner; + } + + void write(WritableStreamWriteParams params, Double timeout) { + owner.sendMessage("write", params, timeout); + } + + void close(WritableStreamCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + void close(Double timeout) { + close(new WritableStreamCloseParams(), timeout); + } +} + +class WritableStreamInitializer { +} + +class WritableStreamWriteParams { + byte[] binary; +} + +class WritableStreamCloseParams { +} diff --git a/scripts/generate_api.sh b/scripts/generate_api.sh index 78ed6d4ad..81e5323eb 100755 --- a/scripts/generate_api.sh +++ b/scripts/generate_api.sh @@ -25,10 +25,10 @@ else UPSTREAM_DIR=$(mktemp -d) CLONED_UPSTREAM="$UPSTREAM_DIR" echo "Fetching upstream Playwright source at $GIT_HEAD" - # generateApiJson.js only needs utils/ and docs/, so fetch just those. + # generateApiJson.js only needs utils/ and docs/, the protocol generator also reads packages/protocol/spec. git clone --quiet --filter=blob:none --no-checkout https://github.com/microsoft/playwright.git "$UPSTREAM_DIR" git -C "$UPSTREAM_DIR" sparse-checkout init --cone - git -C "$UPSTREAM_DIR" sparse-checkout set utils docs + git -C "$UPSTREAM_DIR" sparse-checkout set utils docs packages/protocol/spec git -C "$UPSTREAM_DIR" checkout --quiet "$GIT_HEAD" fi @@ -36,11 +36,25 @@ echo "Updating api.json from upstream playwright@$DRIVER_VERSION ($GIT_HEAD)" API_JSON_MODE=1 node "$UPSTREAM_DIR/utils/doclint/generateApiJson.js" \ > ./tools/api-generator/src/main/resources/api.json -if [[ -n "$CLONED_UPSTREAM" ]]; then - rm -rf "$CLONED_UPSTREAM" -fi - mvn compile -f ./tools/api-generator --no-transfer-progress echo "Regenerating Java interfaces" mvn exec:java --f ./tools/api-generator -D exec.mainClass=com.microsoft.playwright.tools.ApiGenerator + +# The protocol types are generated last: they avoid names of the public API types generated above. +# utils/protocol_spec.js needs the 'yaml' package, which a sparse upstream checkout does not have. +echo "Generating protocol channel types" +YAML_DIR="" +if [[ ! -d "$UPSTREAM_DIR/node_modules/yaml" ]]; then + YAML_DIR=$(mktemp -d) + npm install --prefix "$YAML_DIR" --no-audit --no-fund --silent yaml@2.9.0 + export NODE_PATH="$YAML_DIR/node_modules${NODE_PATH:+:$NODE_PATH}" +fi +node ./scripts/generate_java_channels.js "$UPSTREAM_DIR" + +if [[ -n "$YAML_DIR" ]]; then + rm -rf "$YAML_DIR" +fi +if [[ -n "$CLONED_UPSTREAM" ]]; then + rm -rf "$CLONED_UPSTREAM" +fi diff --git a/scripts/generate_java_channels.js b/scripts/generate_java_channels.js new file mode 100644 index 000000000..13931b1a3 --- /dev/null +++ b/scripts/generate_java_channels.js @@ -0,0 +1,363 @@ +#!/usr/bin/env node +/** + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Generates the Java protocol types (params, results, initializers, events, structs and +// typed channels) from the upstream protocol spec. Modelled on upstream +// utils/generate_channels.js and utils/generate_dotnet_channels.js. +// +// Usage: node scripts/generate_java_channels.js + +const fs = require('fs'); +const path = require('path'); + +const GENERATED_MARKER = '// This file is generated by scripts/generate_java_channels.js, do not edit manually.'; +const OUT_DIR = path.join(__dirname, '..', 'playwright', 'src', 'main', 'java', 'com', 'microsoft', 'playwright', 'impl'); + +const LICENSE_HEADER = `/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */`; + +const JAVA_RESERVED = new Set(['abstract', 'assert', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', + 'continue', 'default', 'do', 'double', 'else', 'enum', 'extends', 'final', 'finally', 'float', 'for', 'goto', 'if', + 'implements', 'import', 'instanceof', 'int', 'interface', 'long', 'native', 'new', 'package', 'private', 'protected', + 'public', 'return', 'short', 'static', 'strictfp', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', + 'transient', 'try', 'void', 'volatile', 'while', 'true', 'false', 'null', '_']); + +// Interfaces the Java client does not implement. +function isSkippedInterface(name) { + return name.startsWith('Android') || name.startsWith('Electron') || name === 'SocksSupport'; +} + +// Java owner classes that are not called Impl. +const OWNER_CLASS_OVERRIDES = { + BindingCall: 'BindingCall', + JsonPipe: 'JsonPipe', + LocalUtils: 'LocalUtils', + Stream: 'Stream', + WritableStream: 'WritableStream', + Disposable: 'DisposableObject', +}; + +// Generated classes live in the impl package and would shadow same-named public API types that +// the impl classes import with a wildcard (e.g. APIResponse, options.BrowserChannel), so they +// get a "Protocol" prefix instead. +const PUBLIC_API_DIRS = [ + path.join(OUT_DIR, '..'), + path.join(OUT_DIR, '..', 'options'), +]; +const publicTypeNames = new Set(); +for (const dir of PUBLIC_API_DIRS) { + if (!fs.existsSync(dir)) + continue; + for (const file of fs.readdirSync(dir)) { + if (file.endsWith('.java')) + publicTypeNames.add(file.substring(0, file.length - '.java'.length)); + } +} + +function classNameFor(name) { + return publicTypeNames.has(name) ? 'Protocol' + name : name; +} + +function titleCase(name) { + return name[0].toUpperCase() + name.substring(1); +} + +function safeIdentifier(name) { + return JAVA_RESERVED.has(name) ? name + '_' : name; +} + +const upstreamDir = process.argv[2]; +if (!upstreamDir) { + console.error('Usage: node scripts/generate_java_channels.js '); + process.exit(1); +} +const protocol = require(path.resolve(upstreamDir, 'utils', 'protocol_spec.js')).loadProtocol(); + +const interfaces = new Map(); +const mixins = new Map(); +const structs = new Map(); +for (const [name, value] of Object.entries(protocol)) { + if (value.type === 'interface' && !isSkippedInterface(name)) + interfaces.set(name, value); + else if (value.type === 'mixin') + mixins.set(name, value); + else if (value.type === 'object' || value.type === 'enum') + structs.set(name, value); +} + +function baseTypeName(type) { + if (typeof type === 'string') + return type.endsWith('?') ? type.substring(0, type.length - 1) : type; + if (type.type.startsWith('array')) + return baseTypeName(type.items); + return null; +} + +// A property is dropped when it is not supported by the Java client. +function isSkippedProperty(name, type) { + if (name === 'android' || name === 'electron') + return true; + const base = baseTypeName(type); + if (base === 'undefined') + return true; + if (base && isSkippedInterface(base)) + return true; + return false; +} + +function stripOptional(type) { + return type.endsWith('?') ? type.substring(0, type.length - 1) : type; +} + +// Returns the Java type for the spec type; inline objects are emitted to `nested` as classes. +function javaType(type, parentName, propName, nested) { + if (typeof type === 'string') { + type = stripOptional(type); + switch (type) { + case 'string': return 'String'; + case 'boolean': return 'Boolean'; + case 'int': return 'Integer'; + case 'float': return 'Double'; + case 'binary': return 'byte[]'; + case 'json': return 'JsonElement'; + case 'Channel': return 'ChannelOwner'; + case 'number': throw new Error('Use "int" or "float" instead of "number" in protocol.yml'); + } + if (interfaces.has(type)) + return OWNER_CLASS_OVERRIDES[type] || (type + 'Impl'); + const struct = structs.get(type); + if (struct) + return struct.type === 'enum' ? 'String' : classNameFor(type); + throw new Error(`Unknown type "${type}" of ${parentName}.${propName}`); + } + if (type.type.startsWith('array')) + return `List<${javaType(type.items, parentName, propName, nested)}>`; + if (type.type.startsWith('enum')) + return 'String'; + if (type.type.startsWith('object')) { + const name = parentName + titleCase(propName); + nested.push({ name, properties: type.properties || {} }); + return name; + } + throw new Error('Invalid type: ' + JSON.stringify(type)); +} + +// Collects the fields of an object, expanding mixins. +function collectFields(props, parentName, nested, fields) { + for (const [name, value] of Object.entries(props || {})) { + if (name.startsWith('$mixin')) { + const mixin = mixins.get(value); + if (!mixin) + throw new Error(`Unknown mixin "${value}"`); + collectFields(mixin.properties, parentName, nested, fields); + continue; + } + if (isSkippedProperty(name, value)) + continue; + const type = javaType(value, parentName, name, nested); + fields.push({ name, type }); + } +} + +// Emits the class `name` with the given properties; nested inline objects become static classes. +function classBody(name, props, indent, modifiers, extendsClause) { + const nested = []; + const fields = []; + collectFields(props, name, nested, fields); + const lines = []; + lines.push(`${indent}${modifiers}class ${name}${extendsClause ? ' extends ' + extendsClause : ''} {`); + for (const field of fields) { + const id = safeIdentifier(field.name); + if (id !== field.name) + lines.push(`${indent} @SerializedName("${field.name}")`); + lines.push(`${indent} ${field.type} ${id};`); + } + for (const n of nested) { + if (lines.length > 1) + lines.push(''); + lines.push(...classBody(n.name, n.properties, indent + ' ', 'static ', null)); + } + lines.push(`${indent}}`); + return lines; +} + +function fileText(bodyLines) { + const body = bodyLines.join('\n'); + const imports = []; + if (body.includes('SerializedName')) + imports.push('import com.google.gson.annotations.SerializedName;'); + if (body.includes('JsonElement')) + imports.push('import com.google.gson.JsonElement;'); + if (/\bList { + const rank = s => s.startsWith('import com.') ? 0 : 1; + return rank(a) - rank(b) || (a < b ? -1 : 1); + }); + return `${LICENSE_HEADER} + +${GENERATED_MARKER} + +package com.microsoft.playwright.impl; + +${imports.length ? imports.join('\n') + '\n\n' : ''}${body} +`; +} + +function enumConstantName(literal) { + let name = literal.replace(/([a-z0-9])([A-Z])/g, '$1_$2').replace(/[^A-Za-z0-9]+/g, '_').toUpperCase().replace(/^_+|_+$/g, ''); + if (/^[0-9]/.test(name) || !name) + name = '_' + name; + return name; +} + +function generateStructs() { + const lines = []; + for (const [name, struct] of structs) { + if (lines.length) + lines.push(''); + if (struct.type === 'enum') { + lines.push(`class ${classNameFor(name)} {`); + const used = new Set(); + for (const literal of struct.literals) { + let constant = enumConstantName(String(literal)); + while (used.has(constant)) + constant += '_'; + used.add(constant); + lines.push(` static final String ${constant} = ${JSON.stringify(String(literal))};`); + } + lines.push('}'); + } else { + lines.push(...classBody(classNameFor(name), struct.properties, '', '', null)); + } + } + return fileText(lines); +} + +// Commands of the interface and all its ancestors, own commands first. +function allCommands(name) { + const result = []; + const seen = new Set(); + let currentName = name; + let current = interfaces.get(name); + while (current) { + for (const [methodName, method] of Object.entries(current.commands || {})) { + if (seen.has(methodName)) + continue; + seen.add(methodName); + result.push({ interfaceName: currentName, methodName, method: method || {} }); + } + currentName = current.extends; + current = interfaces.get(currentName); + } + return result; +} + +function generateInterface(name, item) { + const lines = []; + // Channel. + lines.push(`class ${classNameFor(name + 'Channel')} {`); + lines.push(' private final ChannelOwner owner;'); + lines.push(''); + lines.push(` ${classNameFor(name + 'Channel')}(ChannelOwner owner) {`); + lines.push(' this.owner = owner;'); + lines.push(' }'); + for (const { interfaceName, methodName, method } of allCommands(name)) { + const prefix = interfaceName + titleCase(methodName); + const hasReturns = !!method.returns; + const result = hasReturns ? prefix + 'Result' : 'void'; + const javaName = safeIdentifier(methodName); + const call = hasReturns ? `owner.sendMessage("${methodName}", params, ${prefix}Result.class, timeout)` : `owner.sendMessage("${methodName}", params, timeout)`; + lines.push(''); + lines.push(` ${result} ${javaName}(${prefix}Params params, Double timeout) {`); + lines.push(hasReturns ? ` return ${call};` : ` ${call};`); + lines.push(' }'); + if (!method.parameters || !Object.keys(method.parameters).length) { + lines.push(''); + lines.push(` ${result} ${javaName}(Double timeout) {`); + lines.push(hasReturns ? ` return ${javaName}(new ${prefix}Params(), timeout);` : ` ${javaName}(new ${prefix}Params(), timeout);`); + lines.push(' }'); + } + } + lines.push('}'); + + // Initializer. + lines.push(''); + if (item.initializer) + lines.push(...classBody(`${name}Initializer`, item.initializer, '', '', null)); + else + lines.push(...classBody(`${name}Initializer`, {}, '', '', item.extends && interfaces.has(item.extends) ? `${item.extends}Initializer` : null)); + + // Own commands. + for (const [methodName, rawMethod] of Object.entries(item.commands || {})) { + const method = rawMethod || {}; + const prefix = name + titleCase(methodName); + lines.push(''); + lines.push(...classBody(`${prefix}Params`, method.parameters, '', '', null)); + if (method.returns) { + lines.push(''); + lines.push(...classBody(`${prefix}Result`, method.returns, '', '', null)); + } + if (method.errorDetails) { + lines.push(''); + lines.push(...classBody(`${prefix}ErrorDetails`, method.errorDetails, '', '', null)); + } + } + + // Events. + for (const [eventName, rawEvent] of Object.entries(item.events || {})) { + const event = rawEvent || {}; + lines.push(''); + lines.push(...classBody(`${name}${titleCase(eventName)}Event`, event.parameters, '', '', null)); + } + return fileText(lines); +} + +// ---- main ---- + +const outputs = new Map(); +outputs.set('ProtocolStructs.java', generateStructs()); +for (const [name, item] of interfaces) + outputs.set(`${classNameFor(name + 'Channel')}.java`, generateInterface(name, item)); + +// Delete stale generated files. +for (const file of fs.readdirSync(OUT_DIR)) { + if (!file.endsWith('.java') || outputs.has(file)) + continue; + const text = fs.readFileSync(path.join(OUT_DIR, file), 'utf-8'); + if (text.includes(GENERATED_MARKER)) + fs.unlinkSync(path.join(OUT_DIR, file)); +} +for (const [file, text] of outputs) { + const target = path.join(OUT_DIR, file); + if (!fs.existsSync(target) || fs.readFileSync(target, 'utf-8') !== text) + fs.writeFileSync(target, text); +} +console.log(`Generated ${outputs.size} files in ${path.relative(process.cwd(), OUT_DIR)}`); From 076d9a7de2ec1807745efaf1630280b23220cee9 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 10:13:00 -0800 Subject: [PATCH 03/33] refactor(page): use generated channel types for keyboard, mouse, touchscreen and dialog --- .../microsoft/playwright/impl/DialogImpl.java | 11 ++- .../playwright/impl/KeyboardImpl.java | 47 +++++++------ .../microsoft/playwright/impl/MouseImpl.java | 68 +++++++++++-------- .../microsoft/playwright/impl/PageImpl.java | 2 + .../playwright/impl/TouchscreenImpl.java | 13 ++-- .../com/microsoft/playwright/impl/Utils.java | 3 +- 6 files changed, 78 insertions(+), 66 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java index 74d23dca9..719ac7c2e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java @@ -21,6 +21,7 @@ import com.microsoft.playwright.Page; class DialogImpl extends ChannelOwner implements Dialog { + final DialogChannel channel = new DialogChannel(this); private PageImpl page; DialogImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { @@ -34,17 +35,15 @@ class DialogImpl extends ChannelOwner implements Dialog { @Override public void accept(String promptText) { - JsonObject params = new JsonObject(); - if (promptText != null) { - params.addProperty("promptText", promptText); - } - sendMessage("accept", params, NO_TIMEOUT); + DialogAcceptParams params = new DialogAcceptParams(); + params.promptText = promptText; + channel.accept(params, NO_TIMEOUT); } @Override public void dismiss() { try { - sendMessage("dismiss"); + channel.dismiss(NO_TIMEOUT); } catch (TargetClosedError e) { // Swallow TargetClosedErrors for beforeunload dialogs. } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java index 969fa30ca..82d3fe043 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java @@ -16,31 +16,30 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.Keyboard; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; -import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.convertType; class KeyboardImpl implements Keyboard { - private final ChannelOwner page; + private final PageImpl page; - KeyboardImpl(ChannelOwner page) { + KeyboardImpl(PageImpl page) { this.page = page; } @Override public void down(String key) { - JsonObject params = new JsonObject(); - params.addProperty("key", key); - page.sendMessage("keyboardDown", params, NO_TIMEOUT); + PageKeyboardDownParams params = new PageKeyboardDownParams(); + params.key = key; + page.channel.keyboardDown(params, NO_TIMEOUT); } @Override public void insertText(String text) { - JsonObject params = new JsonObject(); - params.addProperty("text", text); - page.sendMessage("keyboardInsertText", params, NO_TIMEOUT); + PageKeyboardInsertTextParams params = new PageKeyboardInsertTextParams(); + params.text = text; + page.channel.keyboardInsertText(params, NO_TIMEOUT); } @Override @@ -49,32 +48,32 @@ public void press(String key, PressOptions options) { } private void pressImpl(String key, PressOptions options) { - if (options == null) { - options = new PressOptions(); + PageKeyboardPressParams params = convertType(options, PageKeyboardPressParams.class); + if (params == null) { + params = new PageKeyboardPressParams(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("key", key); - page.sendMessage("keyboardPress", params, NO_TIMEOUT); + params.key = key; + page.channel.keyboardPress(params, NO_TIMEOUT); } - @Override + @Override public void type(String text, TypeOptions options) { typeImpl(text, options); } private void typeImpl(String text, TypeOptions options) { - if (options == null) { - options = new TypeOptions(); + PageKeyboardTypeParams params = convertType(options, PageKeyboardTypeParams.class); + if (params == null) { + params = new PageKeyboardTypeParams(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("text", text); - page.sendMessage("keyboardType", params, NO_TIMEOUT); + params.text = text; + page.channel.keyboardType(params, NO_TIMEOUT); } @Override public void up(String key) { - JsonObject params = new JsonObject(); - params.addProperty("key", key); - page.sendMessage("keyboardUp", params, NO_TIMEOUT); + PageKeyboardUpParams params = new PageKeyboardUpParams(); + params.key = key; + page.channel.keyboardUp(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java index e166f9262..919d0630e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java @@ -16,29 +16,35 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.Mouse; +import com.microsoft.playwright.options.MouseButton; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; -import static com.microsoft.playwright.impl.Serialization.gson; import static com.microsoft.playwright.impl.Utils.convertType; class MouseImpl implements Mouse { - private final ChannelOwner page; + private final PageImpl page; - MouseImpl(ChannelOwner page) { + MouseImpl(PageImpl page) { this.page = page; } + private static String toProtocol(MouseButton button) { + return button == null ? null : button.name().toLowerCase(); + } + @Override public void click(double x, double y, ClickOptions options) { - if (options == null) { - options = new ClickOptions(); + PageMouseClickParams params = convertType(options, PageMouseClickParams.class); + if (params == null) { + params = new PageMouseClickParams(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("x", x); - params.addProperty("y", y); - page.sendMessage("mouseClick", params, NO_TIMEOUT); + if (options != null) { + params.button = toProtocol(options.button); + } + params.x = x; + params.y = y; + page.channel.mouseClick(params, NO_TIMEOUT); } @Override @@ -59,38 +65,44 @@ private void dblclickImpl(double x, double y, DblclickOptions options) { @Override public void down(DownOptions options) { - if (options == null) { - options = new DownOptions(); + PageMouseDownParams params = convertType(options, PageMouseDownParams.class); + if (params == null) { + params = new PageMouseDownParams(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - page.sendMessage("mouseDown", params, NO_TIMEOUT); + if (options != null) { + params.button = toProtocol(options.button); + } + page.channel.mouseDown(params, NO_TIMEOUT); } @Override public void move(double x, double y, MoveOptions options) { - if (options == null) { - options = new MoveOptions(); + PageMouseMoveParams params = convertType(options, PageMouseMoveParams.class); + if (params == null) { + params = new PageMouseMoveParams(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("x", x); - params.addProperty("y", y); - page.sendMessage("mouseMove", params, NO_TIMEOUT); + params.x = x; + params.y = y; + page.channel.mouseMove(params, NO_TIMEOUT); } @Override public void up(UpOptions options) { - if (options == null) { - options = new UpOptions(); + PageMouseUpParams params = convertType(options, PageMouseUpParams.class); + if (params == null) { + params = new PageMouseUpParams(); + } + if (options != null) { + params.button = toProtocol(options.button); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - page.sendMessage("mouseUp", params, NO_TIMEOUT); + page.channel.mouseUp(params, NO_TIMEOUT); } @Override public void wheel(double deltaX, double deltaY) { - JsonObject params = new JsonObject(); - params.addProperty("deltaX", deltaX); - params.addProperty("deltaY", deltaY); - page.sendMessage("mouseWheel", params, NO_TIMEOUT); + PageMouseWheelParams params = new PageMouseWheelParams(); + params.deltaX = deltaX; + params.deltaY = deltaY; + page.channel.mouseWheel(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index f4a279541..7b4f7ddfc 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -41,6 +41,7 @@ public class PageImpl extends ChannelOwner implements Page { final BrowserContextImpl browserContext; private final FrameImpl mainFrame; + final PageChannel channel; private final KeyboardImpl keyboard; private final MouseImpl mouse; private final TouchscreenImpl touchscreen; @@ -135,6 +136,7 @@ enum EventType { if (initializer.has("viewportSize")) { viewport = gson().fromJson(initializer.get("viewportSize"), ViewportSize.class); } + channel = new PageChannel(this); keyboard = new KeyboardImpl(this); mouse = new MouseImpl(this); touchscreen = new TouchscreenImpl(this); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java index 175a70c17..fcde7a8bf 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java @@ -16,7 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.Touchscreen; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; @@ -25,14 +24,14 @@ class TouchscreenImpl implements Touchscreen { private final PageImpl page; TouchscreenImpl(PageImpl page) { - this.page = page; - } + this.page = page; + } @Override public void tap(double x, double y) { - JsonObject params = new JsonObject(); - params.addProperty("x", x); - params.addProperty("y", y); - page.sendMessage("touchscreenTap", params, NO_TIMEOUT); + PageTouchscreenTapParams params = new PageTouchscreenTapParams(); + params.x = x; + params.y = y; + page.channel.touchscreenTap(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index 9b41c2f4d..ea6c0ba8d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -73,7 +73,8 @@ static T convertType(F f, Class t) { try { Field fromField = f.getClass().getDeclaredField(toField.getName()); Object value = fromField.get(f); - if (value != null) { + // Fields of a different type (e.g. an options enum vs a protocol string) are set by the caller. + if (value != null && toField.getType().isInstance(value)) { toField.set(result, value); } } catch (NoSuchFieldException e) { From 0b41b3a810df33caf934e7e50c114e6d5f63138a Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 10:17:22 -0800 Subject: [PATCH 04/33] refactor(protocol): copy options into protocol params with a Gson round trip --- .../playwright/impl/KeyboardImpl.java | 12 ++----- .../microsoft/playwright/impl/MouseImpl.java | 35 +++---------------- .../com/microsoft/playwright/impl/Utils.java | 15 ++++++-- 3 files changed, 21 insertions(+), 41 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java index 82d3fe043..7bf8c0900 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java @@ -19,7 +19,7 @@ import com.microsoft.playwright.Keyboard; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; -import static com.microsoft.playwright.impl.Utils.convertType; +import static com.microsoft.playwright.impl.Utils.toProtocol; class KeyboardImpl implements Keyboard { private final PageImpl page; @@ -48,10 +48,7 @@ public void press(String key, PressOptions options) { } private void pressImpl(String key, PressOptions options) { - PageKeyboardPressParams params = convertType(options, PageKeyboardPressParams.class); - if (params == null) { - params = new PageKeyboardPressParams(); - } + PageKeyboardPressParams params = toProtocol(options, PageKeyboardPressParams.class); params.key = key; page.channel.keyboardPress(params, NO_TIMEOUT); } @@ -62,10 +59,7 @@ public void type(String text, TypeOptions options) { } private void typeImpl(String text, TypeOptions options) { - PageKeyboardTypeParams params = convertType(options, PageKeyboardTypeParams.class); - if (params == null) { - params = new PageKeyboardTypeParams(); - } + PageKeyboardTypeParams params = toProtocol(options, PageKeyboardTypeParams.class); params.text = text; page.channel.keyboardType(params, NO_TIMEOUT); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java index 919d0630e..b531265cf 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java @@ -17,10 +17,10 @@ package com.microsoft.playwright.impl; import com.microsoft.playwright.Mouse; -import com.microsoft.playwright.options.MouseButton; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; import static com.microsoft.playwright.impl.Utils.convertType; +import static com.microsoft.playwright.impl.Utils.toProtocol; class MouseImpl implements Mouse { private final PageImpl page; @@ -29,19 +29,9 @@ class MouseImpl implements Mouse { this.page = page; } - private static String toProtocol(MouseButton button) { - return button == null ? null : button.name().toLowerCase(); - } - @Override public void click(double x, double y, ClickOptions options) { - PageMouseClickParams params = convertType(options, PageMouseClickParams.class); - if (params == null) { - params = new PageMouseClickParams(); - } - if (options != null) { - params.button = toProtocol(options.button); - } + PageMouseClickParams params = toProtocol(options, PageMouseClickParams.class); params.x = x; params.y = y; page.channel.mouseClick(params, NO_TIMEOUT); @@ -65,22 +55,13 @@ private void dblclickImpl(double x, double y, DblclickOptions options) { @Override public void down(DownOptions options) { - PageMouseDownParams params = convertType(options, PageMouseDownParams.class); - if (params == null) { - params = new PageMouseDownParams(); - } - if (options != null) { - params.button = toProtocol(options.button); - } + PageMouseDownParams params = toProtocol(options, PageMouseDownParams.class); page.channel.mouseDown(params, NO_TIMEOUT); } @Override public void move(double x, double y, MoveOptions options) { - PageMouseMoveParams params = convertType(options, PageMouseMoveParams.class); - if (params == null) { - params = new PageMouseMoveParams(); - } + PageMouseMoveParams params = toProtocol(options, PageMouseMoveParams.class); params.x = x; params.y = y; page.channel.mouseMove(params, NO_TIMEOUT); @@ -88,13 +69,7 @@ public void move(double x, double y, MoveOptions options) { @Override public void up(UpOptions options) { - PageMouseUpParams params = convertType(options, PageMouseUpParams.class); - if (params == null) { - params = new PageMouseUpParams(); - } - if (options != null) { - params.button = toProtocol(options.button); - } + PageMouseUpParams params = toProtocol(options, PageMouseUpParams.class); page.channel.mouseUp(params, NO_TIMEOUT); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index ea6c0ba8d..44b75aae9 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -73,8 +73,7 @@ static T convertType(F f, Class t) { try { Field fromField = f.getClass().getDeclaredField(toField.getName()); Object value = fromField.get(f); - // Fields of a different type (e.g. an options enum vs a protocol string) are set by the caller. - if (value != null && toField.getType().isInstance(value)) { + if (value != null) { toField.set(result, value); } } catch (NoSuchFieldException e) { @@ -87,6 +86,18 @@ static T convertType(F f, Class t) { } } + /** Copies public API options into a generated protocol params class with the same Gson that serializes them on the wire. */ + static T toProtocol(Object options, Class paramsClass) { + if (options == null) { + try { + return paramsClass.getDeclaredConstructor().newInstance(); + } catch (Exception e) { + throw new PlaywrightException("Internal error", e); + } + } + return Serialization.gson().fromJson(Serialization.gson().toJsonTree(options), paramsClass); + } + public static T clone(T f) { if (f == null) { return f; From db2eaf360aa9635f3c1006308718e057d0587e07 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:45:28 -0800 Subject: [PATCH 05/33] refactor(protocol): give every channel owner a typed channel field Each ChannelOwner subclass now holds the generated Channel for its protocol interface, so the per-class migrations to typed params can proceed independently without touching each other's files. --- .../com/microsoft/playwright/impl/APIRequestContextImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/ArtifactImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/BindingCall.java | 2 ++ .../java/com/microsoft/playwright/impl/BrowserContextImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/BrowserImpl.java | 2 ++ .../java/com/microsoft/playwright/impl/BrowserTypeImpl.java | 2 ++ .../java/com/microsoft/playwright/impl/CDPSessionImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/DebuggerImpl.java | 2 ++ .../java/com/microsoft/playwright/impl/DisposableObject.java | 2 ++ .../java/com/microsoft/playwright/impl/ElementHandleImpl.java | 3 +++ .../src/main/java/com/microsoft/playwright/impl/FrameImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/JSHandleImpl.java | 2 ++ .../src/main/java/com/microsoft/playwright/impl/JsonPipe.java | 2 ++ .../main/java/com/microsoft/playwright/impl/LocalUtils.java | 2 ++ .../java/com/microsoft/playwright/impl/PlaywrightImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/RequestImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/ResponseImpl.java | 2 ++ .../src/main/java/com/microsoft/playwright/impl/RouteImpl.java | 2 ++ .../src/main/java/com/microsoft/playwright/impl/Stream.java | 2 ++ .../main/java/com/microsoft/playwright/impl/TracingImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/WebSocketImpl.java | 2 ++ .../java/com/microsoft/playwright/impl/WebSocketRouteImpl.java | 2 ++ .../main/java/com/microsoft/playwright/impl/WorkerImpl.java | 2 ++ .../java/com/microsoft/playwright/impl/WritableStream.java | 2 ++ 24 files changed, 49 insertions(+) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java index dfd70bdbb..1fb0230fc 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java @@ -45,6 +45,8 @@ class APIRequestContextImpl extends ChannelOwner implements APIRequestContext { protected TimeoutSettings timeoutSettings = new TimeoutSettings(); + final APIRequestContextChannel channel = new APIRequestContextChannel(this); + APIRequestContextImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); this.tracing = connection.getExistingObject(initializer.getAsJsonObject("tracing").get("guid").getAsString()); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java index 142d8c44a..bfefdfd35 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java @@ -28,6 +28,8 @@ import static com.microsoft.playwright.impl.Utils.writeToFile; class ArtifactImpl extends ChannelOwner { + final ArtifactChannel channel = new ArtifactChannel(this); + public ArtifactImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java index 2b1a44e55..3bc2cc975 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java @@ -53,6 +53,8 @@ public Frame frame() { } } + final BindingCallChannel channel = new BindingCallChannel(this); + BindingCall(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 3a8f2e93e..5c829a7c8 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -90,6 +90,8 @@ enum EventType { RESPONSE, } + final BrowserContextChannel channel = new BrowserContextChannel(this); + BrowserContextImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); tracing = connection.getExistingObject(initializer.getAsJsonObject("tracing").get("guid").getAsString()); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java index d22716ad6..6177cfb3b 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java @@ -48,6 +48,8 @@ enum EventType { DISCONNECTED, } + final ProtocolBrowserChannel channel = new ProtocolBrowserChannel(this); + BrowserImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index f5dd7d7a3..dc6bf02a9 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -36,6 +36,8 @@ class BrowserTypeImpl extends ChannelOwner implements BrowserType { protected PlaywrightImpl playwright; + final BrowserTypeChannel channel = new BrowserTypeChannel(this); + BrowserTypeImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java index ad6bf77aa..714254106 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java @@ -31,6 +31,8 @@ enum EventType { CLOSE, } + final CDPSessionChannel channel = new CDPSessionChannel(this); + protected CDPSessionImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java index 4bad327d1..9ced3f973 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java @@ -30,6 +30,8 @@ class DebuggerImpl extends ChannelOwner implements Debugger { private final List pausedStateChangedHandlers = new ArrayList<>(); private DebuggerPausedDetails pausedDetails; + final DebuggerChannel channel = new DebuggerChannel(this); + DebuggerImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java index b4e16db10..2aa1c8421 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java @@ -19,6 +19,8 @@ import com.google.gson.JsonObject; class DisposableObject extends ChannelOwner implements AutoCloseable { + final DisposableChannel channel = new DisposableChannel(this); + DisposableObject(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java index 53e7fe729..b97a2ab5a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java @@ -40,6 +40,9 @@ public class ElementHandleImpl extends JSHandleImpl implements ElementHandle { private final FrameImpl frame; + // Hides JSHandleImpl.channel on purpose: upstream ElementHandle narrows the type of _channel the same way. + final ElementHandleChannel channel = new ElementHandleChannel(this); + ElementHandleImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); this.frame = (FrameImpl)parent; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index dbf4cd77c..326965ac0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java @@ -49,6 +49,8 @@ enum InternalEventType { NAVIGATED, LOADSTATE } boolean isDetached; private final WebMCPImpl webmcp = new WebMCPImpl(this); + final FrameChannel channel = new FrameChannel(this); + FrameImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java index 1baeda857..20ac0d8a7 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java @@ -29,6 +29,8 @@ public class JSHandleImpl extends ChannelOwner implements JSHandle { private String preview; + final JSHandleChannel channel = new JSHandleChannel(this); + public JSHandleImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); this.preview = initializer.get("preview").getAsString(); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java index cd0090576..5d869045d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java @@ -35,6 +35,8 @@ private enum EventType { CLOSE } private boolean isClosed; private String closeReason = "Browser has been closed"; + final JsonPipeChannel channel = new JsonPipeChannel(this); + JsonPipe(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java index 782089aad..abea79bb0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java @@ -26,6 +26,8 @@ import static com.microsoft.playwright.impl.Serialization.gson; public class LocalUtils extends ChannelOwner { + final LocalUtilsChannel channel = new LocalUtilsChannel(this); + LocalUtils(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java index 41ea49a3d..f6eaab61f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java @@ -66,6 +66,8 @@ public static PlaywrightImpl createImpl(CreateOptions options, boolean forceNewD private final APIRequestImpl apiRequest; protected SelectorsImpl selectors; + final PlaywrightChannel channel = new PlaywrightChannel(this); + PlaywrightImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); chromium = parent.connection.getExistingObject(initializer.getAsJsonObject("chromium").get("guid").getAsString()); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java index 1d33a08b6..72eade29d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java @@ -52,6 +52,8 @@ static class FallbackOverrides { Map headers; } + final RequestChannel channel = new RequestChannel(this); + RequestImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java index b2f73fcf1..2b15a07bf 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java @@ -38,6 +38,8 @@ public class ResponseImpl extends ChannelOwner implements Response { private RawHeaders rawHeaders; final RequestImpl request; + final ResponseChannel channel = new ResponseChannel(this); + ResponseImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); headers = new RawHeaders(asList(gson().fromJson(initializer.getAsJsonArray("headers"), HttpHeader[].class))); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java index efa924c48..f4ebcf229 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java @@ -36,6 +36,8 @@ public class RouteImpl extends ChannelOwner implements Route { boolean fallbackCalled; boolean shouldResumeIfFallbackIsCalled; + final RouteChannel channel = new RouteChannel(this); + public RouteImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); request = connection.getExistingObject(initializer.getAsJsonObject("request").get("guid").getAsString()); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java index cfb94401a..131f25a8e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java @@ -24,6 +24,8 @@ public class Stream extends ChannelOwner { private final InputStream stream = new InputStreamImpl(); + final StreamChannel channel = new StreamChannel(this); + public Stream(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java index b2130f897..5e5d5967d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java @@ -55,6 +55,8 @@ static class HarRecorder { } + final TracingChannel channel = new TracingChannel(this); + TracingImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java index 130a5e505..000daee5d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java @@ -38,6 +38,8 @@ enum EventType { SOCKETERROR, } + final WebSocketChannel channel = new WebSocketChannel(this); + WebSocketImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); page = (PageImpl) parent; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java index e8664c9d1..cc755be31 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java @@ -75,6 +75,8 @@ public List protocols() { } }; + final WebSocketRouteChannel channel = new WebSocketRouteChannel(this); + WebSocketRouteImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java index e4940b1d1..3e2d1ee3f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java @@ -39,6 +39,8 @@ enum EventType { CONSOLE, } + final WorkerChannel channel = new WorkerChannel(this); + WorkerImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java index 5c5164ebc..5cb2adc90 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java @@ -25,6 +25,8 @@ import java.util.Base64; class WritableStream extends ChannelOwner { + final WritableStreamChannel channel = new WritableStreamChannel(this); + WritableStream(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } From ea99a6a8a3078df0661d0bc75dc968f9dd5b46bd Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:53:32 -0800 Subject: [PATCH 06/33] refactor(impl): use generated channel types in ArtifactImpl, Stream, WritableStream, WorkerImpl, CDPSessionImpl --- .../playwright/impl/ArtifactImpl.java | 26 +++++++------------ .../playwright/impl/CDPSessionImpl.java | 14 +++++----- .../com/microsoft/playwright/impl/Stream.java | 13 ++++------ .../microsoft/playwright/impl/WorkerImpl.java | 19 ++++++-------- .../playwright/impl/WritableStream.java | 12 ++++----- 5 files changed, 33 insertions(+), 51 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java index bfefdfd35..23d9ba871 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java @@ -35,9 +35,7 @@ public ArtifactImpl(ChannelOwner parent, String type, String guid, JsonObject in } public InputStream createReadStream() { - JsonObject result = sendMessage("stream").getAsJsonObject(); - Stream stream = connection.getExistingObject(result.getAsJsonObject("stream").get("guid").getAsString()); - return stream.stream(); + return channel.stream(NO_TIMEOUT).stream.stream(); } byte[] readAllBytes() { @@ -55,39 +53,33 @@ byte[] readAllBytes() { } public void cancel() { - sendMessage("cancel"); + channel.cancel(NO_TIMEOUT); } public void delete() { - sendMessage("delete"); + channel.delete(NO_TIMEOUT); } public String failure() { - JsonObject result = sendMessage("failure").getAsJsonObject(); - if (result.has("error")) { - return result.get("error").getAsString(); - } - return null; + return channel.failure(NO_TIMEOUT).error; } public Path pathAfterFinished() { if (connection.isRemote) { throw new PlaywrightException("Path is not available when using browserType.connect(). Use download.saveAs() to save a local copy."); } - JsonObject json = sendMessage("pathAfterFinished").getAsJsonObject(); - return FileSystems.getDefault().getPath(json.get("value").getAsString()); + return FileSystems.getDefault().getPath(channel.pathAfterFinished(NO_TIMEOUT).value); } public void saveAs(Path path) { if (connection.isRemote) { - JsonObject jsonObject = sendMessage("saveAsStream").getAsJsonObject(); - Stream stream = connection.getExistingObject(jsonObject.getAsJsonObject("stream").get("guid").getAsString()); + Stream stream = channel.saveAsStream(NO_TIMEOUT).stream; writeToFile(stream.stream(), path); return; } - JsonObject params = new JsonObject(); - params.addProperty("path", path.toString()); - sendMessage("saveAs", params, NO_TIMEOUT); + ArtifactSaveAsParams params = new ArtifactSaveAsParams(); + params.path = path.toString(); + channel.saveAs(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java index 714254106..92f510a7f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java @@ -69,15 +69,13 @@ public JsonObject send(String method) { @Override public JsonObject send(String method, JsonObject params, SendOptions options) { - JsonObject args = new JsonObject(); - if (params != null) { - args.add("params", params); - } - args.addProperty("method", method); + CDPSessionSendParams args = new CDPSessionSendParams(); + args.params = params; + args.method = method; Double timeout = options == null || options.timeout == null ? Double.valueOf(0) : options.timeout; - JsonElement response = connection.sendMessage(guid, "send", args, timeout); + CDPSessionSendResult response = channel.send(args, timeout); if (response == null) return null; - else return response.getAsJsonObject().get("result").getAsJsonObject(); + else return response.result.getAsJsonObject(); } @Override @@ -92,6 +90,6 @@ public void off(String event, Consumer handler) { @Override public void detach() { - sendMessage("detach"); + channel.detach(NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java index 131f25a8e..ea2416719 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.io.InputStream; -import java.util.Base64; public class Stream extends ChannelOwner { private final InputStream stream = new InputStreamImpl(); @@ -50,14 +49,12 @@ public int read(byte[] b, int off, int len) { if (len == 0) { return 0; } - JsonObject params = new JsonObject(); - params.addProperty("size", len); - JsonObject json = sendMessage("read", params, NO_TIMEOUT).getAsJsonObject(); - String encoded = json.get("binary").getAsString(); - if (encoded.isEmpty()) { + StreamReadParams params = new StreamReadParams(); + params.size = len; + byte[] buffer = channel.read(params, NO_TIMEOUT).binary; + if (buffer.length == 0) { return -1; } - byte[] buffer = Base64.getDecoder().decode(encoded); for (int i = 0; i < buffer.length;) { b[off++] = buffer[i++]; } @@ -67,7 +64,7 @@ public int read(byte[] b, int off, int len) { @Override public void close() throws IOException { super.close(); - sendMessage("close"); + channel.close(NO_TIMEOUT); } } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java index 3e2d1ee3f..cf543254b 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java @@ -99,21 +99,18 @@ private Worker waitForCloseImpl(WaitForCloseOptions options, Runnable code) { @Override public Object evaluate(String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpression", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + WorkerEvaluateExpressionParams params = new WorkerEvaluateExpressionParams(); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evaluateExpression(params, NO_TIMEOUT).value); } @Override public JSHandle evaluateHandle(String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpressionHandle", params, NO_TIMEOUT); - return connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("handle").get("guid").getAsString()); + WorkerEvaluateExpressionHandleParams params = new WorkerEvaluateExpressionHandleParams(); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return channel.evaluateExpressionHandle(params, NO_TIMEOUT).handle; } @Override diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java index 5cb2adc90..f4d5d8fe6 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java @@ -22,7 +22,7 @@ import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.util.Base64; +import java.util.Arrays; class WritableStream extends ChannelOwner { final WritableStreamChannel channel = new WritableStreamChannel(this); @@ -40,17 +40,15 @@ public void write(int b) throws IOException { @Override public void write(byte[] b, int off, int len) throws IOException { - JsonObject params = new JsonObject(); - ByteBuffer buffer = ByteBuffer.wrap(b, off, len); - ByteBuffer encoded = Base64.getEncoder().encode(buffer); - params.addProperty("binary", new String(encoded.array(), StandardCharsets.UTF_8)); - sendMessage("write", params, NO_TIMEOUT); + WritableStreamWriteParams params = new WritableStreamWriteParams(); + params.binary = Arrays.copyOfRange(b, off, off + len); + channel.write(params, NO_TIMEOUT); } @Override public void close() throws IOException { super.close(); - sendMessage("close"); + channel.close(NO_TIMEOUT); } }; } From 18f56bf5bd7e143381cd1c6dd403715893d71edc Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:51:12 -0800 Subject: [PATCH 07/33] refactor(network): use generated channel types in RequestImpl, ResponseImpl --- .../playwright/impl/RequestImpl.java | 28 ++++++++----- .../playwright/impl/ResponseImpl.java | 42 ++++++++++++------- 2 files changed, 46 insertions(+), 24 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java index 72eade29d..837a90263 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java @@ -25,11 +25,13 @@ import com.microsoft.playwright.options.Timing; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.Base64; import java.util.List; import java.util.Map; import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; import static com.microsoft.playwright.impl.Utils.toHeadersMap; import static java.util.Arrays.asList; @@ -160,11 +162,7 @@ public String resourceType() { @Override public ResponseImpl response() { - JsonObject result = sendMessage("response").getAsJsonObject(); - if (!result.has("response")) { - return null; - } - return connection.getExistingObject(result.getAsJsonObject("response").get("guid").getAsString()); + return channel.response(NO_TIMEOUT).response; } @Override @@ -173,8 +171,13 @@ public Sizes sizes() { if (response == null) { throw new PlaywrightException("Unable to fetch sizes for failed request"); } - JsonObject json = response.sendMessage("sizes").getAsJsonObject(); - return gson().fromJson(json.getAsJsonObject("sizes"), Sizes.class); + RequestSizes s = response.channel.sizes(NO_TIMEOUT).sizes; + Sizes result = new Sizes(); + result.requestBodySize = s.requestBodySize; + result.requestHeadersSize = s.requestHeadersSize; + result.responseBodySize = s.responseBodySize; + result.responseHeadersSize = s.responseHeadersSize; + return result; } @Override @@ -201,11 +204,16 @@ private RawHeaders getRawHeaders() { if (rawHeaders != null) { return rawHeaders; } - JsonObject result = sendMessage("rawRequestHeaders").getAsJsonObject(); - JsonArray rawHeadersJson = result.getAsJsonArray("headers"); + List headers = new ArrayList<>(); + for (NameValue nv : channel.rawRequestHeaders(NO_TIMEOUT).headers) { + HttpHeader h = new HttpHeader(); + h.name = nv.name; + h.value = nv.value; + headers.add(h); + } // The field may have been initialized in a nested call but it is ok. - rawHeaders = new RawHeaders(asList(gson().fromJson(rawHeadersJson, HttpHeader[].class))); + rawHeaders = new RawHeaders(headers); return rawHeaders; } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java index 2b15a07bf..3c985448f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java @@ -31,6 +31,7 @@ import java.util.Map; import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; import static java.util.Arrays.asList; public class ResponseImpl extends ChannelOwner implements Response { @@ -55,8 +56,7 @@ public Map allHeaders() { @Override public byte[] body() { - JsonObject json = sendMessage("body").getAsJsonObject(); - return Base64.getDecoder().decode(json.get("binary").getAsString()); + return channel.body(NO_TIMEOUT).binary; } @Override @@ -91,8 +91,7 @@ public boolean fromServiceWorker() { @Override public String httpVersion() { - JsonObject result = sendMessage("httpVersion").getAsJsonObject(); - return result.get("value").getAsString(); + return channel.httpVersion(NO_TIMEOUT).value; } @Override @@ -127,20 +126,29 @@ public RequestImpl request() { @Override public SecurityDetails securityDetails() { - JsonObject json = sendMessage("securityDetails").getAsJsonObject(); - if (json.has("value")) { - return gson().fromJson(json.get("value"), SecurityDetails.class); + ProtocolSecurityDetails value = channel.securityDetails(NO_TIMEOUT).value; + if (value == null) { + return null; } - return null; + SecurityDetails result = new SecurityDetails(); + result.issuer = value.issuer; + result.protocol = value.protocol; + result.subjectName = value.subjectName; + result.validFrom = value.validFrom; + result.validTo = value.validTo; + return result; } @Override public ServerAddr serverAddr() { - JsonObject json = sendMessage("serverAddr").getAsJsonObject(); - if (json.has("value")) { - return gson().fromJson(json.get("value"), ServerAddr.class); + RemoteAddr value = channel.serverAddr(NO_TIMEOUT).value; + if (value == null) { + return null; } - return null; + ServerAddr result = new ServerAddr(); + result.ipAddress = value.ipAddress; + result.port = value.port; + return result; } @Override @@ -165,8 +173,14 @@ public String url() { private RawHeaders getRawHeaders() { if (rawHeaders == null) { - JsonObject json = sendMessage("rawResponseHeaders").getAsJsonObject(); - rawHeaders = new RawHeaders(asList(gson().fromJson(json.getAsJsonArray("headers"), HttpHeader[].class))); + List headers = new ArrayList<>(); + for (NameValue nv : channel.rawResponseHeaders(NO_TIMEOUT).headers) { + HttpHeader h = new HttpHeader(); + h.name = nv.name; + h.value = nv.value; + headers.add(h); + } + rawHeaders = new RawHeaders(headers); } return rawHeaders; } From 4f51c4101d5973e710df538db6c13d530d4d956b Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:52:14 -0800 Subject: [PATCH 08/33] refactor(network): use generated channel types in RouteImpl, WebSocketRouteImpl, APIResponseImpl --- .../playwright/impl/APIResponseImpl.java | 24 +++-- .../microsoft/playwright/impl/RouteImpl.java | 67 ++++++++------ .../playwright/impl/WebSocketRouteImpl.java | 88 ++++++++++--------- 3 files changed, 95 insertions(+), 84 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java index 21f96b2cb..0f64982f4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java @@ -50,13 +50,13 @@ class APIResponseImpl implements APIResponse { @Override public byte[] body() { try { - JsonObject params = new JsonObject(); - params.addProperty("fetchUid", fetchUid()); - JsonObject json = context.sendMessage("fetchResponseBody", params, NO_TIMEOUT).getAsJsonObject(); - if (!json.has("binary")) { + APIRequestContextFetchResponseBodyParams params = new APIRequestContextFetchResponseBodyParams(); + params.fetchUid = fetchUid(); + APIRequestContextFetchResponseBodyResult result = context.channel.fetchResponseBody(params, NO_TIMEOUT); + if (result.binary == null) { throw new PlaywrightException("Response has been disposed"); } - return Base64.getDecoder().decode(json.get("binary").getAsString()); + return result.binary; } catch (PlaywrightException e) { if (isSafeCloseError(e)) { throw new PlaywrightException("Response has been disposed"); @@ -67,9 +67,9 @@ public byte[] body() { @Override public void dispose() { - JsonObject params = new JsonObject(); - params.addProperty("fetchUid", fetchUid()); - context.sendMessage("disposeAPIResponse", params, NO_TIMEOUT); + APIRequestContextDisposeAPIResponseParams params = new APIRequestContextDisposeAPIResponseParams(); + params.fetchUid = fetchUid(); + context.channel.disposeAPIResponse(params, NO_TIMEOUT); } @Override @@ -149,11 +149,9 @@ String fetchUid() { } List fetchLog() { - JsonObject params = new JsonObject(); - params.addProperty("fetchUid", fetchUid()); - JsonObject json = context.sendMessage("fetchLog", params, NO_TIMEOUT).getAsJsonObject(); - JsonArray log = json.get("log").getAsJsonArray(); - return gson().fromJson(log, new TypeToken>() {}.getType()); + APIRequestContextFetchLogParams params = new APIRequestContextFetchLogParams(); + params.fetchUid = fetchUid(); + return context.channel.fetchLog(params, NO_TIMEOUT).log; } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java index f4ebcf229..8bc0e61b9 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java @@ -23,8 +23,10 @@ import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; +import java.util.ArrayList; import java.util.Base64; import java.util.LinkedHashMap; +import java.util.List; import java.util.Map; import static com.microsoft.playwright.impl.Utils.convertType; @@ -46,9 +48,9 @@ public RouteImpl(ChannelOwner parent, String type, String guid, JsonObject initi @Override public void abort(String errorCode) { startHandling(); - JsonObject params = new JsonObject(); - params.addProperty("errorCode", errorCode); - sendMessageAsync("abort", params); + RouteAbortParams params = new RouteAbortParams(); + params.errorCode = errorCode; + sendMessageAsync("abort", toJson(params)); } boolean isHandled() { @@ -118,24 +120,35 @@ private void applyOverrides(FallbackOptions options) { } private void resumeImpl(RequestImpl.FallbackOverrides options, boolean isFallback) { - JsonObject params = new JsonObject(); + RouteContinueParams params = new RouteContinueParams(); if (options != null) { - if (options.url != null) { - params.addProperty("url", options.url); - } - if (options.method != null) { - params.addProperty("method", options.method); - } + params.url = options.url; + params.method = options.method; if (options.headers != null) { - params.add("headers", Serialization.toProtocol(options.headers)); + params.headers = toNameValues(options.headers); } - if (options.postData != null) { - String base64 = Base64.getEncoder().encodeToString(options.postData); - params.addProperty("postData", base64); + params.postData = options.postData; + } + params.isFallback = isFallback; + sendMessageAsync("continue", toJson(params)); + } + + private JsonObject toJson(Object params) { + return connection.protocolGson().toJsonTree(params).getAsJsonObject(); + } + + private static List toNameValues(Map map) { + List result = new ArrayList<>(); + for (Map.Entry e : map.entrySet()) { + if (e.getValue() == null) { + throw new PlaywrightException("Value cannot be null"); } + NameValue nv = new NameValue(); + nv.name = e.getKey(); + nv.value = e.getValue(); + result.add(nv); } - params.addProperty("isFallback", isFallback); - sendMessageAsync("continue", params); + return result; } private static byte[] getPostDataBytes(Object postData) { @@ -221,15 +234,13 @@ private void fulfillImpl(FulfillOptions options) { if (length != 0 && !headers.containsKey("content-length")) { headers.put("content-length", Integer.toString(length)); } - JsonObject params = new JsonObject(); - params.addProperty("status", status); - params.add("headers", Serialization.toProtocol(headers)); - params.addProperty("isBase64", isBase64); - params.addProperty("body", body); - if (fetchResponseUid != null) { - params.addProperty("fetchResponseUid", fetchResponseUid); - } - sendMessageAsync("fulfill", params); + RouteFulfillParams params = new RouteFulfillParams(); + params.status = status; + params.headers = toNameValues(headers); + params.isBase64 = isBase64; + params.body = body; + params.fetchResponseUid = fetchResponseUid; + sendMessageAsync("fulfill", toJson(params)); } @Override @@ -239,10 +250,10 @@ public RequestImpl request() { void redirectNavigationRequest(String redirectURL) { startHandling(); - JsonObject params = new JsonObject(); - params.addProperty("url", redirectURL); + RouteRedirectNavigationRequestParams params = new RouteRedirectNavigationRequestParams(); + params.url = redirectURL; // TODO: _raceWithPageClose ? - sendMessageAsync("redirectNavigationRequest", params); + sendMessageAsync("redirectNavigationRequest", toJson(params)); } private void startHandling() { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java index cc755be31..fa4fb42f5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java @@ -12,7 +12,7 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; -import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.toProtocol; class WebSocketRouteImpl extends ChannelOwner implements WebSocketRoute { @@ -27,9 +27,9 @@ public void close(CloseOptions options) { if (options == null) { options = new CloseOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("wasClean", true); - sendMessageAsync("closeServer", params); + WebSocketRouteCloseServerParams params = toProtocol(options, WebSocketRouteCloseServerParams.class); + params.wasClean = true; + sendMessageAsync("closeServer", toJson(params)); } @Override @@ -49,19 +49,18 @@ public void onMessage(Consumer handler) { @Override public void send(String message) { - JsonObject params = new JsonObject(); - params.addProperty("message", message); - params.addProperty("isBase64", false); - sendMessageAsync("sendToServer", params); + WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); + params.message = message; + params.isBase64 = false; + sendMessageAsync("sendToServer", toJson(params)); } @Override public void send(byte[] message) { - JsonObject params = new JsonObject(); - String base64 = Base64.getEncoder().encodeToString(message); - params.addProperty("message", base64); - params.addProperty("isBase64", true); - sendMessageAsync("sendToServer", params); + WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); + params.message = Base64.getEncoder().encodeToString(message); + params.isBase64 = true; + sendMessageAsync("sendToServer", toJson(params)); } @Override @@ -86,9 +85,9 @@ public void close(CloseOptions options) { if (options == null) { options = new CloseOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("wasClean", true); - sendMessageAsync("closePage", params); + WebSocketRouteClosePageParams params = toProtocol(options, WebSocketRouteClosePageParams.class); + params.wasClean = true; + sendMessageAsync("closePage", toJson(params)); } @Override @@ -113,19 +112,18 @@ public void onMessage(Consumer handler) { @Override public void send(String message) { - JsonObject params = new JsonObject(); - params.addProperty("message", message); - params.addProperty("isBase64", false); - sendMessageAsync("sendToPage", params); + WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); + params.message = message; + params.isBase64 = false; + sendMessageAsync("sendToPage", toJson(params)); } @Override public void send(byte[] message) { - JsonObject params = new JsonObject(); - String base64 = Base64.getEncoder().encodeToString(message); - params.addProperty("message", base64); - params.addProperty("isBase64", true); - sendMessageAsync("sendToPage", params); + WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); + params.message = Base64.getEncoder().encodeToString(message); + params.isBase64 = true; + sendMessageAsync("sendToPage", toJson(params)); } @Override @@ -149,6 +147,10 @@ private List readProtocols() { return result; } + private JsonObject toJson(Object params) { + return connection.protocolGson().toJsonTree(params).getAsJsonObject(); + } + void afterHandle() { if (this.connected) { return; @@ -169,10 +171,10 @@ protected void handleEvent(String event, JsonObject params) { if (onPageMessage != null) { onPageMessage.accept(new WebSocketFrameImpl(message, isBase64)); } else if (connected) { - JsonObject messageParams = new JsonObject(); - messageParams.addProperty("message", message); - messageParams.addProperty("isBase64", isBase64); - sendMessageAsync("sendToServer", messageParams); + WebSocketRouteSendToServerParams messageParams = new WebSocketRouteSendToServerParams(); + messageParams.message = message; + messageParams.isBase64 = isBase64; + sendMessageAsync("sendToServer", toJson(messageParams)); } } else if ("messageFromServer".equals(event)) { String message = params.get("message").getAsString(); @@ -180,10 +182,10 @@ protected void handleEvent(String event, JsonObject params) { if (onServerMessage != null) { onServerMessage.accept(new WebSocketFrameImpl(message, isBase64)); } else { - JsonObject messageParams = new JsonObject(); - messageParams.addProperty("message", message); - messageParams.addProperty("isBase64", isBase64); - sendMessageAsync("sendToPage", messageParams); + WebSocketRouteSendToPageParams messageParams = new WebSocketRouteSendToPageParams(); + messageParams.message = message; + messageParams.isBase64 = isBase64; + sendMessageAsync("sendToPage", toJson(messageParams)); } } else if ("closePage".equals(event)) { Integer code = params.has("code") ? params.get("code").getAsInt() : null; @@ -192,11 +194,11 @@ protected void handleEvent(String event, JsonObject params) { if (onPageClose != null) { onPageClose.accept(code, reason); } else { - JsonObject closeParams = new JsonObject(); - closeParams.addProperty("code", code); - closeParams.addProperty("reason", reason); - closeParams.addProperty("wasClean", wasClean); - sendMessageAsync("closeServer", closeParams); + WebSocketRouteCloseServerParams closeParams = new WebSocketRouteCloseServerParams(); + closeParams.code = code; + closeParams.reason = reason; + closeParams.wasClean = wasClean; + sendMessageAsync("closeServer", toJson(closeParams)); } } else if ("closeServer".equals(event)) { Integer code = params.has("code") ? params.get("code").getAsInt() : null; @@ -205,11 +207,11 @@ protected void handleEvent(String event, JsonObject params) { if (onServerClose != null) { onServerClose.accept(code, reason); } else { - JsonObject closeParams = new JsonObject(); - closeParams.addProperty("code", code); - closeParams.addProperty("reason", reason); - closeParams.addProperty("wasClean", wasClean); - sendMessageAsync("closePage", closeParams); + WebSocketRouteClosePageParams closeParams = new WebSocketRouteClosePageParams(); + closeParams.code = code; + closeParams.reason = reason; + closeParams.wasClean = wasClean; + sendMessageAsync("closePage", toJson(closeParams)); } } } From 92c2c0c9a1ebca51227d1720e5ab51b9526f5276 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:52:28 -0800 Subject: [PATCH 09/33] refactor(page): use generated channel types for close, requests, console and page errors --- .../microsoft/playwright/impl/PageImpl.java | 57 +++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index 7b4f7ddfc..2d9c4607c 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -579,13 +579,11 @@ public void close(CloseOptions options) { if (ownedContext != null) { ownedContext.close(); } else if (options.runBeforeUnload != null && options.runBeforeUnload) { - sendMessage("runBeforeUnload", new JsonObject(), NO_TIMEOUT); + channel.runBeforeUnload(NO_TIMEOUT); } else { - JsonObject params = new JsonObject(); - if (options.reason != null) { - params.addProperty("reason", options.reason); - } - sendMessage("close", params, NO_TIMEOUT); + PageCloseParams params = new PageCloseParams(); + params.reason = options.reason; + channel.close(params, NO_TIMEOUT); } } catch (PlaywrightException exception) { if (isSafeCloseError(exception) && (options.runBeforeUnload == null || !options.runBeforeUnload)) { @@ -608,13 +606,8 @@ public List querySelectorAll(String selector) { @Override public List requests() { - JsonObject json = sendMessage("requests", new JsonObject(), NO_TIMEOUT).getAsJsonObject(); - JsonArray requests = json.getAsJsonArray("requests"); - List result = new ArrayList<>(); - for (JsonElement item : requests) { - result.add(connection.getExistingObject(item.getAsJsonObject().get("guid").getAsString())); - } - return result; + PageRequestsResult json = channel.requests(NO_TIMEOUT); + return new ArrayList(json.requests); } @Override @@ -728,7 +721,7 @@ public ElementHandle addStyleTag(AddStyleTagOptions options) { @Override public void bringToFront() { - sendMessage("bringToFront"); + channel.bringToFront(NO_TIMEOUT); } @Override @@ -974,7 +967,7 @@ Response goForwardImpl(GoForwardOptions options) { @Override public void requestGC() { - sendMessage("requestGC"); + channel.requestGC(NO_TIMEOUT); } @Override @@ -1052,33 +1045,37 @@ public Keyboard keyboard() { @Override public List consoleMessages(ConsoleMessagesOptions options) { - JsonObject params = options != null ? gson().toJsonTree(options).getAsJsonObject() : new JsonObject(); - JsonObject json = sendMessage("consoleMessages", params, NO_TIMEOUT).getAsJsonObject(); - JsonArray messages = json.getAsJsonArray("messages"); + PageConsoleMessagesParams params = toProtocol(options, PageConsoleMessagesParams.class); + PageConsoleMessagesResult json = channel.consoleMessages(params, NO_TIMEOUT); List result = new ArrayList<>(); - for (JsonElement item : messages) { - result.add(new ConsoleMessageImpl(connection, item.getAsJsonObject(), this, null)); + for (PageConsoleMessagesResult.PageConsoleMessagesResultMessages item : json.messages) { + result.add(new ConsoleMessageImpl(connection, connection.protocolGson().toJsonTree(item).getAsJsonObject(), this, null)); } return result; } @Override public void clearConsoleMessages() { - sendMessage("clearConsoleMessages", new JsonObject(), NO_TIMEOUT); + channel.clearConsoleMessages(NO_TIMEOUT); } @Override public void clearPageErrors() { - sendMessage("clearPageErrors", new JsonObject(), NO_TIMEOUT); + channel.clearPageErrors(NO_TIMEOUT); } @Override public List pageErrors() { - JsonObject json = sendMessage("pageErrors", new JsonObject(), NO_TIMEOUT).getAsJsonObject(); - JsonArray errors = json.getAsJsonArray("errors"); + PagePageErrorsResult json = channel.pageErrors(new PagePageErrorsParams(), NO_TIMEOUT); List result = new ArrayList<>(); - for (JsonElement item : errors) { - String errorStr = parseError(item.getAsJsonObject()); + for (com.microsoft.playwright.impl.SerializedError item : json.errors) { + String errorStr = ""; + if (item.error != null) { + errorStr = item.error.name + ": " + item.error.message; + if (item.error.stack != null && !item.error.stack.isEmpty()) { + errorStr += "\n" + item.error.stack; + } + } result.add(errorStr); } return result; @@ -1101,7 +1098,7 @@ public WebMCP webmcp() { @Override public void hideHighlight() { - sendMessage("hideHighlight", new JsonObject(), NO_TIMEOUT); + channel.hideHighlight(NO_TIMEOUT); } @Override @@ -1119,13 +1116,13 @@ public PageImpl opener() { @Override public void cancelPickLocator() { - sendMessage("cancelPickLocator", new JsonObject(), NO_TIMEOUT); + channel.cancelPickLocator(NO_TIMEOUT); } @Override public Locator pickLocator() { - JsonObject result = sendMessage("pickLocator", new JsonObject(), NO_TIMEOUT).getAsJsonObject(); - return new LocatorImpl(mainFrame, result.get("selector").getAsString(), null); + PagePickLocatorResult result = channel.pickLocator(NO_TIMEOUT); + return new LocatorImpl(mainFrame, result.selector, null); } @Override From 2c6a335d465a3e6d94b6a054a41821e720984ee7 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:52:41 -0800 Subject: [PATCH 10/33] refactor(page): use generated channel types for locator handlers, init scripts and bindings --- .../microsoft/playwright/impl/PageImpl.java | 44 +++++++++---------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index 2d9c4607c..87317215a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -623,14 +623,13 @@ public void addLocatorHandler(Locator locator, Consumer handler, AddLoc return; } AddLocatorHandlerOptions finalOptions = options; - JsonObject params = new JsonObject(); - params.addProperty("selector", locatorImpl.selector); + PageRegisterLocatorHandlerParams params = new PageRegisterLocatorHandlerParams(); + params.selector = locatorImpl.selector; if (finalOptions.noWaitAfter != null && finalOptions.noWaitAfter) { - params.addProperty("noWaitAfter", true); + params.noWaitAfter = true; } - params.addProperty("selector", locatorImpl.selector); - JsonObject json = (JsonObject) sendMessage("registerLocatorHandler", params, NO_TIMEOUT); - int uid = json.get("uid").getAsInt(); + PageRegisterLocatorHandlerResult json = channel.registerLocatorHandler(params, NO_TIMEOUT); + int uid = json.uid; locatorHandlers.put(uid, new LocatorHandler(locator, handler, finalOptions.times)); } @@ -639,10 +638,10 @@ public void removeLocatorHandler(Locator locator) { for (Map.Entry entry: locatorHandlers.entrySet()) { if (entry.getValue().locator.equals(locator)) { locatorHandlers.remove(locator); - JsonObject params = new JsonObject(); - params.addProperty("uid", entry.getKey()); + PageUnregisterLocatorHandlerParams params = new PageUnregisterLocatorHandlerParams(); + params.uid = entry.getKey(); try { - sendMessage("unregisterLocatorHandler", params, NO_TIMEOUT); + channel.unregisterLocatorHandler(params, NO_TIMEOUT); } catch (PlaywrightException e) { } } @@ -658,10 +657,10 @@ private void onLocatorHandlerTriggered(int uid) { if (remove) { locatorHandlers.remove(uid); } - JsonObject params = new JsonObject(); - params.addProperty("uid", uid); - params.addProperty("remove", remove); - sendMessageAsync("resolveLocatorHandlerNoReply", params); + PageResolveLocatorHandlerNoReplyParams params = new PageResolveLocatorHandlerNoReplyParams(); + params.uid = uid; + params.remove = remove; + sendMessageAsync("resolveLocatorHandlerNoReply", connection.protocolGson().toJsonTree(params).getAsJsonObject()); } } @@ -670,9 +669,8 @@ public String ariaSnapshot(AriaSnapshotOptions options) { if (options == null) { options = new AriaSnapshotOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonObject result = mainFrame.sendMessage("ariaSnapshot", params, mainFrame.timeout(options.timeout)).getAsJsonObject(); - return result.get("snapshot").getAsString(); + FrameAriaSnapshotParams params = toProtocol(options, FrameAriaSnapshotParams.class); + return mainFrame.channel.ariaSnapshot(params, mainFrame.timeout(options.timeout)).snapshot; } @Override @@ -703,10 +701,9 @@ public AutoCloseable addInitScript(Path path) { } private AutoCloseable addInitScriptImpl(String script) { - JsonObject params = new JsonObject(); - params.addProperty("source", script); - JsonObject result = sendMessage("addInitScript", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("disposable").get("guid").getAsString()); + PageAddInitScriptParams params = new PageAddInitScriptParams(); + params.source = script; + return channel.addInitScript(params, NO_TIMEOUT).disposable; } @Override @@ -791,10 +788,9 @@ private AutoCloseable exposeBindingImpl(String name, BindingCallback playwrightB } bindings.put(name, playwrightBinding); - JsonObject params = new JsonObject(); - params.addProperty("name", name); - JsonObject result = sendMessage("exposeBinding", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("disposable").get("guid").getAsString()); + PageExposeBindingParams params = new PageExposeBindingParams(); + params.name = name; + return channel.exposeBinding(params, NO_TIMEOUT).disposable; } @Override From 181e61c8260d556d1e417c8293c14e1b45d2dffa Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:52:52 -0800 Subject: [PATCH 11/33] refactor(page): use generated channel types for navigation, screenshot, pdf, emulation and interception --- .../microsoft/playwright/impl/PageImpl.java | 70 ++++++++----------- 1 file changed, 28 insertions(+), 42 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index 87317215a..cb7ebf8ce 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -760,8 +760,8 @@ private void emulateMediaImpl(EmulateMediaOptions options) { if (options == null) { options = new EmulateMediaOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("emulateMedia", params, NO_TIMEOUT); + PageEmulateMediaParams params = toProtocol(options, PageEmulateMediaParams.class); + channel.emulateMedia(params, NO_TIMEOUT); } @Override @@ -936,12 +936,8 @@ Response goBackImpl(GoBackOptions options) { if (options == null) { options = new GoBackOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonObject json = sendMessage("goBack", params, timeoutSettings.navigationTimeout(options.timeout)).getAsJsonObject(); - if (json.has("response")) { - return connection.getExistingObject(json.getAsJsonObject("response").get("guid").getAsString()); - } - return null; + PageGoBackParams params = toProtocol(options, PageGoBackParams.class); + return channel.goBack(params, timeoutSettings.navigationTimeout(options.timeout)).response; } @Override @@ -953,12 +949,8 @@ Response goForwardImpl(GoForwardOptions options) { if (options == null) { options = new GoForwardOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonObject json = sendMessage("goForward", params, timeoutSettings.navigationTimeout(options.timeout)).getAsJsonObject(); - if (json.has("response")) { - return connection.getExistingObject(json.getAsJsonObject("response").get("guid").getAsString()); - } - return null; + PageGoForwardParams params = toProtocol(options, PageGoForwardParams.class); + return channel.goForward(params, timeoutSettings.navigationTimeout(options.timeout)).response; } @Override @@ -1145,10 +1137,8 @@ private byte[] pdfImpl(PdfOptions options) { if (options == null) { options = new PdfOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.remove("path"); - JsonObject json = sendMessage("pdf", params, NO_TIMEOUT).getAsJsonObject(); - byte[] buffer = Base64.getDecoder().decode(json.get("pdf").getAsString()); + PagePdfParams params = toProtocol(options, PagePdfParams.class); + byte[] buffer = channel.pdf(params, NO_TIMEOUT).pdf; if (options.path != null) { Utils.writeToFile(buffer, options.path); } @@ -1174,12 +1164,8 @@ private Response reloadImpl(ReloadOptions options) { if (options == null) { options = new ReloadOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonObject json = sendMessage("reload", params, timeoutSettings.navigationTimeout(options.timeout)).getAsJsonObject(); - if (json.has("response")) { - return connection.getExistingObject(json.getAsJsonObject("response").get("guid").getAsString()); - } - return null; + PageReloadParams params = toProtocol(options, PageReloadParams.class); + return channel.reload(params, timeoutSettings.navigationTimeout(options.timeout)).response; } @Override @@ -1275,11 +1261,8 @@ private byte[] screenshotImpl(ScreenshotOptions options) { if (options.type == null && options.path != null) { options.type = Utils.screenshotTypeForPath(options.path); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.remove("path"); - JsonObject json = sendMessage("screenshot", params, timeoutSettings.timeout(options.timeout)).getAsJsonObject(); - - byte[] buffer = Base64.getDecoder().decode(json.get("binary").getAsString()); + PageScreenshotParams params = toProtocol(options, PageScreenshotParams.class); + byte[] buffer = channel.screenshot(params, timeoutSettings.timeout(options.timeout)).binary; if (options.path != null) { Utils.writeToFile(buffer, options.path); } @@ -1318,16 +1301,15 @@ public void setDefaultTimeout(double timeout) { @Override public void setExtraHTTPHeaders(Map headers) { - JsonObject params = new JsonObject(); - JsonArray jsonHeaders = new JsonArray(); + PageSetExtraHTTPHeadersParams params = new PageSetExtraHTTPHeadersParams(); + params.headers = new ArrayList<>(); for (Map.Entry e : headers.entrySet()) { - JsonObject header = new JsonObject(); - header.addProperty("name", e.getKey()); - header.addProperty("value", e.getValue()); - jsonHeaders.add(header); + NameValue header = new NameValue(); + header.name = e.getKey(); + header.value = e.getValue(); + params.headers.add(header); } - params.add("headers", jsonHeaders); - sendMessage("setExtraHTTPHeaders", params, NO_TIMEOUT); + channel.setExtraHTTPHeaders(params, NO_TIMEOUT); } @Override @@ -1353,9 +1335,11 @@ public void setInputFiles(String selector, FilePayload[] files, SetInputFilesOpt @Override public void setViewportSize(int width, int height) { viewport = new ViewportSize(width, height); - JsonObject params = new JsonObject(); - params.add("viewportSize", gson().toJsonTree(viewport)); - sendMessage("setViewportSize", params, NO_TIMEOUT); + PageSetViewportSizeParams params = new PageSetViewportSizeParams(); + params.viewportSize = new PageSetViewportSizeParams.PageSetViewportSizeParamsViewportSize(); + params.viewportSize.width = width; + params.viewportSize.height = height; + channel.setViewportSize(params, NO_TIMEOUT); } @Override @@ -1430,11 +1414,13 @@ private void unroute(UrlMatcher matcher, Consumer handler) { } private void updateInterceptionPatterns() { - sendMessage("setNetworkInterceptionPatterns", routes.interceptionPatterns(), NO_TIMEOUT); + channel.setNetworkInterceptionPatterns( + connection.protocolGson().fromJson(routes.interceptionPatterns(), PageSetNetworkInterceptionPatternsParams.class), NO_TIMEOUT); } private void updateWebSocketInterceptionPatterns() { - sendMessage("setWebSocketInterceptionPatterns", webSocketRoutes.interceptionPatterns(), NO_TIMEOUT); + channel.setWebSocketInterceptionPatterns( + connection.protocolGson().fromJson(webSocketRoutes.interceptionPatterns(), PageSetWebSocketInterceptionPatternsParams.class), NO_TIMEOUT); } @Override From 8587e707760cd33d27080b1af0c19941f6a1003b Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:53:08 -0800 Subject: [PATCH 12/33] refactor(impl): use generated channel types in ClockImpl, WebStorageImpl, CredentialsImpl, ScreencastImpl, WebMCPImpl, SelectorsImpl, DebuggerImpl, BindingCall, JsonPipe, DisposableObject --- .../playwright/impl/BindingCall.java | 13 +- .../microsoft/playwright/impl/ClockImpl.java | 111 ++++++++---------- .../playwright/impl/CredentialsImpl.java | 24 ++-- .../playwright/impl/DebuggerImpl.java | 12 +- .../playwright/impl/DisposableObject.java | 2 +- .../microsoft/playwright/impl/JsonPipe.java | 8 +- .../playwright/impl/ScreencastImpl.java | 104 ++++++---------- .../playwright/impl/SelectorsImpl.java | 26 ++-- .../microsoft/playwright/impl/WebMCPImpl.java | 17 ++- .../playwright/impl/WebStorageImpl.java | 41 ++++--- 10 files changed, 161 insertions(+), 197 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java index 3bc2cc975..eb3c37464 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java @@ -65,16 +65,21 @@ String name() { void call(BindingCallback binding) { String method; - JsonObject params = new JsonObject(); + Object params; try { - params.add("result", gson().toJsonTree(serializeArgument(invoke(binding)))); + BindingCallResolveParams resolveParams = new BindingCallResolveParams(); + resolveParams.result = serializeArgument(invoke(binding)); + params = resolveParams; method = "resolve"; } catch (RuntimeException exception) { - params.add("error", gson().toJsonTree(serializeError(exception))); + BindingCallRejectParams rejectParams = new BindingCallRejectParams(); + rejectParams.error = serializeError(exception); + params = rejectParams; method = "reject"; } // Like the Node client, do not fail when the page was closed before the result arrived. - sendMessageAsync(method, params); + // java: there is no typed async send yet, so the typed params are converted to a JsonObject. + sendMessageAsync(method, connection.protocolGson().toJsonTree(params).getAsJsonObject()); } private Object invoke(BindingCallback binding) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java index 67d506cd3..9f4c4a545 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java @@ -1,6 +1,5 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.Clock; import java.util.Date; @@ -8,129 +7,121 @@ import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; class ClockImpl implements Clock { - private final ChannelOwner browserContext; + private final BrowserContextImpl browserContext; ClockImpl(BrowserContextImpl browserContext) { this.browserContext = browserContext; } - private void sendMessageWithLogging(String method, JsonObject params) { - String capitalizedMethod = method.substring(0, 1).toUpperCase() + method.substring(1); - browserContext.sendMessage("clock" + capitalizedMethod, params, NO_TIMEOUT); - } - @Override public void fastForward(long ticks) { - JsonObject params = new JsonObject(); - params.addProperty("ticksNumber", ticks); - sendMessageWithLogging("fastForward", params); + BrowserContextClockFastForwardParams params = new BrowserContextClockFastForwardParams(); + params.ticksNumber = (double) ticks; + browserContext.channel.clockFastForward(params, NO_TIMEOUT); } @Override public void fastForward(String ticks) { - JsonObject params = new JsonObject(); - params.addProperty("ticksString", ticks); - sendMessageWithLogging("fastForward", params); + BrowserContextClockFastForwardParams params = new BrowserContextClockFastForwardParams(); + params.ticksString = ticks; + browserContext.channel.clockFastForward(params, NO_TIMEOUT); } @Override public void install(InstallOptions options) { - JsonObject params = new JsonObject(); + BrowserContextClockInstallParams params = new BrowserContextClockInstallParams(); if (options != null) { - parseTime(options.time, params); + Object time = options.time; + if (time instanceof Long) { + params.timeNumber = (double) (Long) time; + } else if (time instanceof Date) { + params.timeNumber = (double) ((Date) time).getTime(); + } else if (time instanceof String) { + params.timeString = (String) time; + } } - sendMessageWithLogging("install", params); + browserContext.channel.clockInstall(params, NO_TIMEOUT); } @Override public void runFor(long ticks) { - JsonObject params = new JsonObject(); - params.addProperty("ticksNumber", ticks); - sendMessageWithLogging("runFor", params); + BrowserContextClockRunForParams params = new BrowserContextClockRunForParams(); + params.ticksNumber = (double) ticks; + browserContext.channel.clockRunFor(params, NO_TIMEOUT); } @Override public void runFor(String ticks) { - JsonObject params = new JsonObject(); - params.addProperty("ticksString", ticks); - sendMessageWithLogging("runFor", params); + BrowserContextClockRunForParams params = new BrowserContextClockRunForParams(); + params.ticksString = ticks; + browserContext.channel.clockRunFor(params, NO_TIMEOUT); } @Override public void pauseAt(long time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time); - sendMessageWithLogging("pauseAt", params); + BrowserContextClockPauseAtParams params = new BrowserContextClockPauseAtParams(); + params.timeNumber = (double) time; + browserContext.channel.clockPauseAt(params, NO_TIMEOUT); } @Override public void pauseAt(String time) { - JsonObject params = new JsonObject(); - params.addProperty("timeString", time); - sendMessageWithLogging("pauseAt", params); + BrowserContextClockPauseAtParams params = new BrowserContextClockPauseAtParams(); + params.timeString = time; + browserContext.channel.clockPauseAt(params, NO_TIMEOUT); } @Override public void pauseAt(Date time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time.getTime()); - sendMessageWithLogging("pauseAt", params); + BrowserContextClockPauseAtParams params = new BrowserContextClockPauseAtParams(); + params.timeNumber = (double) time.getTime(); + browserContext.channel.clockPauseAt(params, NO_TIMEOUT); } @Override public void resume() { - sendMessageWithLogging("resume", new JsonObject()); + browserContext.channel.clockResume(NO_TIMEOUT); } @Override public void setFixedTime(long time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time); - sendMessageWithLogging("setFixedTime", params); + BrowserContextClockSetFixedTimeParams params = new BrowserContextClockSetFixedTimeParams(); + params.timeNumber = (double) time; + browserContext.channel.clockSetFixedTime(params, NO_TIMEOUT); } @Override public void setFixedTime(String time) { - JsonObject params = new JsonObject(); - params.addProperty("timeString", time); - sendMessageWithLogging("setFixedTime", params); + BrowserContextClockSetFixedTimeParams params = new BrowserContextClockSetFixedTimeParams(); + params.timeString = time; + browserContext.channel.clockSetFixedTime(params, NO_TIMEOUT); } @Override public void setFixedTime(Date time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time.getTime()); - sendMessageWithLogging("setFixedTime", params); + BrowserContextClockSetFixedTimeParams params = new BrowserContextClockSetFixedTimeParams(); + params.timeNumber = (double) time.getTime(); + browserContext.channel.clockSetFixedTime(params, NO_TIMEOUT); } @Override public void setSystemTime(long time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time); - sendMessageWithLogging("setSystemTime", params); + BrowserContextClockSetSystemTimeParams params = new BrowserContextClockSetSystemTimeParams(); + params.timeNumber = (double) time; + browserContext.channel.clockSetSystemTime(params, NO_TIMEOUT); } @Override public void setSystemTime(String time) { - JsonObject params = new JsonObject(); - params.addProperty("timeString", time); - sendMessageWithLogging("setSystemTime", params); + BrowserContextClockSetSystemTimeParams params = new BrowserContextClockSetSystemTimeParams(); + params.timeString = time; + browserContext.channel.clockSetSystemTime(params, NO_TIMEOUT); } @Override public void setSystemTime(Date time) { - JsonObject params = new JsonObject(); - params.addProperty("timeNumber", time.getTime()); - sendMessageWithLogging("setSystemTime", params); - } - - private static void parseTime(Object time, JsonObject params) { - if (time instanceof Long) { - params.addProperty("timeNumber", (Long) time); - } else if (time instanceof Date) { - params.addProperty("timeNumber", ((Date) time).getTime()); - } else if (time instanceof String) { - params.addProperty("timeString", (String) time); - } + BrowserContextClockSetSystemTimeParams params = new BrowserContextClockSetSystemTimeParams(); + params.timeNumber = (double) time.getTime(); + browserContext.channel.clockSetSystemTime(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java index aa68f4a7d..e9029d2a1 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java @@ -16,7 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.Credentials; import com.microsoft.playwright.options.VirtualCredential; @@ -24,6 +23,7 @@ import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.toProtocol; import static java.util.Arrays.asList; class CredentialsImpl implements Credentials { @@ -35,28 +35,28 @@ class CredentialsImpl implements Credentials { @Override public void install() { - context.sendMessage("credentialsInstall", new JsonObject(), NO_TIMEOUT); + context.channel.credentialsInstall(NO_TIMEOUT); } @Override public VirtualCredential create(String rpId, CreateOptions options) { - JsonObject params = options == null ? new JsonObject() : gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("rpId", rpId); - JsonObject json = context.sendMessage("credentialsCreate", params, NO_TIMEOUT).getAsJsonObject(); - return gson().fromJson(json.get("credential"), VirtualCredential.class); + BrowserContextCredentialsCreateParams params = toProtocol(options, BrowserContextCredentialsCreateParams.class); + params.rpId = rpId; + BrowserContextCredentialsCreateResult result = context.channel.credentialsCreate(params, NO_TIMEOUT); + return gson().fromJson(gson().toJsonTree(result.credential), VirtualCredential.class); } @Override public void delete(String id) { - JsonObject params = new JsonObject(); - params.addProperty("id", id); - context.sendMessage("credentialsDelete", params, NO_TIMEOUT); + BrowserContextCredentialsDeleteParams params = new BrowserContextCredentialsDeleteParams(); + params.id = id; + context.channel.credentialsDelete(params, NO_TIMEOUT); } @Override public List get(GetOptions options) { - JsonObject params = options == null ? new JsonObject() : gson().toJsonTree(options).getAsJsonObject(); - JsonObject json = context.sendMessage("credentialsGet", params, NO_TIMEOUT).getAsJsonObject(); - return asList(gson().fromJson(json.getAsJsonArray("credentials"), VirtualCredential[].class)); + BrowserContextCredentialsGetParams params = toProtocol(options, BrowserContextCredentialsGetParams.class); + BrowserContextCredentialsGetResult result = context.channel.credentialsGet(params, NO_TIMEOUT); + return asList(gson().fromJson(gson().toJsonTree(result.credentials), VirtualCredential[].class)); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java index 9ced3f973..a91451bc2 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java @@ -25,6 +25,7 @@ import java.util.List; import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.toProtocol; class DebuggerImpl extends ChannelOwner implements Debugger { private final List pausedStateChangedHandlers = new ArrayList<>(); @@ -67,22 +68,23 @@ public DebuggerPausedDetails pausedDetails() { @Override public void requestPause() { - sendMessage("requestPause", new JsonObject(), NO_TIMEOUT); + channel.requestPause(NO_TIMEOUT); } @Override public void resume() { - sendMessage("resume", new JsonObject(), NO_TIMEOUT); + channel.resume(NO_TIMEOUT); } @Override public void next() { - sendMessage("next", new JsonObject(), NO_TIMEOUT); + channel.next(NO_TIMEOUT); } @Override public void runTo(Location location) { - JsonObject params = gson().toJsonTree(location).getAsJsonObject(); - sendMessage("runTo", params, NO_TIMEOUT); + DebuggerRunToParams params = new DebuggerRunToParams(); + params.location = toProtocol(location, DebuggerRunToParams.DebuggerRunToParamsLocation.class); + channel.runTo(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java index 2aa1c8421..db40f2e19 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java @@ -27,6 +27,6 @@ class DisposableObject extends ChannelOwner implements AutoCloseable { @Override public void close() { - sendMessage("dispose", new JsonObject(), NO_TIMEOUT); + channel.dispose(NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java index 5d869045d..a596e0878 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java @@ -44,9 +44,9 @@ private enum EventType { CLOSE } @Override public void send(JsonObject message) { checkIfClosed(); - JsonObject params = new JsonObject(); - params.add("message", message); - sendMessage("send", params, NO_TIMEOUT); + JsonPipeSendParams params = new JsonPipeSendParams(); + params.message = message; + channel.send(params, NO_TIMEOUT); } @Override @@ -81,7 +81,7 @@ public void dispose() { @Override public void close() throws IOException { if (!isClosed) { - sendMessage("close"); + channel.close(NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java index ba497944f..ce724f89f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java @@ -25,7 +25,7 @@ import java.util.function.Consumer; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; -import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.toProtocol; class ScreencastImpl implements Screencast { private final PageImpl page; @@ -50,9 +50,10 @@ void handleScreencastFrame(JsonObject params) { } } finally { // The server sends the next frame only after the previous one is acknowledged. - JsonObject ackParams = new JsonObject(); - ackParams.add("frameId", params.get("frameId")); - page.sendMessageAsync("screencastFrameAck", ackParams); + PageScreencastFrameAckParams ackParams = new PageScreencastFrameAckParams(); + ackParams.frameId = params.get("frameId").getAsInt(); + // java: there is no typed async send yet, so the typed params are converted to a JsonObject. + page.sendMessageAsync("screencastFrameAck", page.connection.protocolGson().toJsonTree(ackParams).getAsJsonObject()); } } @@ -62,31 +63,26 @@ public AutoCloseable start(StartOptions options) { throw new PlaywrightException("Screencast is already started"); } started = true; - JsonObject params = new JsonObject(); + PageScreencastStartParams params = new PageScreencastStartParams(); if (options != null) { if (options.onFrame != null) { onFrame = options.onFrame; } if (options.size != null) { - params.add("size", gson().toJsonTree(options.size)); + params.size = toProtocol(options.size, PageScreencastStartParams.PageScreencastStartParamsSize.class); } - if (options.quality != null) { - params.addProperty("quality", options.quality); - } - if (options.fps != null) { - params.addProperty("fps", options.fps); - } - params.addProperty("sendFrames", options.onFrame != null); - params.addProperty("record", options.path != null); + params.quality = options.quality; + params.fps = options.fps; + params.sendFrames = options.onFrame != null; + params.record = options.path != null; savePath = options.path; } else { - params.addProperty("sendFrames", false); - params.addProperty("record", false); + params.sendFrames = false; + params.record = false; } - JsonObject result = page.sendMessage("screencastStart", params, NO_TIMEOUT).getAsJsonObject(); - if (result.has("artifact")) { - String artifactGuid = result.getAsJsonObject("artifact").get("guid").getAsString(); - artifact = page.connection.getExistingObject(artifactGuid); + PageScreencastStartResult result = page.channel.screencastStart(params, NO_TIMEOUT); + if (result != null && result.artifact != null) { + artifact = result.artifact; } return new DisposableStub(this::stop); } @@ -95,7 +91,7 @@ public AutoCloseable start(StartOptions options) { public void stop() { started = false; onFrame = null; - page.sendMessage("screencastStop", new JsonObject(), NO_TIMEOUT); + page.channel.screencastStop(NO_TIMEOUT); if (savePath != null && artifact != null) { artifact.saveAs(savePath); } @@ -105,75 +101,47 @@ public void stop() { @Override public AutoCloseable showOverlay(String html, ShowOverlayOptions options) { - JsonObject params = new JsonObject(); - params.addProperty("html", html); - if (options != null && options.duration != null) { - params.addProperty("duration", options.duration); - } - JsonObject result = (JsonObject) page.sendMessage("screencastShowOverlay", params, NO_TIMEOUT); - String id = result.get("id").getAsString(); + PageScreencastShowOverlayParams params = toProtocol(options, PageScreencastShowOverlayParams.class); + params.html = html; + PageScreencastShowOverlayResult result = page.channel.screencastShowOverlay(params, NO_TIMEOUT); + String id = result.id; return () -> { - JsonObject removeParams = new JsonObject(); - removeParams.addProperty("id", id); - page.sendMessage("screencastRemoveOverlay", removeParams, NO_TIMEOUT); + PageScreencastRemoveOverlayParams removeParams = new PageScreencastRemoveOverlayParams(); + removeParams.id = id; + page.channel.screencastRemoveOverlay(removeParams, NO_TIMEOUT); }; } @Override public void showChapter(String title, ShowChapterOptions options) { - JsonObject params = new JsonObject(); - params.addProperty("title", title); - if (options != null) { - if (options.description != null) { - params.addProperty("description", options.description); - } - if (options.duration != null) { - params.addProperty("duration", options.duration); - } - } - page.sendMessage("screencastChapter", params, NO_TIMEOUT); + PageScreencastChapterParams params = toProtocol(options, PageScreencastChapterParams.class); + params.title = title; + page.channel.screencastChapter(params, NO_TIMEOUT); } @Override public AutoCloseable showActions(ShowActionsOptions options) { - JsonObject params = new JsonObject(); - if (options != null) { - if (options.duration != null) { - params.addProperty("duration", options.duration); - } - if (options.fontSize != null) { - params.addProperty("fontSize", options.fontSize); - } - if (options.position != null) { - params.add("position", gson().toJsonTree(options.position)); - } - if (options.cursor != null) { - params.add("cursor", gson().toJsonTree(options.cursor)); - } - if (options.style != null) { - params.add("style", gson().toJsonTree(options.style)); - } - } - page.sendMessage("screencastShowActions", params, NO_TIMEOUT); + PageScreencastShowActionsParams params = toProtocol(options, PageScreencastShowActionsParams.class); + page.channel.screencastShowActions(params, NO_TIMEOUT); return new DisposableStub(this::hideActions); } @Override public void showOverlays() { - JsonObject params = new JsonObject(); - params.addProperty("visible", true); - page.sendMessage("screencastSetOverlayVisible", params, NO_TIMEOUT); + PageScreencastSetOverlayVisibleParams params = new PageScreencastSetOverlayVisibleParams(); + params.visible = true; + page.channel.screencastSetOverlayVisible(params, NO_TIMEOUT); } @Override public void hideActions() { - page.sendMessage("screencastHideActions", new JsonObject(), NO_TIMEOUT); + page.channel.screencastHideActions(NO_TIMEOUT); } @Override public void hideOverlays() { - JsonObject params = new JsonObject(); - params.addProperty("visible", false); - page.sendMessage("screencastSetOverlayVisible", params, NO_TIMEOUT); + PageScreencastSetOverlayVisibleParams params = new PageScreencastSetOverlayVisibleParams(); + params.visible = false; + page.channel.screencastSetOverlayVisible(params, NO_TIMEOUT); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java index 878542ef1..19fe0bd3f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java @@ -43,9 +43,10 @@ public void setTestIdAttribute(String attributeName) { testIdAttributeName = attributeName; for (BrowserContextImpl context : contextsForSelectors) { try { - JsonObject params = new JsonObject(); - params.addProperty("testIdAttributeName", attributeName); - context.sendMessageAsync("setTestIdAttributeName", params); + BrowserContextSetTestIdAttributeNameParams params = new BrowserContextSetTestIdAttributeNameParams(); + params.testIdAttributeName = attributeName; + // java: there is no typed async send yet, so the typed params are converted to a JsonObject. + context.sendMessageAsync("setTestIdAttributeName", context.connection.protocolGson().toJsonTree(params).getAsJsonObject()); } catch (PlaywrightException e) { } } @@ -72,17 +73,18 @@ private void registerImpl(String name, String script, RegisterOptions options) { throw new PlaywrightException("selectors.register: \"" + name + "\" selector engine has been already registered"); } - JsonObject engine = new JsonObject(); - engine.addProperty("name", name); - engine.addProperty("source", script); - if (options != null && options.contentScript != null) { - engine.addProperty("contentScript", options.contentScript); + SelectorEngine engine = new SelectorEngine(); + engine.name = name; + engine.source = script; + if (options != null) { + engine.contentScript = options.contentScript; } for (BrowserContextImpl context : contextsForSelectors) { - JsonObject params = new JsonObject(); - params.add("selectorEngine", engine); - context.sendMessage("registerSelectorEngine", params, NO_TIMEOUT); + BrowserContextRegisterSelectorEngineParams params = new BrowserContextRegisterSelectorEngineParams(); + params.selectorEngine = engine; + context.channel.registerSelectorEngine(params, NO_TIMEOUT); } - selectorEngines.add(engine); + // java: kept as JsonObject because BrowserImpl and BrowserTypeImpl serialize the list as is. + selectorEngines.add(Serialization.gson().toJsonTree(engine).getAsJsonObject()); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java index 1cb76bef1..df37a5724 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java @@ -16,8 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.microsoft.playwright.WebMCP; import com.microsoft.playwright.options.WebMCPTool; @@ -37,18 +35,17 @@ class WebMCPImpl implements WebMCP { @Override public List tools(ToolsOptions options) { - JsonElement json = frame.sendMessage("webmcpTools", new JsonObject(), frame.timeout(options == null ? null : options.timeout)); - WebMCPTool[] tools = gson().fromJson(json.getAsJsonObject().get("tools"), WebMCPTool[].class); + FrameWebmcpToolsResult result = frame.channel.webmcpTools(frame.timeout(options == null ? null : options.timeout)); + WebMCPTool[] tools = gson().fromJson(gson().toJsonTree(result.tools), WebMCPTool[].class); return Arrays.asList(tools); } @Override public Object callTool(String name, Object input, CallToolOptions options) { - JsonObject params = new JsonObject(); - params.addProperty("name", name); - params.add("input", gson().toJsonTree(serializeArgument(input))); - JsonElement json = frame.sendMessage("webmcpCallTool", params, frame.timeout(options == null ? null : options.timeout)); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("result"), SerializedValue.class); - return deserialize(value); + FrameWebmcpCallToolParams params = new FrameWebmcpCallToolParams(); + params.name = name; + params.input = serializeArgument(input); + FrameWebmcpCallToolResult result = frame.channel.webmcpCallTool(params, frame.timeout(options == null ? null : options.timeout)); + return deserialize(result.result); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java index 96d507d6e..48bc58425 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java @@ -16,7 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; import com.microsoft.playwright.WebStorage; import com.microsoft.playwright.options.WebStorageItem; @@ -35,43 +34,43 @@ class WebStorageImpl implements WebStorage { this.kind = kind; } - private JsonObject createParams() { - JsonObject params = new JsonObject(); - params.addProperty("kind", kind); - return params; - } - @Override public List items() { - JsonObject json = page.sendMessage("webStorageItems", createParams(), NO_TIMEOUT).getAsJsonObject(); - return asList(gson().fromJson(json.getAsJsonArray("items"), WebStorageItem[].class)); + PageWebStorageItemsParams params = new PageWebStorageItemsParams(); + params.kind = kind; + PageWebStorageItemsResult result = page.channel.webStorageItems(params, NO_TIMEOUT); + return asList(gson().fromJson(gson().toJsonTree(result.items), WebStorageItem[].class)); } @Override public String getItem(String name) { - JsonObject params = createParams(); - params.addProperty("name", name); - JsonObject json = page.sendMessage("webStorageGetItem", params, NO_TIMEOUT).getAsJsonObject(); - return json.has("value") ? json.get("value").getAsString() : null; + PageWebStorageGetItemParams params = new PageWebStorageGetItemParams(); + params.kind = kind; + params.name = name; + return page.channel.webStorageGetItem(params, NO_TIMEOUT).value; } @Override public void setItem(String name, String value) { - JsonObject params = createParams(); - params.addProperty("name", name); - params.addProperty("value", value); - page.sendMessage("webStorageSetItem", params, NO_TIMEOUT); + PageWebStorageSetItemParams params = new PageWebStorageSetItemParams(); + params.kind = kind; + params.name = name; + params.value = value; + page.channel.webStorageSetItem(params, NO_TIMEOUT); } @Override public void removeItem(String name) { - JsonObject params = createParams(); - params.addProperty("name", name); - page.sendMessage("webStorageRemoveItem", params, NO_TIMEOUT); + PageWebStorageRemoveItemParams params = new PageWebStorageRemoveItemParams(); + params.kind = kind; + params.name = name; + page.channel.webStorageRemoveItem(params, NO_TIMEOUT); } @Override public void clear() { - page.sendMessage("webStorageClear", createParams(), NO_TIMEOUT); + PageWebStorageClearParams params = new PageWebStorageClearParams(); + params.kind = kind; + page.channel.webStorageClear(params, NO_TIMEOUT); } } From db65e0c4ae49078b36f23b7673aed561e09e8281 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:00:25 -0800 Subject: [PATCH 13/33] refactor(protocol): resolve channel references in option copies through the connection Utils.toProtocol(owner, options, params) reads the copied params with the connection's Gson, so a locator mask's frame becomes the real FrameImpl. The owner-less overload now refuses to read channel references instead of letting Gson allocate a detached ChannelOwner. --- .../microsoft/playwright/impl/PageImpl.java | 2 +- .../com/microsoft/playwright/impl/Utils.java | 52 ++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index cb7ebf8ce..1cfe21522 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -1261,7 +1261,7 @@ private byte[] screenshotImpl(ScreenshotOptions options) { if (options.type == null && options.path != null) { options.type = Utils.screenshotTypeForPath(options.path); } - PageScreenshotParams params = toProtocol(options, PageScreenshotParams.class); + PageScreenshotParams params = toProtocol(this, options, PageScreenshotParams.class); byte[] buffer = channel.screenshot(params, timeoutSettings.timeout(options.timeout)).binary; if (options.path != null) { Utils.writeToFile(buffer, options.path); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index 44b75aae9..536ad7a34 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -19,6 +19,12 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.google.gson.stream.JsonWriter; +import com.google.gson.stream.JsonReader; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.TypeAdapter; +import com.google.gson.Gson; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.options.ClientCertificate; import com.microsoft.playwright.options.FilePayload; @@ -86,8 +92,21 @@ static T convertType(F f, Class t) { } } - /** Copies public API options into a generated protocol params class with the same Gson that serializes them on the wire. */ + /** + * Copies public API options into a generated protocol params class with the same Gson that serializes them + * on the wire. Params that carry channel references (a locator mask holds a frame) must be built with the + * overload that takes the owner, which resolves the references through its connection (tChannelImplFromWire + * upstream): this variant refuses to read them. + */ static T toProtocol(Object options, Class paramsClass) { + return toProtocol(noChannelReadsGson, options, paramsClass); + } + + static T toProtocol(ChannelOwner owner, Object options, Class paramsClass) { + return toProtocol(owner.connection.protocolGson(), options, paramsClass); + } + + private static T toProtocol(Gson reader, Object options, Class paramsClass) { if (options == null) { try { return paramsClass.getDeclaredConstructor().newInstance(); @@ -95,9 +114,38 @@ static T toProtocol(Object options, Class paramsClass) { throw new PlaywrightException("Internal error", e); } } - return Serialization.gson().fromJson(Serialization.gson().toJsonTree(options), paramsClass); + return reader.fromJson(Serialization.gson().toJsonTree(options), paramsClass); } + private static final Gson noChannelReadsGson = Serialization.gson().newBuilder() + .registerTypeAdapterFactory(new TypeAdapterFactory() { + @Override + @SuppressWarnings("unchecked") + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ChannelOwner.class.isAssignableFrom(type.getRawType())) { + return null; + } + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, ChannelOwner value) throws IOException { + if (value == null) { + out.nullValue(); + return; + } + out.beginObject(); + out.name("guid"); + out.value(value.guid); + out.endObject(); + } + + @Override + public ChannelOwner read(JsonReader in) { + throw new PlaywrightException("Internal error: params with channel references must be built with ChannelOwner.toProtocol"); + } + }; + } + }).create(); + public static T clone(T f) { if (f == null) { return f; From 9e97f83505efc112ee7003369d2454ed5a07c1e9 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:53:28 -0800 Subject: [PATCH 14/33] refactor(frame): use generated channel types for frame commands --- .../microsoft/playwright/impl/FrameImpl.java | 471 +++++++++--------- 1 file changed, 237 insertions(+), 234 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index 326965ac0..3930d2d20 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java @@ -80,30 +80,20 @@ public ElementHandle querySelector(String selector, QuerySelectorOptions options if (options == null) { options = new QuerySelectorOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonElement json = sendMessage("querySelector", params, NO_TIMEOUT); - JsonObject element = json.getAsJsonObject().getAsJsonObject("element"); - if (element == null) { - return null; - } - return connection.getExistingObject(element.get("guid").getAsString()); + FrameQuerySelectorParams params = toProtocol(options, FrameQuerySelectorParams.class); + params.selector = selector; + return channel.querySelector(params, NO_TIMEOUT).element; } @Override public List querySelectorAll(String selector) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - JsonElement json = sendMessage("querySelectorAll", params, NO_TIMEOUT); - JsonArray elements = json.getAsJsonObject().getAsJsonArray("elements"); - if (elements == null) { + FrameQuerySelectorAllParams params = new FrameQuerySelectorAllParams(); + params.selector = selector; + FrameQuerySelectorAllResult result = channel.querySelectorAll(params, NO_TIMEOUT); + if (result.elements == null) { return null; } - List handles = new ArrayList<>(); - for (JsonElement item : elements) { - handles.add(connection.getExistingObject(item.getAsJsonObject().get("guid").getAsString())); - } - return handles; + return new ArrayList(result.elements); } @Override @@ -139,13 +129,11 @@ Object evalOnSelectorImpl(String selector, String pageFunction, Object arg, Eval if (options == null) { options = new EvalOnSelectorOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evalOnSelector", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + FrameEvalOnSelectorParams params = toProtocol(options, FrameEvalOnSelectorParams.class); + params.selector = selector; + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evalOnSelector(params, NO_TIMEOUT).value); } @Override @@ -154,13 +142,11 @@ public Object evalOnSelectorAll(String selector, String pageFunction, Object arg } Object evalOnSelectorAllImpl(String selector, String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evalOnSelectorAll", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + FrameEvalOnSelectorAllParams params = new FrameEvalOnSelectorAllParams(); + params.selector = selector; + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evalOnSelectorAll(params, NO_TIMEOUT).value); } @Override @@ -172,9 +158,8 @@ ElementHandle addScriptTagImpl(AddScriptTagOptions options) { if (options == null) { options = new AddScriptTagOptions(); } - JsonObject jsonOptions = gson().toJsonTree(options).getAsJsonObject(); + FrameAddScriptTagParams params = toProtocol(options, FrameAddScriptTagParams.class); if (options.path != null) { - jsonOptions.remove("path"); byte[] encoded; try { encoded = Files.readAllBytes(options.path); @@ -183,10 +168,9 @@ ElementHandle addScriptTagImpl(AddScriptTagOptions options) { } String content = new String(encoded, StandardCharsets.UTF_8); content = addSourceUrlToScript(content, options.path); - jsonOptions.addProperty("content", content); + params.content = content; } - JsonElement json = sendMessage("addScriptTag", jsonOptions, NO_TIMEOUT); - return connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("element").get("guid").getAsString()); + return channel.addScriptTag(params, NO_TIMEOUT).element; } @Override @@ -198,9 +182,8 @@ ElementHandle addStyleTagImpl(AddStyleTagOptions options) { if (options == null) { options = new AddStyleTagOptions(); } - JsonObject jsonOptions = gson().toJsonTree(options).getAsJsonObject(); + FrameAddStyleTagParams params = toProtocol(options, FrameAddStyleTagParams.class); if (options.path != null) { - jsonOptions.remove("path"); byte[] encoded; try { encoded = Files.readAllBytes(options.path); @@ -209,10 +192,9 @@ ElementHandle addStyleTagImpl(AddStyleTagOptions options) { } String content = new String(encoded, StandardCharsets.UTF_8); content += "/*# sourceURL=" + options.path.toString().replace("\n", "") + "*/"; - jsonOptions.addProperty("content", content); + params.content = content; } - JsonElement json = sendMessage("addStyleTag", jsonOptions, NO_TIMEOUT); - return connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("element").get("guid").getAsString()); + return channel.addStyleTag(params, NO_TIMEOUT).element; } @Override @@ -220,9 +202,9 @@ public void check(String selector, CheckOptions options){ if (options == null) { options = new CheckOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - sendMessage("check", params, timeout(options.timeout)); + FrameCheckParams params = toProtocol(options, FrameCheckParams.class); + params.selector = selector; + channel.check(params, timeout(options.timeout)); } @Override @@ -239,12 +221,12 @@ void clickImpl(String selector, ClickOptions options, Integer steps) { if (options == null) { options = new ClickOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); + FrameClickParams params = toProtocol(options, FrameClickParams.class); + params.selector = selector; if (steps != null) { - params.addProperty("steps", steps); + params.steps = steps; } - sendMessage("click", params, timeout(options.timeout)); + channel.click(params, timeout(options.timeout)); } @Override @@ -252,8 +234,8 @@ public String content(ContentOptions options) { if (options == null) { options = new ContentOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - return sendMessage("content", params, NO_TIMEOUT).getAsJsonObject().get("value").getAsString(); + FrameContentParams params = toProtocol(options, FrameContentParams.class); + return channel.content(params, NO_TIMEOUT).value; } @Override @@ -265,12 +247,12 @@ void dblclickImpl(String selector, DblclickOptions options, Integer steps) { if (options == null) { options = new DblclickOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); + FrameDblclickParams params = toProtocol(options, FrameDblclickParams.class); + params.selector = selector; if (steps != null) { - params.addProperty("steps", steps); + params.steps = steps; } - sendMessage("dblclick", params, timeout(options.timeout)); + channel.dblclick(params, timeout(options.timeout)); } @Override @@ -278,32 +260,27 @@ public void dispatchEvent(String selector, String type, Object eventInit, Dispat if (options == null) { options = new DispatchEventOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("type", type); - params.add("eventInit", gson().toJsonTree(serializeArgument(eventInit))); - sendMessage("dispatchEvent", params, timeout(options.timeout)); + FrameDispatchEventParams params = toProtocol(options, FrameDispatchEventParams.class); + params.selector = selector; + params.type = type; + params.eventInit = serializeArgument(eventInit); + channel.dispatchEvent(params, timeout(options.timeout)); } @Override public Object evaluate(String expression, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", expression); - params.addProperty("world", "main"); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpression", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + FrameEvaluateExpressionParams params = new FrameEvaluateExpressionParams(); + params.expression = expression; + params.arg = serializeArgument(arg); + return deserialize(channel.evaluateExpression(params, NO_TIMEOUT).value); } @Override public JSHandle evaluateHandle(String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", pageFunction); - params.addProperty("world", "main"); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpressionHandle", params, NO_TIMEOUT); - return connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("handle").get("guid").getAsString()); + FrameEvaluateExpressionHandleParams params = new FrameEvaluateExpressionHandleParams(); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return channel.evaluateExpressionHandle(params, NO_TIMEOUT).handle; } @Override @@ -311,10 +288,10 @@ public void fill(String selector, String value, FillOptions options) { if (options == null) { options = new FillOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("value", value); - sendMessage("fill", params, timeout(options.timeout)); + FrameFillParams params = toProtocol(options, FrameFillParams.class); + params.selector = selector; + params.value = value; + channel.fill(params, timeout(options.timeout)); } @Override @@ -322,15 +299,14 @@ public void focus(String selector, FocusOptions options) { if (options == null) { options = new FocusOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - sendMessage("focus", params, timeout(options.timeout)); + FrameFocusParams params = toProtocol(options, FrameFocusParams.class); + params.selector = selector; + channel.focus(params, timeout(options.timeout)); } @Override public ElementHandle frameElement() { - JsonObject json = sendMessage("frameElement").getAsJsonObject(); - return connection.getExistingObject(json.getAsJsonObject("element").get("guid").getAsString()); + return channel.frameElement(NO_TIMEOUT).element; } @Override @@ -412,14 +388,11 @@ String getAttributeImpl(String selector, String name, GetAttributeOptions option if (options == null) { options = new GetAttributeOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("name", name); - JsonObject json = sendMessage("getAttribute", params, timeout(options.timeout)).getAsJsonObject(); - if (json.has("value")) { - return json.get("value").getAsString(); - } - return null; + FrameGetAttributeParams params = toProtocol(options, FrameGetAttributeParams.class); + params.selector = selector; + params.name = name; + FrameGetAttributeResult result = channel.getAttribute(params, timeout(options.timeout)); + return result.value; } @Override @@ -431,14 +404,9 @@ ResponseImpl navigateImpl(String url, NavigateOptions options) { if (options == null) { options = new NavigateOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("url", url); - JsonElement result = sendMessage("goto", params, navigationTimeout(options.timeout)); - JsonObject jsonResponse = result.getAsJsonObject().getAsJsonObject("response"); - if (jsonResponse == null) { - return null; - } - return connection.getExistingObject(jsonResponse.get("guid").getAsString()); + FrameGotoParams params = toProtocol(options, FrameGotoParams.class); + params.url = url; + return channel.goto_(params, navigationTimeout(options.timeout)).response; } @Override @@ -450,9 +418,9 @@ void hoverImpl(String selector, HoverOptions options) { if (options == null) { options = new HoverOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - sendMessage("hover", params, timeout(options.timeout)); + FrameHoverParams params = toProtocol(options, FrameHoverParams.class); + params.selector = selector; + channel.hover(params, timeout(options.timeout)); } @Override @@ -464,13 +432,13 @@ void dragAndDropImpl(String source, String target, DragAndDropOptions options, I if (options == null) { options = new DragAndDropOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("source", source); - params.addProperty("target", target); + FrameDragAndDropParams params = toProtocol(options, FrameDragAndDropParams.class); + params.source = source; + params.target = target; if (steps != null) { - params.addProperty("steps", steps); + params.steps = steps; } - sendMessage("dragAndDrop", params, timeout(options.timeout)); + channel.dragAndDrop(params, timeout(options.timeout)); } @Override @@ -482,10 +450,10 @@ String innerHTMLImpl(String selector, InnerHTMLOptions options) { if (options == null) { options = new InnerHTMLOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("innerHTML", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsString(); + FrameInnerHTMLParams params = toProtocol(options, FrameInnerHTMLParams.class); + params.selector = selector; + FrameInnerHTMLResult result = channel.innerHTML(params, timeout(options.timeout)); + return result.value; } @Override @@ -497,10 +465,10 @@ String innerTextImpl(String selector, InnerTextOptions options) { if (options == null) { options = new InnerTextOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("innerText", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsString(); + FrameInnerTextParams params = toProtocol(options, FrameInnerTextParams.class); + params.selector = selector; + FrameInnerTextResult result = channel.innerText(params, timeout(options.timeout)); + return result.value; } @Override @@ -512,10 +480,10 @@ String inputValueImpl(String selector, InputValueOptions options) { if (options == null) { options = new InputValueOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("inputValue", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsString(); + FrameInputValueParams params = toProtocol(options, FrameInputValueParams.class); + params.selector = selector; + FrameInputValueResult result = channel.inputValue(params, timeout(options.timeout)); + return result.value; } @Override @@ -527,10 +495,10 @@ boolean isCheckedImpl(String selector, IsCheckedOptions options) { if (options == null) { options = new IsCheckedOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isChecked", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsCheckedParams params = toProtocol(options, FrameIsCheckedParams.class); + params.selector = selector; + FrameIsCheckedResult result = channel.isChecked(params, timeout(options.timeout)); + return result.value; } @Override @@ -547,10 +515,10 @@ boolean isDisabledImpl(String selector, IsDisabledOptions options) { if (options == null) { options = new IsDisabledOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isDisabled", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsDisabledParams params = toProtocol(options, FrameIsDisabledParams.class); + params.selector = selector; + FrameIsDisabledResult result = channel.isDisabled(params, timeout(options.timeout)); + return result.value; } @Override @@ -562,10 +530,10 @@ boolean isEditableImpl(String selector, IsEditableOptions options) { if (options == null) { options = new IsEditableOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isEditable", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsEditableParams params = toProtocol(options, FrameIsEditableParams.class); + params.selector = selector; + FrameIsEditableResult result = channel.isEditable(params, timeout(options.timeout)); + return result.value; } @Override @@ -577,10 +545,10 @@ boolean isEnabledImpl(String selector, IsEnabledOptions options) { if (options == null) { options = new IsEnabledOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isEnabled", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsEnabledParams params = toProtocol(options, FrameIsEnabledParams.class); + params.selector = selector; + FrameIsEnabledResult result = channel.isEnabled(params, timeout(options.timeout)); + return result.value; } @Override @@ -592,10 +560,10 @@ boolean isHiddenImpl(String selector, IsHiddenOptions options) { if (options == null) { options = new IsHiddenOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isHidden", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsHiddenParams params = toProtocol(options, FrameIsHiddenParams.class); + params.selector = selector; + FrameIsHiddenResult result = channel.isHidden(params, timeout(options.timeout)); + return result.value; } @Override @@ -612,10 +580,10 @@ boolean isVisibleImpl(String selector, IsVisibleOptions options) { if (options == null) { options = new IsVisibleOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject json = sendMessage("isVisible", params, timeout(options.timeout)).getAsJsonObject(); - return json.get("value").getAsBoolean(); + FrameIsVisibleParams params = toProtocol(options, FrameIsVisibleParams.class); + params.selector = selector; + FrameIsVisibleResult result = channel.isVisible(params, timeout(options.timeout)); + return result.value; } @Override @@ -642,10 +610,10 @@ void pressImpl(String selector, String key, PressOptions options) { if (options == null) { options = new PressOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("key", key); - sendMessage("press", params, timeout(options.timeout)); + FramePressParams params = toProtocol(options, FramePressParams.class); + params.selector = selector; + params.key = key; + channel.press(params, timeout(options.timeout)); } @Override @@ -657,10 +625,17 @@ List selectOptionImpl(String selector, SelectOption[] values, SelectOpti if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); + FrameSelectOptionParams params = toProtocol(options, FrameSelectOptionParams.class); + params.selector = selector; if (values != null) { - params.add("options", gson().toJsonTree(values)); + params.options = new ArrayList<>(); + for (SelectOption value : values) { + FrameSelectOptionParams.FrameSelectOptionParamsOptions option = new FrameSelectOptionParams.FrameSelectOptionParamsOptions(); + option.value = value.value; + option.label = value.label; + option.index = value.index; + params.options.add(option); + } } return selectOption(params, options.timeout); } @@ -669,10 +644,15 @@ List selectOptionImpl(String selector, String[] values, SelectOptionOpti if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); + FrameSelectOptionParams params = toProtocol(options, FrameSelectOptionParams.class); + params.selector = selector; if (values != null) { - params.add("options", toSelectValueOrLabel(values)); + params.options = new ArrayList<>(); + for (String value : values) { + FrameSelectOptionParams.FrameSelectOptionParamsOptions option = new FrameSelectOptionParams.FrameSelectOptionParamsOptions(); + option.valueOrLabel = value; + params.options.add(option); + } } return selectOption(params, options.timeout); } @@ -686,17 +666,19 @@ List selectOptionImpl(String selector, ElementHandle[] values, SelectOpt if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); + FrameSelectOptionParams params = toProtocol(options, FrameSelectOptionParams.class); + params.selector = selector; if (values != null) { - params.add("elements", Serialization.toProtocol(values)); + params.elements = new ArrayList<>(); + for (ElementHandle handle : values) { + params.elements.add((ElementHandleImpl) handle); + } } return selectOption(params, options.timeout); } - private List selectOption(JsonObject params, Double timeout) { - JsonObject json = sendMessage("selectOption", params, timeout(timeout)).getAsJsonObject(); - return parseStringList(json.getAsJsonArray("values")); + private List selectOption(FrameSelectOptionParams params, Double timeout) { + return channel.selectOption(params, timeout(timeout)).values; } @Override @@ -717,9 +699,9 @@ public void setContent(String html, SetContentOptions options) { if (options == null) { options = new SetContentOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("html", html); - sendMessage("setContent", params, navigationTimeout(options.timeout)); + FrameSetContentParams params = toProtocol(options, FrameSetContentParams.class); + params.html = html; + channel.setContent(params, navigationTimeout(options.timeout)); } @Override @@ -736,10 +718,17 @@ void setInputFilesImpl(String selector, Path[] files, SetInputFilesOptions optio if (options == null) { options = new SetInputFilesOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - addFilePathUploadParams(files, params, page.context()); - params.addProperty("selector", selector); - sendMessage("setInputFiles", params, timeout(options.timeout)); + FrameSetInputFilesParams params = toProtocol(options, FrameSetInputFilesParams.class); + JsonObject upload = new JsonObject(); + addFilePathUploadParams(files, upload, page.context()); + FrameSetInputFilesParams uploadParams = connection.protocolGson().fromJson(upload, FrameSetInputFilesParams.class); + params.payloads = uploadParams.payloads; + params.localDirectory = uploadParams.localDirectory; + params.directoryStream = uploadParams.directoryStream; + params.localPaths = uploadParams.localPaths; + params.streams = uploadParams.streams; + params.selector = selector; + channel.setInputFiles(params, timeout(options.timeout)); } @Override @@ -757,10 +746,17 @@ void setInputFilesImpl(String selector, FilePayload[] files, SetInputFilesOption if (options == null) { options = new SetInputFilesOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.add("payloads", toJsonArray(files)); - sendMessage("setInputFiles", params, timeout(options.timeout)); + FrameSetInputFilesParams params = toProtocol(options, FrameSetInputFilesParams.class); + params.selector = selector; + params.payloads = new ArrayList<>(); + for (FilePayload file : files) { + FrameSetInputFilesParams.FrameSetInputFilesParamsPayloads payload = new FrameSetInputFilesParams.FrameSetInputFilesParamsPayloads(); + payload.name = file.name; + payload.mimeType = file.mimeType; + payload.buffer = file.buffer; + params.payloads.add(payload); + } + channel.setInputFiles(params, timeout(options.timeout)); } @Override @@ -768,9 +764,9 @@ public void tap(String selector, TapOptions options) { if (options == null) { options = new TapOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - sendMessage("tap", params, timeout(options.timeout)); + FrameTapParams params = toProtocol(options, FrameTapParams.class); + params.selector = selector; + channel.tap(params, timeout(options.timeout)); } @Override @@ -778,15 +774,14 @@ public String textContent(String selector, TextContentOptions options) { if (options == null) { options = new TextContentOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - return sendMessage("textContent", params, timeout(options.timeout)).getAsJsonObject().get("value").getAsString(); + FrameTextContentParams params = toProtocol(options, FrameTextContentParams.class); + params.selector = selector; + return channel.textContent(params, timeout(options.timeout)).value; } @Override public String title() { - JsonElement json = sendMessage("title"); - return json.getAsJsonObject().get("value").getAsString(); + return channel.title(NO_TIMEOUT).value; } @Override @@ -794,10 +789,10 @@ public void type(String selector, String text, TypeOptions options) { if (options == null) { options = new TypeOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("text", text); - sendMessage("type", params, timeout(options.timeout)); + FrameTypeParams params = toProtocol(options, FrameTypeParams.class); + params.selector = selector; + params.text = text; + channel.type(params, timeout(options.timeout)); } @Override @@ -805,9 +800,9 @@ public void uncheck(String selector, UncheckOptions options) { if (options == null) { options = new UncheckOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - sendMessage("uncheck", params, timeout(options.timeout)); + FrameUncheckParams params = toProtocol(options, FrameUncheckParams.class); + params.selector = selector; + channel.uncheck(params, timeout(options.timeout)); } @Override @@ -820,12 +815,10 @@ public JSHandle waitForFunction(String pageFunction, Object arg, WaitForFunction if (options == null) { options = new WaitForFunctionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("waitForFunction", params, timeout(options.timeout)); - JsonObject element = json.getAsJsonObject().getAsJsonObject("handle"); - return connection.getExistingObject(element.get("guid").getAsString()); + FrameWaitForFunctionParams params = toProtocol(options, FrameWaitForFunctionParams.class); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return channel.waitForFunction(params, timeout(options.timeout)).handle; } @Override @@ -999,22 +992,17 @@ ElementHandle waitForSelectorImpl(String selector, WaitForSelectorOptions option if (options == null) { options = new WaitForSelectorOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("omitReturnValue", omitReturnValue); - JsonElement json = sendMessage("waitForSelector", params, timeout(options.timeout)); - JsonObject element = json.getAsJsonObject().getAsJsonObject("element"); - if (element == null) { - return null; - } - return connection.getExistingObject(element.get("guid").getAsString()); + FrameWaitForSelectorParams params = toProtocol(options, FrameWaitForSelectorParams.class); + params.selector = selector; + params.omitReturnValue = omitReturnValue; + return channel.waitForSelector(params, timeout(options.timeout)).element; } @Override public void waitForTimeout(double timeout) { - JsonObject params = new JsonObject(); - params.addProperty("waitTimeout", timeout); - sendMessage("waitForTimeout", params, NO_TIMEOUT); + FrameWaitForTimeoutParams params = new FrameWaitForTimeoutParams(); + params.waitTimeout = timeout; + channel.waitForTimeout(params, NO_TIMEOUT); } @Override @@ -1052,62 +1040,77 @@ void waitForURLImpl(Logger logger, UrlMatcher matcher, WaitForURLOptions options } int queryCount(String selector) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - JsonObject result = sendMessage("queryCount", params, NO_TIMEOUT).getAsJsonObject(); - return result.get("value").getAsInt(); + FrameQueryCountParams params = new FrameQueryCountParams(); + params.selector = selector; + return channel.queryCount(params, NO_TIMEOUT).value; } void dropImpl(String selector, DropPayload payload, com.microsoft.playwright.Locator.DropOptions options) { if (options == null) { options = new com.microsoft.playwright.Locator.DropOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("strict", true); + FrameDropParams params = toProtocol(options, FrameDropParams.class); + params.selector = selector; + params.strict = true; if (payload != null) { if (payload.files != null) { if (payload.files instanceof Path) { - addFilePathUploadParams(new Path[] { (Path) payload.files }, params, page.context()); + addDropFilePaths(new Path[] { (Path) payload.files }, params); } else if (payload.files instanceof Path[]) { - addFilePathUploadParams((Path[]) payload.files, params, page.context()); + addDropFilePaths((Path[]) payload.files, params); } else if (payload.files instanceof com.microsoft.playwright.options.FilePayload) { - checkFilePayloadSize(new com.microsoft.playwright.options.FilePayload[] { (com.microsoft.playwright.options.FilePayload) payload.files }); - params.add("payloads", toJsonArray(new com.microsoft.playwright.options.FilePayload[] { (com.microsoft.playwright.options.FilePayload) payload.files })); + addDropPayloads(new com.microsoft.playwright.options.FilePayload[] { (com.microsoft.playwright.options.FilePayload) payload.files }, params); } else if (payload.files instanceof com.microsoft.playwright.options.FilePayload[]) { - checkFilePayloadSize((com.microsoft.playwright.options.FilePayload[]) payload.files); - params.add("payloads", toJsonArray((com.microsoft.playwright.options.FilePayload[]) payload.files)); + addDropPayloads((com.microsoft.playwright.options.FilePayload[]) payload.files, params); } else { throw new com.microsoft.playwright.PlaywrightException("Unsupported files type: " + payload.files.getClass()); } } if (payload.data != null) { - com.google.gson.JsonArray dataArray = new com.google.gson.JsonArray(); + params.data = new ArrayList<>(); for (java.util.Map.Entry entry : payload.data.entrySet()) { - JsonObject e = new JsonObject(); - e.addProperty("mimeType", entry.getKey()); - e.addProperty("value", entry.getValue()); - dataArray.add(e); + FrameDropParams.FrameDropParamsData e = new FrameDropParams.FrameDropParamsData(); + e.mimeType = entry.getKey(); + e.value = entry.getValue(); + params.data.add(e); } - params.add("data", dataArray); } } - sendMessage("drop", params, timeout(options.timeout)); + channel.drop(params, timeout(options.timeout)); } - void highlightImpl(String selector, String style) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - if (style != null) { - params.addProperty("style", style); + private void addDropFilePaths(Path[] files, FrameDropParams params) { + JsonObject upload = new JsonObject(); + addFilePathUploadParams(files, upload, page.context()); + FrameDropParams uploadParams = connection.protocolGson().fromJson(upload, FrameDropParams.class); + params.payloads = uploadParams.payloads; + params.localPaths = uploadParams.localPaths; + params.streams = uploadParams.streams; + } + + private void addDropPayloads(com.microsoft.playwright.options.FilePayload[] files, FrameDropParams params) { + checkFilePayloadSize(files); + params.payloads = new ArrayList<>(); + for (com.microsoft.playwright.options.FilePayload file : files) { + FrameDropParams.FrameDropParamsPayloads payload = new FrameDropParams.FrameDropParamsPayloads(); + payload.name = file.name; + payload.mimeType = file.mimeType; + payload.buffer = file.buffer; + params.payloads.add(payload); } - sendMessage("highlight", params, NO_TIMEOUT); + } + + void highlightImpl(String selector, String style) { + FrameHighlightParams params = new FrameHighlightParams(); + params.selector = selector; + params.style = style; + channel.highlight(params, NO_TIMEOUT); } void hideHighlightImpl(String selector) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - sendMessage("hideHighlight", params, NO_TIMEOUT); + FrameHideHighlightParams params = new FrameHideHighlightParams(); + params.selector = selector; + channel.hideHighlight(params, NO_TIMEOUT); } protected void handleEvent(String event, JsonObject params) { @@ -1164,11 +1167,11 @@ FrameExpectResult expect(String expression, FrameExpectOptions options, String t } FrameExpectResult expect(String expression, FrameExpectOptions options) { - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("expression", expression); + FrameExpectParams params = toProtocol(options, FrameExpectParams.class); + params.expression = expression; FrameExpectResult result = new FrameExpectResult(); try { - sendMessage("expect", params, options.timeout); + channel.expect(params, options.timeout); result.matches = !options.isNot; } catch (ServerErrorWithDetails e) { FrameExpectErrorDetails details = gson().fromJson(e.errorDetails(), FrameExpectErrorDetails.class); From 446b22072df7fcfc92f611a990f293118bbfe843 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:00:25 -0800 Subject: [PATCH 15/33] refactor(locator): use generated channel types in LocatorImpl --- .../playwright/impl/LocatorImpl.java | 41 +++++++++---------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java index cb4357846..67536e9d8 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java @@ -112,13 +112,13 @@ public List allTextContents() { @Override public Locator normalize() { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - params.addProperty("sdkLanguage", "java"); - JsonObject result = frame.sendMessage("resolveSelector", params, ChannelOwner.NO_TIMEOUT).getAsJsonObject(); - LocatorImpl locator = new LocatorImpl(frame, result.get("resolvedSelector").getAsString(), null); - if (result.has("locatorCode")) { - locator.stringRepresentation = result.get("locatorCode").getAsString(); + FrameResolveSelectorParams params = new FrameResolveSelectorParams(); + params.selector = selector; + params.sdkLanguage = "java"; + FrameResolveSelectorResult result = frame.channel.resolveSelector(params, ChannelOwner.NO_TIMEOUT); + LocatorImpl locator = new LocatorImpl(frame, result.resolvedSelector, null); + if (result.locatorCode != null) { + locator.stringRepresentation = result.locatorCode; } return locator; } @@ -136,10 +136,9 @@ public String ariaSnapshot(AriaSnapshotOptions options) { if (options == null) { options = new AriaSnapshotOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonObject result = frame.sendMessage("ariaSnapshot", params, frame.timeout(options.timeout)).getAsJsonObject(); - return result.get("snapshot").getAsString(); + FrameAriaSnapshotParams params = Utils.toProtocol(options, FrameAriaSnapshotParams.class); + params.selector = selector; + return frame.channel.ariaSnapshot(params, frame.timeout(options.timeout)).snapshot; } @Override @@ -147,10 +146,10 @@ public void blur(BlurOptions options) { if (options == null) { options = new BlurOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - params.addProperty("strict", true); - frame.sendMessage("blur", params, frame.timeout(options.timeout)); + FrameBlurParams params = Utils.toProtocol(options, FrameBlurParams.class); + params.selector = selector; + params.strict = true; + frame.channel.blur(params, frame.timeout(options.timeout)); } @Override @@ -680,12 +679,12 @@ public void waitFor(WaitForOptions options) { @Override public void waitForFunction(String expression, Object arg, WaitForFunctionOptions options) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - params.addProperty("strict", true); - params.addProperty("expression", expression); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - frame.sendMessage("waitForFunction", params, frame.timeout(options == null ? null : options.timeout)); + FrameWaitForFunctionParams params = new FrameWaitForFunctionParams(); + params.selector = selector; + params.strict = true; + params.expression = expression; + params.arg = serializeArgument(arg); + frame.channel.waitForFunction(params, frame.timeout(options == null ? null : options.timeout)); } @Override From a18bba0c406191011b9bbe633e4c195cb8fa0b3c Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:54:42 -0800 Subject: [PATCH 16/33] refactor(handles): use generated channel types in JSHandleImpl and ElementHandleImpl --- .../playwright/impl/ElementHandleImpl.java | 272 +++++++++--------- .../playwright/impl/JSHandleImpl.java | 42 ++- 2 files changed, 152 insertions(+), 162 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java index b97a2ab5a..762a757aa 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java @@ -16,11 +16,10 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.ElementHandle; import com.microsoft.playwright.Frame; +import com.microsoft.playwright.Locator; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.options.BoundingBox; import com.microsoft.playwright.options.ElementState; @@ -55,61 +54,52 @@ public ElementHandle asElement() { @Override public ElementHandle querySelector(String selector) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - JsonElement json = sendMessage("querySelector", params, NO_TIMEOUT); - JsonObject element = json.getAsJsonObject().getAsJsonObject("element"); - if (element == null) { - return null; - } - return connection.getExistingObject(element.get("guid").getAsString()); + ElementHandleQuerySelectorParams params = new ElementHandleQuerySelectorParams(); + params.selector = selector; + return channel.querySelector(params, NO_TIMEOUT).element; } @Override public List querySelectorAll(String selector) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - JsonElement json = sendMessage("querySelectorAll", params, NO_TIMEOUT); - JsonArray elements = json.getAsJsonObject().getAsJsonArray("elements"); + ElementHandleQuerySelectorAllParams params = new ElementHandleQuerySelectorAllParams(); + params.selector = selector; + List elements = channel.querySelectorAll(params, NO_TIMEOUT).elements; if (elements == null) { return null; } - List handles = new ArrayList<>(); - for (JsonElement item : elements) { - handles.add(connection.getExistingObject(item.getAsJsonObject().get("guid").getAsString())); - } - return handles; + return new ArrayList(elements); } @Override public Object evalOnSelector(String selector, String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evalOnSelector", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + ElementHandleEvalOnSelectorParams params = new ElementHandleEvalOnSelectorParams(); + params.selector = selector; + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evalOnSelector(params, NO_TIMEOUT).value); } @Override public Object evalOnSelectorAll(String selector, String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("selector", selector); - params.addProperty("expression", pageFunction); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evalOnSelectorAll", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + ElementHandleEvalOnSelectorAllParams params = new ElementHandleEvalOnSelectorAllParams(); + params.selector = selector; + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evalOnSelectorAll(params, NO_TIMEOUT).value); } @Override public BoundingBox boundingBox() { - JsonObject json = sendMessage("boundingBox").getAsJsonObject(); - if (!json.has("value")) { + Rect value = channel.boundingBox(NO_TIMEOUT).value; + if (value == null) { return null; } - return gson().fromJson(json.get("value"), BoundingBox.class); + BoundingBox box = new BoundingBox(); + box.x = value.x; + box.y = value.y; + box.width = value.width; + box.height = value.height; + return box; } @Override @@ -117,8 +107,8 @@ public void check(CheckOptions options) { if (options == null) { options = new CheckOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("check", params, frame.timeout(options.timeout)); + ElementHandleCheckParams params = Utils.toProtocol(options, ElementHandleCheckParams.class); + channel.check(params, frame.timeout(options.timeout)); } @Override @@ -126,17 +116,13 @@ public void click(ClickOptions options) { if (options == null) { options = new ClickOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("click", params, frame.timeout(options.timeout)); + ElementHandleClickParams params = Utils.toProtocol(options, ElementHandleClickParams.class); + channel.click(params, frame.timeout(options.timeout)); } @Override public Frame contentFrame() { - JsonObject json = sendMessage("contentFrame").getAsJsonObject(); - if (!json.has("frame")) { - return null; - } - return connection.getExistingObject(json.getAsJsonObject("frame").get("guid").getAsString()); + return channel.contentFrame(NO_TIMEOUT).frame; } @Override @@ -144,16 +130,16 @@ public void dblclick(DblclickOptions options) { if (options == null) { options = new DblclickOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("dblclick", params, frame.timeout(options.timeout)); + ElementHandleDblclickParams params = Utils.toProtocol(options, ElementHandleDblclickParams.class); + channel.dblclick(params, frame.timeout(options.timeout)); } @Override public void dispatchEvent(String type, Object eventInit) { - JsonObject params = new JsonObject(); - params.addProperty("type", type); - params.add("eventInit", gson().toJsonTree(serializeArgument(eventInit))); - sendMessage("dispatchEvent", params, NO_TIMEOUT); + ElementHandleDispatchEventParams params = new ElementHandleDispatchEventParams(); + params.type = type; + params.eventInit = serializeArgument(eventInit); + channel.dispatchEvent(params, NO_TIMEOUT); } @Override @@ -161,22 +147,21 @@ public void fill(String value, FillOptions options) { if (options == null) { options = new FillOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("value", value); - sendMessage("fill", params, frame.timeout(options.timeout)); + ElementHandleFillParams params = Utils.toProtocol(options, ElementHandleFillParams.class); + params.value = value; + channel.fill(params, frame.timeout(options.timeout)); } @Override public void focus() { - sendMessage("focus"); + channel.focus(NO_TIMEOUT); } @Override public String getAttribute(String name) { - JsonObject params = new JsonObject(); - params.addProperty("name", name); - JsonObject json = sendMessage("getAttribute", params, NO_TIMEOUT).getAsJsonObject(); - return json.has("value") ? json.get("value").getAsString() : null; + ElementHandleGetAttributeParams params = new ElementHandleGetAttributeParams(); + params.name = name; + return channel.getAttribute(params, NO_TIMEOUT).value; } @Override @@ -184,20 +169,18 @@ public void hover(HoverOptions options) { if (options == null) { options = new HoverOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("hover", params, frame.timeout(options.timeout)); + ElementHandleHoverParams params = Utils.toProtocol(options, ElementHandleHoverParams.class); + channel.hover(params, frame.timeout(options.timeout)); } @Override public String innerHTML() { - JsonObject json = sendMessage("innerHTML").getAsJsonObject(); - return json.get("value").getAsString(); + return channel.innerHTML(NO_TIMEOUT).value; } @Override public String innerText() { - JsonObject json = sendMessage("innerText").getAsJsonObject(); - return json.get("value").getAsString(); + return channel.innerText(NO_TIMEOUT).value; } @Override @@ -205,54 +188,43 @@ public String inputValue(InputValueOptions options) { if (options == null) { options = new InputValueOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonObject json = sendMessage("inputValue", params, NO_TIMEOUT).getAsJsonObject(); - return json.get("value").getAsString(); + ElementHandleInputValueParams params = Utils.toProtocol(options, ElementHandleInputValueParams.class); + return channel.inputValue(params, NO_TIMEOUT).value; } @Override public boolean isChecked() { - JsonObject json = sendMessage("isChecked").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isChecked(NO_TIMEOUT).value; } @Override public boolean isDisabled() { - JsonObject json = sendMessage("isDisabled").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isDisabled(NO_TIMEOUT).value; } @Override public boolean isEditable() { - JsonObject json = sendMessage("isEditable").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isEditable(NO_TIMEOUT).value; } @Override public boolean isEnabled() { - JsonObject json = sendMessage("isEnabled").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isEnabled(NO_TIMEOUT).value; } @Override public boolean isHidden() { - JsonObject json = sendMessage("isHidden").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isHidden(NO_TIMEOUT).value; } @Override public boolean isVisible() { - JsonObject json = sendMessage("isVisible").getAsJsonObject(); - return json.get("value").getAsBoolean(); + return channel.isVisible(NO_TIMEOUT).value; } @Override public FrameImpl ownerFrame() { - JsonObject json = sendMessage("ownerFrame").getAsJsonObject(); - if (!json.has("frame")) { - return null; - } - return connection.getExistingObject(json.getAsJsonObject("frame").get("guid").getAsString()); + return channel.ownerFrame(NO_TIMEOUT).frame; } @Override @@ -260,9 +232,9 @@ public void press(String key, PressOptions options) { if (options == null) { options = new PressOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("key", key); - sendMessage("press", params, frame.timeout(options.timeout)); + ElementHandlePressParams params = Utils.toProtocol(options, ElementHandlePressParams.class); + params.key = key; + channel.press(params, frame.timeout(options.timeout)); } @Override @@ -273,11 +245,20 @@ public byte[] screenshot(ScreenshotOptions options) { if (options.type == null && options.path != null) { options.type = Utils.screenshotTypeForPath(options.path); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.remove("path"); - JsonObject json = sendMessage("screenshot", params, frame.timeout(options.timeout)).getAsJsonObject(); - - byte[] buffer = Base64.getDecoder().decode(json.get("binary").getAsString()); + // The mask locators cannot be read back through Gson, they are converted below. + JsonObject json = gson().toJsonTree(options).getAsJsonObject(); + json.remove("mask"); + ElementHandleScreenshotParams params = gson().fromJson(json, ElementHandleScreenshotParams.class); + if (options.mask != null) { + params.mask = new ArrayList<>(); + for (Locator locator : options.mask) { + ElementHandleScreenshotParams.ElementHandleScreenshotParamsMask item = new ElementHandleScreenshotParams.ElementHandleScreenshotParamsMask(); + item.frame = ((LocatorImpl) locator).frame; + item.selector = ((LocatorImpl) locator).selector; + params.mask.add(item); + } + } + byte[] buffer = channel.screenshot(params, frame.timeout(options.timeout)).binary; if (options.path != null) { Utils.writeToFile(buffer, options.path); } @@ -289,8 +270,8 @@ public void scrollIntoViewIfNeeded(ScrollIntoViewIfNeededOptions options) { if (options == null) { options = new ScrollIntoViewIfNeededOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("scrollIntoViewIfNeeded", params, frame.timeout(options.timeout)); + ElementHandleScrollIntoViewIfNeededParams params = Utils.toProtocol(options, ElementHandleScrollIntoViewIfNeededParams.class); + channel.scrollIntoViewIfNeeded(params, frame.timeout(options.timeout)); } @Override @@ -310,9 +291,14 @@ public List selectOption(String[] values, SelectOptionOptions options) { if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + ElementHandleSelectOptionParams params = Utils.toProtocol(options, ElementHandleSelectOptionParams.class); if (values != null) { - params.add("options", toSelectValueOrLabel(values)); + params.options = new ArrayList<>(); + for (String value : values) { + ElementHandleSelectOptionParams.ElementHandleSelectOptionParamsOptions option = new ElementHandleSelectOptionParams.ElementHandleSelectOptionParamsOptions(); + option.valueOrLabel = value; + params.options.add(option); + } } return selectOption(params, options.timeout); } @@ -329,9 +315,16 @@ public List selectOption(SelectOption[] values, SelectOptionOptions opti if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + ElementHandleSelectOptionParams params = Utils.toProtocol(options, ElementHandleSelectOptionParams.class); if (values != null) { - params.add("options", gson().toJsonTree(values)); + params.options = new ArrayList<>(); + for (SelectOption value : values) { + ElementHandleSelectOptionParams.ElementHandleSelectOptionParamsOptions option = new ElementHandleSelectOptionParams.ElementHandleSelectOptionParamsOptions(); + option.value = value.value; + option.label = value.label; + option.index = value.index; + params.options.add(option); + } } return selectOption(params, options.timeout); } @@ -341,16 +334,18 @@ public List selectOption(ElementHandle[] values, SelectOptionOptions opt if (options == null) { options = new SelectOptionOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + ElementHandleSelectOptionParams params = Utils.toProtocol(options, ElementHandleSelectOptionParams.class); if (values != null) { - params.add("elements", Serialization.toProtocol(values)); + params.elements = new ArrayList<>(); + for (ElementHandle value : values) { + params.elements.add((ElementHandleImpl) value); + } } return selectOption(params, options.timeout); } - private List selectOption(JsonObject params, Double timeout) { - JsonObject json = sendMessage("selectOption", params, frame.timeout(timeout)).getAsJsonObject(); - return parseStringList(json.getAsJsonArray("values")); + private List selectOption(ElementHandleSelectOptionParams params, Double timeout) { + return channel.selectOption(params, frame.timeout(timeout)).values; } @Override @@ -358,8 +353,8 @@ public void selectText(SelectTextOptions options) { if (options == null) { options = new SelectTextOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("selectText", params, frame.timeout(options.timeout)); + ElementHandleSelectTextParams params = Utils.toProtocol(options, ElementHandleSelectTextParams.class); + channel.selectText(params, frame.timeout(options.timeout)); } @Override @@ -386,9 +381,17 @@ public void setInputFiles(Path[] files, SetInputFilesOptions options) { if (options == null) { options = new SetInputFilesOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - addFilePathUploadParams(files, params, frame.page().context()); - sendMessage("setInputFiles", params, frame.timeout(options.timeout)); + ElementHandleSetInputFilesParams params = Utils.toProtocol(options, ElementHandleSetInputFilesParams.class); + // java: addFilePathUploadParams (Utils) still fills a JsonObject, read it back into the typed params. + JsonObject upload = new JsonObject(); + addFilePathUploadParams(files, upload, frame.page().context()); + ElementHandleSetInputFilesParams uploadParams = connection.protocolGson().fromJson(upload, ElementHandleSetInputFilesParams.class); + params.payloads = uploadParams.payloads; + params.localDirectory = uploadParams.localDirectory; + params.directoryStream = uploadParams.directoryStream; + params.localPaths = uploadParams.localPaths; + params.streams = uploadParams.streams; + channel.setInputFiles(params, frame.timeout(options.timeout)); } @Override @@ -402,9 +405,16 @@ public void setInputFiles(FilePayload[] files, SetInputFilesOptions options) { if (options == null) { options = new SetInputFilesOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.add("payloads", Serialization.toJsonArray(files)); - sendMessage("setInputFiles", params, frame.timeout(options.timeout)); + ElementHandleSetInputFilesParams params = Utils.toProtocol(options, ElementHandleSetInputFilesParams.class); + params.payloads = new ArrayList<>(); + for (FilePayload file : files) { + ElementHandleSetInputFilesParams.ElementHandleSetInputFilesParamsPayloads payload = new ElementHandleSetInputFilesParams.ElementHandleSetInputFilesParamsPayloads(); + payload.name = file.name; + payload.mimeType = file.mimeType; + payload.buffer = file.buffer; + params.payloads.add(payload); + } + channel.setInputFiles(params, frame.timeout(options.timeout)); } @Override @@ -412,14 +422,13 @@ public void tap(TapOptions options) { if (options == null) { options = new TapOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("tap", params, frame.timeout(options.timeout)); + ElementHandleTapParams params = Utils.toProtocol(options, ElementHandleTapParams.class); + channel.tap(params, frame.timeout(options.timeout)); } @Override public String textContent() { - JsonObject json = sendMessage("textContent").getAsJsonObject(); - return json.has("value") ? json.get("value").getAsString() : null; + return channel.textContent(NO_TIMEOUT).value; } @Override @@ -427,9 +436,9 @@ public void type(String text, TypeOptions options) { if (options == null) { options = new TypeOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("text", text); - sendMessage("type", params, frame.timeout(options.timeout)); + ElementHandleTypeParams params = Utils.toProtocol(options, ElementHandleTypeParams.class); + params.text = text; + channel.type(params, frame.timeout(options.timeout)); } @Override @@ -437,8 +446,8 @@ public void uncheck(UncheckOptions options) { if (options == null) { options = new UncheckOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("uncheck", params, frame.timeout(options.timeout)); + ElementHandleUncheckParams params = Utils.toProtocol(options, ElementHandleUncheckParams.class); + channel.uncheck(params, frame.timeout(options.timeout)); } @Override @@ -449,13 +458,9 @@ public void waitForElementState(ElementState state, WaitForElementStateOptions o if (state == null) { throw new IllegalArgumentException("State cannot be null"); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("state", toProtocol(state)); - sendMessage("waitForElementState", params, frame.timeout(options.timeout)); - } - - private static String toProtocol(ElementState state) { - return state.toString().toLowerCase(); + ElementHandleWaitForElementStateParams params = Utils.toProtocol(options, ElementHandleWaitForElementStateParams.class); + params.state = state.toString().toLowerCase(); + channel.waitForElementState(params, frame.timeout(options.timeout)); } @Override @@ -463,13 +468,8 @@ public ElementHandle waitForSelector(String selector, WaitForSelectorOptions opt if (options == null) { options = new WaitForSelectorOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("selector", selector); - JsonElement json = sendMessage("waitForSelector", params, frame.timeout(options.timeout)).getAsJsonObject(); - JsonObject element = json.getAsJsonObject().getAsJsonObject("element"); - if (element == null) { - return null; - } - return connection.getExistingObject(element.get("guid").getAsString()); + ElementHandleWaitForSelectorParams params = Utils.toProtocol(options, ElementHandleWaitForSelectorParams.class); + params.selector = selector; + return channel.waitForSelector(params, frame.timeout(options.timeout)).element; } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java index 20ac0d8a7..2d4f73234 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java @@ -44,57 +44,47 @@ public ElementHandle asElement() { @Override public void dispose() { try { - sendMessage("dispose"); + channel.dispose(NO_TIMEOUT); } catch (TargetClosedError e) { } } @Override public Object evaluate(String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", pageFunction); - params.addProperty("world", "main"); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpression", params, NO_TIMEOUT); - SerializedValue value = gson().fromJson(json.getAsJsonObject().get("value"), SerializedValue.class); - return deserialize(value); + JSHandleEvaluateExpressionParams params = new JSHandleEvaluateExpressionParams(); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return deserialize(channel.evaluateExpression(params, NO_TIMEOUT).value); } @Override public JSHandle evaluateHandle(String pageFunction, Object arg) { - JsonObject params = new JsonObject(); - params.addProperty("expression", pageFunction); - params.addProperty("world", "main"); - params.add("arg", gson().toJsonTree(serializeArgument(arg))); - JsonElement json = sendMessage("evaluateExpressionHandle", params, NO_TIMEOUT); - return connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("handle").get("guid").getAsString()); + JSHandleEvaluateExpressionHandleParams params = new JSHandleEvaluateExpressionHandleParams(); + params.expression = pageFunction; + params.arg = serializeArgument(arg); + return channel.evaluateExpressionHandle(params, NO_TIMEOUT).handle; } @Override public Map getProperties() { - JsonObject json = sendMessage("getPropertyList").getAsJsonObject(); + JSHandleGetPropertyListResult json = channel.getPropertyList(NO_TIMEOUT); Map result = new HashMap<>(); - for (JsonElement e : json.getAsJsonArray("properties")) { - JsonObject item = e.getAsJsonObject(); - JSHandle value = connection.getExistingObject(item.getAsJsonObject("value").get("guid").getAsString()); - result.put(item.get("name").getAsString(), value); + for (JSHandleGetPropertyListResult.JSHandleGetPropertyListResultProperties item : json.properties) { + result.put(item.name, item.value); } return result; } @Override public JSHandle getProperty(String propertyName) { - JsonObject params = new JsonObject(); - params.addProperty("name", propertyName); - JsonObject json = sendMessage("getProperty", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(json.getAsJsonObject("handle").get("guid").getAsString()); + JSHandleGetPropertyParams params = new JSHandleGetPropertyParams(); + params.name = propertyName; + return channel.getProperty(params, NO_TIMEOUT).handle; } @Override public Object jsonValue() { - JsonObject json = sendMessage("jsonValue").getAsJsonObject(); - SerializedValue value = gson().fromJson(json.get("value"), SerializedValue.class); - return deserialize(value); + return deserialize(channel.jsonValue(NO_TIMEOUT).value); } @Override From db8639f0b16c29585db93ffc60e9e9d70876d882 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:55:39 -0800 Subject: [PATCH 17/33] refactor(utils): use generated channel types in createTempFiles --- .../com/microsoft/playwright/impl/Utils.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index 536ad7a34..9c94c4fd0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -240,11 +240,11 @@ private static JsonArray copyLocalToTempFiles(BrowserContextImpl context, List

localPaths) { - JsonObject tempFilesParams = new JsonObject(); + BrowserContextCreateTempFilesParams params = new BrowserContextCreateTempFilesParams(); if (localDirectory != null) { - tempFilesParams.addProperty("rootDirName", localDirectory.getFileName().toString()); + params.rootDirName = localDirectory.getFileName().toString(); } - JsonArray items = new JsonArray(); + params.items = new ArrayList<>(); for (Path path : localPaths) { long lastModifiedMs; try { @@ -258,13 +258,14 @@ private static JsonObject createTempFiles(BrowserContextImpl context, Path local } else { name = localDirectory.relativize(path); } - JsonObject item = new JsonObject(); - item.addProperty("name", name.toString()); - item.addProperty("lastModifiedMs", lastModifiedMs); - items.add(item); - } - tempFilesParams.add("items", items); - return context.sendMessage("createTempFiles", tempFilesParams, NO_TIMEOUT).getAsJsonObject(); + BrowserContextCreateTempFilesParams.BrowserContextCreateTempFilesParamsItems item = new BrowserContextCreateTempFilesParams.BrowserContextCreateTempFilesParamsItems(); + item.name = name.toString(); + item.lastModifiedMs = (double) lastModifiedMs; + params.items.add(item); + } + BrowserContextCreateTempFilesResult result = context.channel.createTempFiles(params, NO_TIMEOUT); + // java: the caller still reads the reply as JsonObject ({guid} refs), see copyLocalToTempFiles. + return context.connection.protocolGson().toJsonTree(result).getAsJsonObject(); } static void checkFilePayloadSize(FilePayload[] files) { From fdbcfdde81c1383c02ace91372593d5b14013924 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:53:00 -0800 Subject: [PATCH 18/33] refactor(tracing): use generated channel types in TracingImpl, LocalUtils, HARRouter --- .../microsoft/playwright/impl/HARRouter.java | 70 +++++----- .../microsoft/playwright/impl/LocalUtils.java | 50 +++---- .../playwright/impl/TracingImpl.java | 128 ++++++++---------- 3 files changed, 114 insertions(+), 134 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java index c932cc99c..52fe717d3 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java @@ -16,22 +16,20 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Request; import com.microsoft.playwright.Route; import com.microsoft.playwright.options.HarNotFound; +import com.microsoft.playwright.options.HttpHeader; import java.nio.file.Path; -import java.util.Base64; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; import static com.microsoft.playwright.impl.LoggingSupport.*; -import static com.microsoft.playwright.impl.Serialization.fromNameValues; -import static com.microsoft.playwright.impl.Serialization.gson; public class HARRouter { private final LocalUtils localUtils; @@ -42,40 +40,45 @@ public class HARRouter { this.localUtils = localUtils; this.defaultAction = defaultAction; - JsonObject params = new JsonObject(); - params.addProperty("file", harFile.toString()); - JsonObject json = localUtils.sendMessage("harOpen", params, NO_TIMEOUT).getAsJsonObject(); - if (json.has("error")) { - throw new PlaywrightException(json.get("error").getAsString()); + LocalUtilsHarOpenParams params = new LocalUtilsHarOpenParams(); + params.file = harFile.toString(); + LocalUtilsHarOpenResult result = localUtils.channel.harOpen(params, NO_TIMEOUT); + if (result.error != null) { + throw new PlaywrightException(result.error); } - harId = json.get("harId").getAsString(); + harId = result.harId; } void handle(Route route) { Request request = route.request(); - JsonObject params = new JsonObject(); - params.addProperty("harId", harId); - params.addProperty("url", request.url()); - params.addProperty("method", request.method()); - params.add("headers", gson().toJsonTree(request.headersArray())); + LocalUtilsHarLookupParams params = new LocalUtilsHarLookupParams(); + params.harId = harId; + params.url = request.url(); + params.method = request.method(); + params.headers = new ArrayList<>(); + for (HttpHeader header : request.headersArray()) { + NameValue nv = new NameValue(); + nv.name = header.name; + nv.value = header.value; + params.headers.add(nv); + } if (request.postDataBuffer() != null) { - String base64 = Base64.getEncoder().encodeToString(request.postDataBuffer()); - params.addProperty("postData", base64); + params.postData = request.postDataBuffer(); } - params.addProperty("isNavigationRequest", request.isNavigationRequest()); - JsonObject response = localUtils.sendMessage("harLookup", params, NO_TIMEOUT).getAsJsonObject(); + params.isNavigationRequest = request.isNavigationRequest(); + LocalUtilsHarLookupResult response = localUtils.channel.harLookup(params, NO_TIMEOUT); - String action = response.get("action").getAsString(); + String action = response.action; if ("redirect".equals(action)) { - String redirectURL = response.get("redirectURL").getAsString(); + String redirectURL = response.redirectURL; logApiIfEnabled("HAR: " + route.request().url() + " redirected to " + redirectURL); ((RouteImpl) route).redirectNavigationRequest(redirectURL); return; } if ("fulfill".equals(action)) { - int status = response.get("status").getAsInt(); + int status = response.status; // If the response status is -1, the request was canceled or stalled, so we just stall it here. // See https://github.com/microsoft/playwright/issues/29311. // TODO: it'd be better to abort such requests, but then we likely need to respect the timing, @@ -84,8 +87,8 @@ void handle(Route route) { if (status == -1) { return; } - Map headers = mergeSetCookieHeaders(response.getAsJsonArray("headers")); - byte[] buffer = Base64.getDecoder().decode(response.get("body").getAsString()); + Map headers = mergeSetCookieHeaders(response.headers); + byte[] buffer = response.body; route.fulfill(new Route.FulfillOptions() .setStatus(status) .setHeaders(headers) @@ -94,7 +97,7 @@ void handle(Route route) { } if ("error".equals(action)) { - logApiIfEnabled("HAR: " + response.get("message").getAsString()); + logApiIfEnabled("HAR: " + response.message); // Report the error, but fall through to the default handler. } @@ -107,12 +110,11 @@ void handle(Route route) { route.abort(); } - private static Map mergeSetCookieHeaders(JsonArray headersArray) { + private static Map mergeSetCookieHeaders(List headersArray) { Map result = new java.util.LinkedHashMap<>(); - for (JsonElement element : headersArray) { - JsonObject pair = element.getAsJsonObject(); - String name = pair.get("name").getAsString(); - String value = pair.get("value").getAsString(); + for (NameValue pair : headersArray) { + String name = pair.name; + String value = pair.value; if ("set-cookie".equalsIgnoreCase(name)) { if (!result.containsKey("set-cookie")) { result.put("set-cookie", value); @@ -127,8 +129,8 @@ private static Map mergeSetCookieHeaders(JsonArray headersArray) } void dispose() { - JsonObject params = new JsonObject(); - params.addProperty("harId", harId); - localUtils.sendMessageAsync("harClose", params); + LocalUtilsHarCloseParams params = new LocalUtilsHarCloseParams(); + params.harId = harId; + localUtils.sendMessageAsync("harClose", localUtils.connection.protocolGson().toJsonTree(params).getAsJsonObject()); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java index abea79bb0..6915147ae 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java @@ -36,48 +36,40 @@ JsonArray deviceDescriptors() { return initializer.getAsJsonArray("deviceDescriptors"); } - void zip(Path zipFile, JsonArray entries, String stacksId, boolean appendMode, boolean includeSources, List additionalSources) { - JsonObject params = new JsonObject(); - params.addProperty("zipFile", zipFile.toString()); - params.add("entries", entries); - params.addProperty("mode", appendMode ? "append" : "write"); - params.addProperty("stacksId", stacksId); - params.addProperty("includeSources", includeSources); + void zip(Path zipFile, List entries, String stacksId, boolean appendMode, boolean includeSources, List additionalSources) { + LocalUtilsZipParams params = new LocalUtilsZipParams(); + params.zipFile = zipFile.toString(); + params.entries = entries; + params.mode = appendMode ? "append" : "write"; + params.stacksId = stacksId; + params.includeSources = includeSources; if (!additionalSources.isEmpty()) { - JsonArray sourcesArray = new JsonArray(); - for (String source : additionalSources) { - sourcesArray.add(source); - } - params.add("additionalSources", sourcesArray); + params.additionalSources = additionalSources; } - sendMessage("zip", params, NO_TIMEOUT); + channel.zip(params, NO_TIMEOUT); } void traceDiscarded(String stacksId) { - JsonObject params = new JsonObject(); - params.addProperty("stacksId", stacksId); - sendMessage("traceDiscarded", params, NO_TIMEOUT); + LocalUtilsTraceDiscardedParams params = new LocalUtilsTraceDiscardedParams(); + params.stacksId = stacksId; + channel.traceDiscarded(params, NO_TIMEOUT); } String tracingStarted(String tracesDir, String traceName) { - JsonObject params = new JsonObject(); + LocalUtilsTracingStartedParams params = new LocalUtilsTracingStartedParams(); if (tracesDir != null) { - params.addProperty("tracesDir", ""); + params.tracesDir = ""; } - params.addProperty("traceName", traceName); - JsonObject json = connection.localUtils().sendMessage("tracingStarted", params, NO_TIMEOUT).getAsJsonObject(); - return json.get("stacksId").getAsString(); + params.traceName = traceName; + return connection.localUtils().channel.tracingStarted(params, NO_TIMEOUT).stacksId; } public Pattern globToRegex(String glob, String baseURL, boolean webSocketUrl) { - JsonObject params = new JsonObject(); - params.addProperty("glob", glob); - if (baseURL != null) { - params.addProperty("baseURL", baseURL); - } - params.addProperty("webSocketUrl", webSocketUrl); - JsonObject json = connection.localUtils().sendMessage("globToRegex", params, NO_TIMEOUT).getAsJsonObject(); - String regex = json.get("regex").getAsString(); + LocalUtilsGlobToRegexParams params = new LocalUtilsGlobToRegexParams(); + params.glob = glob; + params.baseURL = baseURL; + params.webSocketUrl = webSocketUrl; + String regex = connection.localUtils().channel.globToRegex(params, NO_TIMEOUT).regex; return Pattern.compile(regex); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java index 5e5d5967d..43330d172 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java @@ -16,8 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Tracing; @@ -32,9 +30,9 @@ import java.util.List; import java.util.Map; import java.util.Set; +import java.util.regex.Pattern; -import static com.microsoft.playwright.impl.Serialization.addHarUrlFilter; -import static com.microsoft.playwright.impl.Serialization.gson; +import static com.microsoft.playwright.impl.Utils.toProtocol; class TracingImpl extends ChannelOwner implements Tracing { private boolean includeSources; @@ -91,11 +89,11 @@ private void stopChunkImpl(Path path) { } private void saveChunk(Path path, String stacksId, List capturedAdditionalSources) { - JsonObject params = new JsonObject(); + TracingTracingStopChunkParams params = new TracingTracingStopChunkParams(); // Not interested in artifacts. if (path == null) { - params.addProperty("mode", "discard"); - sendMessage("tracingStopChunk", params, NO_TIMEOUT); + params.mode = "discard"; + channel.tracingStopChunk(params, NO_TIMEOUT); if (stacksId != null) { connection.localUtils().traceDiscarded(stacksId); } @@ -104,23 +102,22 @@ private void saveChunk(Path path, String stacksId, List capturedAddition boolean isLocal = !connection.isRemote; if (isLocal) { - params.addProperty("mode", "entries"); - JsonObject json = sendMessage("tracingStopChunk", params, NO_TIMEOUT).getAsJsonObject(); - JsonArray entries = json.getAsJsonArray("entries"); - connection.localUtils.zip(path, entries, stacksId, false, includeSources, capturedAdditionalSources); + params.mode = "entries"; + TracingTracingStopChunkResult result = channel.tracingStopChunk(params, NO_TIMEOUT); + connection.localUtils.zip(path, result.entries, stacksId, false, includeSources, capturedAdditionalSources); return; } - params.addProperty("mode", "archive"); - JsonObject json = sendMessage("tracingStopChunk", params, NO_TIMEOUT).getAsJsonObject(); + params.mode = "archive"; + TracingTracingStopChunkResult json = channel.tracingStopChunk(params, NO_TIMEOUT); // The artifact may be missing if the browser closed while stopping tracing. - if (!json.has("artifact")) { + if (json.artifact == null) { if (stacksId != null) { connection.localUtils().traceDiscarded(stacksId); } return; } - ArtifactImpl artifact = connection.getExistingObject(json.getAsJsonObject("artifact").get("guid").getAsString()); + ArtifactImpl artifact = json.artifact; try { artifact.saveAs(path); } catch (RuntimeException e) { @@ -133,7 +130,7 @@ private void saveChunk(Path path, String stacksId, List capturedAddition } artifact.delete(); - connection.localUtils.zip(path, new JsonArray(), stacksId, true, includeSources, capturedAdditionalSources); + connection.localUtils.zip(path, new ArrayList<>(), stacksId, true, includeSources, capturedAdditionalSources); } @Override @@ -158,26 +155,22 @@ private void groupImpl(String name, GroupOptions options) { if (options.location != null) { additionalSources.add(options.location.file); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("name", name); - sendMessage("tracingGroup", params, NO_TIMEOUT); + TracingTracingGroupParams params = toProtocol(options, TracingTracingGroupParams.class); + params.name = name; + channel.tracingGroup(params, NO_TIMEOUT); } @Override public void groupEnd() { - sendMessage("tracingGroupEnd"); + channel.tracingGroupEnd(NO_TIMEOUT); } private void tracingStartChunk(String name, String title) { - JsonObject params = new JsonObject(); - if (name != null) { - params.addProperty("name", name); - } - if (title != null) { - params.addProperty("title", title); - } - JsonObject result = sendMessage("tracingStartChunk", params, NO_TIMEOUT).getAsJsonObject(); - startCollectingStacks(result.get("traceName").getAsString()); + TracingTracingStartChunkParams params = new TracingTracingStartChunkParams(); + params.name = name; + params.title = title; + TracingTracingStartChunkResult result = channel.tracingStartChunk(params, NO_TIMEOUT); + startCollectingStacks(result.traceName); } private void startCollectingStacks(String traceName) { @@ -194,14 +187,12 @@ public AutoCloseable start(StartOptions options) { options = new StartOptions(); } includeSources = options.sources != null && options.sources; - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.remove("sources"); - params.remove("title"); - renameProperty(params, "snapshots", "snapshotDom"); - renameProperty(params, "ariaSnapshots", "snapshotAria"); - renameProperty(params, "screenSnapshots", "snapshotScreen"); - renameProperty(params, "screenshots", "screencast"); - sendMessage("tracingStart", params, NO_TIMEOUT); + TracingTracingStartParams params = toProtocol(options, TracingTracingStartParams.class); + params.snapshotDom = options.snapshots; + params.snapshotAria = options.ariaSnapshots; + params.snapshotScreen = options.screenSnapshots; + params.screencast = options.screenshots; + channel.tracingStart(params, NO_TIMEOUT); tracingStartChunk(options.name, options.title); return new DisposableStub(this::stop); } @@ -211,14 +202,7 @@ public void stop(StopOptions options) { try { stopChunkImpl(options == null ? null : options.path); } finally { - sendMessage("tracingStop"); - } - } - - private static void renameProperty(JsonObject params, String from, String to) { - JsonElement value = params.remove(from); - if (value != null) { - params.add(to, value); + channel.tracingStop(NO_TIMEOUT); } } @@ -268,25 +252,28 @@ String recordIntoHar(PageImpl page, Path har, Object urlFilter, HarContentPolicy mode = HarMode.MINIMAL; } - JsonObject params = new JsonObject(); - if (page != null) { - params.add("page", page.toProtocolRef()); + TracingHarStartParams params = new TracingHarStartParams(); + params.page = page; + // The old "zip" key is not part of the protocol anymore (the generated RecordHarOptions has no such field). + RecordHarOptions recordHarArgs = new RecordHarOptions(); + recordHarArgs.content = contentPolicy.name().toLowerCase(); + recordHarArgs.mode = mode.name().toLowerCase(); + if (urlFilter instanceof String) { + recordHarArgs.urlGlob = (String) urlFilter; + } else if (urlFilter instanceof Pattern) { + Pattern pattern = (Pattern) urlFilter; + recordHarArgs.urlRegexSource = pattern.pattern(); + recordHarArgs.urlRegexFlags = Utils.toJsRegexFlags(pattern); } - JsonObject recordHarArgs = new JsonObject(); - recordHarArgs.addProperty("zip", isZip(har)); - recordHarArgs.addProperty("content", contentPolicy.name().toLowerCase()); - recordHarArgs.addProperty("mode", mode.name().toLowerCase()); - addHarUrlFilter(recordHarArgs, urlFilter); if (resourcesDir != null) { - recordHarArgs.addProperty("resourcesDir", resourcesDir.toString()); + recordHarArgs.resourcesDir = resourcesDir.toString(); } if (!isZip(har)) { - recordHarArgs.addProperty("harPath", har.toString()); + recordHarArgs.harPath = har.toString(); } - params.add("options", recordHarArgs); - JsonObject json = sendMessage("harStart", params, NO_TIMEOUT).getAsJsonObject(); - String harId = json.get("harId").getAsString(); + params.options = recordHarArgs; + String harId = channel.harStart(params, NO_TIMEOUT).harId; harRecorders.put(harId, new HarRecorder(har, contentPolicy)); return harId; } @@ -299,22 +286,21 @@ void exportHar(String harId) { boolean isLocal = !connection.isRemote; boolean isZip = isZip(harParams.path); - JsonObject params = new JsonObject(); - params.addProperty("harId", harId); + TracingHarExportParams params = new TracingHarExportParams(); + params.harId = harId; if (isLocal) { - params.addProperty("mode", "entries"); - JsonObject json = sendMessage("harExport", params, NO_TIMEOUT).getAsJsonObject(); + params.mode = "entries"; + TracingHarExportResult json = channel.harExport(params, NO_TIMEOUT); if (!isZip) { return; } - JsonArray entries = json.getAsJsonArray("entries"); - connection.localUtils.zip(harParams.path, entries, null, false, false, java.util.Collections.emptyList()); + connection.localUtils.zip(harParams.path, json.entries, null, false, false, java.util.Collections.emptyList()); return; } - params.addProperty("mode", "archive"); - JsonObject json = sendMessage("harExport", params, NO_TIMEOUT).getAsJsonObject(); - ArtifactImpl artifact = connection.getExistingObject(json.getAsJsonObject("artifact").get("guid").getAsString()); + params.mode = "archive"; + TracingHarExportResult json = channel.harExport(params, NO_TIMEOUT); + ArtifactImpl artifact = json.artifact; if (isZip) { artifact.saveAs(harParams.path); artifact.delete(); @@ -322,10 +308,10 @@ void exportHar(String harId) { } String tmpPath = harParams.path + ".tmp"; artifact.saveAs(Paths.get(tmpPath)); - JsonObject unzipParams = new JsonObject(); - unzipParams.addProperty("zipFile", tmpPath); - unzipParams.addProperty("harFile", harParams.path.toString()); - connection.localUtils.sendMessage("harUnzip", unzipParams, NO_TIMEOUT); + LocalUtilsHarUnzipParams unzipParams = new LocalUtilsHarUnzipParams(); + unzipParams.zipFile = tmpPath; + unzipParams.harFile = harParams.path.toString(); + connection.localUtils.channel.harUnzip(unzipParams, NO_TIMEOUT); artifact.delete(); } From 8a5a1cecc09d36da98030c488a65b56172cd1e42 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:53:01 -0800 Subject: [PATCH 19/33] refactor(fetch): use generated channel types in APIRequestContextImpl, APIRequestImpl --- .../impl/APIRequestContextImpl.java | 94 ++++++++++--------- .../playwright/impl/APIRequestImpl.java | 52 +++++++--- 2 files changed, 93 insertions(+), 53 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java index 1fb0230fc..153bcee33 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java @@ -17,6 +17,7 @@ package com.microsoft.playwright.impl; import com.google.gson.*; +import com.google.gson.reflect.TypeToken; import com.microsoft.playwright.APIRequestContext; import com.microsoft.playwright.APIResponse; import com.microsoft.playwright.PlaywrightException; @@ -37,6 +38,7 @@ import static com.microsoft.playwright.impl.Serialization.*; import static com.microsoft.playwright.impl.Utils.toFilePayload; +import static com.microsoft.playwright.impl.Utils.toProtocol; import static java.util.Arrays.asList; class APIRequestContextImpl extends ChannelOwner implements APIRequestContext { @@ -64,21 +66,21 @@ public List cookies(String url) { @Override public List cookies(List urls) { - JsonObject params = new JsonObject(); + APIRequestContextCookiesParams params = new APIRequestContextCookiesParams(); if (urls == null) { urls = new ArrayList<>(); } - params.add("urls", gson().toJsonTree(urls)); - JsonObject json = sendMessage("cookies", params, NO_TIMEOUT).getAsJsonObject(); - Cookie[] cookies = gson().fromJson(json.getAsJsonArray("cookies"), Cookie[].class); + params.urls = urls; + APIRequestContextCookiesResult result = channel.cookies(params, NO_TIMEOUT); + Cookie[] cookies = gson().fromJson(gson().toJsonTree(result.cookies), Cookie[].class); return asList(cookies); } @Override public void addCookies(List cookies) { - JsonObject params = new JsonObject(); - params.add("cookies", gson().toJsonTree(cookies)); - sendMessage("addCookies", params, NO_TIMEOUT); + APIRequestContextAddCookiesParams params = new APIRequestContextAddCookiesParams(); + params.cookies = gson().fromJson(gson().toJsonTree(cookies), new TypeToken>() {}.getType()); + channel.addCookies(params, NO_TIMEOUT); } @Override @@ -86,7 +88,9 @@ public void clearCookies(ClearCookiesOptions options) { if (options == null) { options = new ClearCookiesOptions(); } - sendMessage("clearCookies", toClearCookiesParams(options.name, options.domain, options.path), NO_TIMEOUT); + APIRequestContextClearCookiesParams params = gson().fromJson( + toClearCookiesParams(options.name, options.domain, options.path), APIRequestContextClearCookiesParams.class); + channel.clearCookies(params, NO_TIMEOUT); } @Override @@ -100,8 +104,7 @@ public void dispose(DisposeOptions options) { options = new DisposeOptions(); } disposeReason = options.reason; - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("dispose", params, NO_TIMEOUT); + channel.dispose(toProtocol(options, APIRequestContextDisposeParams.class), NO_TIMEOUT); tracing.resetStackCounter(); } @@ -136,20 +139,18 @@ private APIResponse fetchImpl(String url, RequestOptionsImpl options) { options = new RequestOptionsImpl(); } options.timeout = timeoutSettings.timeout(options.timeout); - JsonObject params = new JsonObject(); - params.addProperty("url", url); + APIRequestContextFetchParams params = new APIRequestContextFetchParams(); + params.url = url; if (options.params != null) { Map queryParams = new LinkedHashMap<>(); for (Map.Entry e : options.params.entrySet()) { queryParams.put(e.getKey(), "" + e.getValue()); } - params.add("params", toNameValueArray(queryParams.entrySet())); - } - if (options.method != null) { - params.addProperty("method", options.method); + params.params = toNameValues(toNameValueArray(queryParams.entrySet())); } + params.method = options.method; if (options.headers != null) { - params.add("headers", toProtocol(options.headers)); + params.headers = toNameValues(Serialization.toProtocol(options.headers)); } if (options.data != null) { @@ -163,38 +164,45 @@ private APIResponse fetchImpl(String url, RequestOptionsImpl options) { } } if (bytes == null) { - params.addProperty("jsonData", jsonDataSerializer.toJson(options.data)); + params.jsonData = jsonDataSerializer.toJson(options.data); } else { - String base64 = Base64.getEncoder().encodeToString(bytes); - params.addProperty("postData", base64); + params.postData = bytes; } } if (options.form != null) { - params.add("formData", toNameValueArray(options.form.fields)); + params.formData = toNameValues(toNameValueArray(options.form.fields)); } if (options.multipart != null) { - params.add("multipartData", serializeMultipartData(options.multipart.fields)); - } - if (options.failOnStatusCode != null) { - params.addProperty("failOnStatusCode", options.failOnStatusCode); - } - if (options.ignoreHTTPSErrors != null) { - params.addProperty("ignoreHTTPSErrors", options.ignoreHTTPSErrors); + params.multipartData = serializeMultipartData(options.multipart.fields); } + params.failOnStatusCode = options.failOnStatusCode; + params.ignoreHTTPSErrors = options.ignoreHTTPSErrors; if (options.maxRedirects != null) { if (options.maxRedirects < 0) { throw new PlaywrightException("'maxRedirects' should be greater than or equal to '0'"); } - params.addProperty("maxRedirects", options.maxRedirects); + params.maxRedirects = options.maxRedirects; } if (options.maxRetries != null) { if (options.maxRetries < 0) { throw new PlaywrightException("'maxRetries' must be greater than or equal to '0'"); } - params.addProperty("maxRetries", options.maxRetries); + params.maxRetries = options.maxRetries; } - JsonObject json = sendMessage("fetch", params, timeoutSettings.timeout(options.timeout)).getAsJsonObject(); - return new APIResponseImpl(this, json.getAsJsonObject("response")); + APIRequestContextFetchResult result = channel.fetch(params, timeoutSettings.timeout(options.timeout)); + return new APIResponseImpl(this, connection.protocolGson().toJsonTree(result.response).getAsJsonObject()); + } + + private static List toNameValues(JsonArray array) { + List result = new ArrayList<>(); + for (JsonElement element : array) { + JsonObject item = element.getAsJsonObject(); + NameValue nv = new NameValue(); + nv.name = item.get("name").getAsString(); + nv.value = item.get("value").getAsString(); + result.add(nv); + } + return result; } private static boolean isJsonContentType(Map headers) { @@ -209,8 +217,8 @@ private static boolean isJsonContentType(Map headers) { return false; } - private static JsonArray serializeMultipartData(List> data) { - JsonArray result = new JsonArray(); + private static List serializeMultipartData(List> data) { + List result = new ArrayList<>(); for (Map.Entry e : data) { FilePayload filePayload = null; if (e.getValue() instanceof FilePayload) { @@ -220,12 +228,15 @@ private static JsonArray serializeMultipartData(List clientCertificateList = options.clientCertificates; options.clientCertificates = null; + // The protocol always takes a list (mirrors toHttpCredentialsProtocol() in the JS client). + Object httpCredentials = options.httpCredentials; + options.httpCredentials = null; Double timeout = options.timeout; // Timeout is handled on the client. options.timeout = null; - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + PlaywrightNewRequestParams params = toProtocol(options, PlaywrightNewRequestParams.class); if (storageState != null) { - params.add("storageState", storageState); + params.storageState = storageState; } - addToProtocol(params, clientCertificateList); - Utils.addHttpCredentialsToProtocol(params); - JsonObject result = playwright.sendMessage("newRequest", params, NO_TIMEOUT).getAsJsonObject(); - APIRequestContextImpl context = playwright.connection.getExistingObject(result.getAsJsonObject("request").get("guid").getAsString()); + if (clientCertificateList != null) { + params.clientCertificates = new ArrayList<>(); + for (ClientCertificate cert : clientCertificateList) { + PlaywrightNewRequestParams.PlaywrightNewRequestParamsClientCertificates c = new PlaywrightNewRequestParams.PlaywrightNewRequestParamsClientCertificates(); + c.origin = cert.origin; + try { + c.cert = cert.certPath != null ? Files.readAllBytes(cert.certPath) : cert.cert; + c.key = cert.keyPath != null ? Files.readAllBytes(cert.keyPath) : cert.key; + c.pfx = cert.pfxPath != null ? Files.readAllBytes(cert.pfxPath) : cert.pfx; + } catch (IOException e) { + throw new PlaywrightException("Failed to read from file", e); + } + c.passphrase = cert.passphrase; + params.clientCertificates.add(c); + } + } + if (httpCredentials != null) { + JsonElement credentials = gson().toJsonTree(httpCredentials); + JsonArray list = new JsonArray(); + if (credentials.isJsonArray()) { + list.addAll(credentials.getAsJsonArray()); + } else { + list.add(credentials); + } + if (list.size() > 0) { + params.httpCredentials = gson().fromJson(list, new TypeToken>() {}.getType()); + } + } + APIRequestContextImpl context = playwright.channel.newRequest(params, NO_TIMEOUT).request; context.timeoutSettings.setDefaultTimeout(timeout); return context; } From f1f0f5d01fac7f6d0f299d578f964889be71ec36 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:56:50 -0800 Subject: [PATCH 20/33] refactor(fetch): keep raw storageState reply to preserve number formatting --- .../com/microsoft/playwright/impl/APIRequestContextImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java index 153bcee33..a575dec20 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java @@ -274,8 +274,9 @@ public String storageState(StorageStateOptions options) { options = new StorageStateOptions(); } APIRequestContextStorageStateParams params = toProtocol(options, APIRequestContextStorageStateParams.class); - APIRequestContextStorageStateResult result = channel.storageState(params, NO_TIMEOUT); - String storageState = gson().toJson(result); + // Keep the raw reply: re-serializing the typed result would turn "expires":-1 into -1.0 and change the string + // that is compared with BrowserContext.storageState(). + String storageState = sendMessage("storageState", connection.protocolGson().toJsonTree(params).getAsJsonObject(), NO_TIMEOUT).toString(); if (options.path != null) { Utils.writeToFile(storageState.getBytes(StandardCharsets.UTF_8), options.path); } From 8f642e98bc5554975ef959703435966f335103b8 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 13:54:28 -0800 Subject: [PATCH 21/33] refactor(browser): use generated channel types in BrowserContextImpl, BrowserImpl, BrowserTypeImpl, Connection.Root --- .../playwright/impl/BrowserContextImpl.java | 112 +++++++-------- .../playwright/impl/BrowserImpl.java | 130 ++++++++++-------- .../playwright/impl/BrowserTypeImpl.java | 91 ++++++------ .../microsoft/playwright/impl/Connection.java | 8 +- 4 files changed, 173 insertions(+), 168 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 5c829a7c8..228874be2 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -19,6 +19,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.google.gson.reflect.TypeToken; import com.microsoft.playwright.*; import com.microsoft.playwright.options.*; @@ -356,18 +357,16 @@ private Page waitForPageImpl(WaitForPageOptions options, Runnable code) { @Override public CDPSession newCDPSession(Page page) { - JsonObject params = new JsonObject(); - params.add("page", ((PageImpl) page).toProtocolRef()); - JsonObject result = sendMessage("newCDPSession", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("session").get("guid").getAsString()); + BrowserContextNewCDPSessionParams params = new BrowserContextNewCDPSessionParams(); + params.page = (PageImpl) page; + return channel.newCDPSession(params, NO_TIMEOUT).session; } @Override public CDPSession newCDPSession(Frame frame) { - JsonObject params = new JsonObject(); - params.add("frame", ((FrameImpl) frame).toProtocolRef()); - JsonObject result = sendMessage("newCDPSession", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("session").get("guid").getAsString()); + BrowserContextNewCDPSessionParams params = new BrowserContextNewCDPSessionParams(); + params.frame = (FrameImpl) frame; + return channel.newCDPSession(params, NO_TIMEOUT).session; } @Override @@ -394,8 +393,8 @@ public void close(CloseOptions options) { } catch (RuntimeException e) { harError = e; } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - sendMessage("close", params, NO_TIMEOUT); + BrowserContextCloseParams params = toProtocol(options, BrowserContextCloseParams.class); + channel.close(params, NO_TIMEOUT); } runUntil(() -> {}, closePromise); if (harError != null) { @@ -411,17 +410,16 @@ public List cookies(String url) { @Override public void addCookies(List cookies) { - JsonObject params = new JsonObject(); - params.add("cookies", gson().toJsonTree(cookies)); - sendMessage("addCookies", params, NO_TIMEOUT); + BrowserContextAddCookiesParams params = new BrowserContextAddCookiesParams(); + params.cookies = connection.protocolGson().fromJson(gson().toJsonTree(cookies), TypeToken.getParameterized(List.class, SetNetworkCookie.class).getType()); + channel.addCookies(params, NO_TIMEOUT); } @Override public AutoCloseable addInitScript(String script) { - JsonObject params = new JsonObject(); - params.addProperty("source", script); - JsonObject result = sendMessage("addInitScript", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("disposable").get("guid").getAsString()); + BrowserContextAddInitScriptParams params = new BrowserContextAddInitScriptParams(); + params.source = script; + return channel.addInitScript(params, NO_TIMEOUT).disposable; } @Override @@ -449,23 +447,21 @@ public void clearCookies(ClearCookiesOptions options) { if (options == null) { options = new ClearCookiesOptions(); } - sendMessage("clearCookies", toClearCookiesParams(options.name, options.domain, options.path), NO_TIMEOUT); + BrowserContextClearCookiesParams params = connection.protocolGson().fromJson(toClearCookiesParams(options.name, options.domain, options.path), BrowserContextClearCookiesParams.class); + channel.clearCookies(params, NO_TIMEOUT); } @Override public void clearPermissions() { - sendMessage("clearPermissions"); + channel.clearPermissions(NO_TIMEOUT); } @Override public List cookies(List urls) { - JsonObject params = new JsonObject(); - if (urls == null) { - urls = new ArrayList<>(); - } - params.add("urls", gson().toJsonTree(urls)); - JsonObject json = sendMessage("cookies", params, NO_TIMEOUT).getAsJsonObject(); - Cookie[] cookies = gson().fromJson(json.getAsJsonArray("cookies"), Cookie[].class); + BrowserContextCookiesParams params = new BrowserContextCookiesParams(); + params.urls = urls == null ? new ArrayList<>() : urls; + BrowserContextCookiesResult result = channel.cookies(params, NO_TIMEOUT); + Cookie[] cookies = gson().fromJson(gson().toJsonTree(result.cookies), Cookie[].class); return asList(cookies); } @@ -485,10 +481,9 @@ private AutoCloseable exposeBindingImpl(String name, BindingCallback playwrightB } bindings.put(name, playwrightBinding); - JsonObject params = new JsonObject(); - params.addProperty("name", name); - JsonObject result = sendMessage("exposeBinding", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("disposable").get("guid").getAsString()); + BrowserContextExposeBindingParams params = new BrowserContextExposeBindingParams(); + params.name = name; + return channel.exposeBinding(params, NO_TIMEOUT).disposable; } @Override @@ -504,9 +499,9 @@ public void grantPermissions(List permissions, GrantPermissionsOptions o if (permissions == null) { permissions = new ArrayList<>(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.add("permissions", gson().toJsonTree(permissions)); - sendMessage("grantPermissions", params, NO_TIMEOUT); + BrowserContextGrantPermissionsParams params = toProtocol(options, BrowserContextGrantPermissionsParams.class); + params.permissions = permissions; + channel.grantPermissions(params, NO_TIMEOUT); } @Override @@ -514,8 +509,7 @@ public PageImpl newPage() { if (ownerPage != null) { throw new PlaywrightException("Please use browser.newContext()"); } - JsonObject json = sendMessage("newPage").getAsJsonObject(); - return connection.getExistingObject(json.getAsJsonObject("page").get("guid").getAsString()); + return channel.newPage(NO_TIMEOUT).page; } @Override @@ -605,41 +599,40 @@ public void setDefaultTimeout(double timeout) { @Override public void setExtraHTTPHeaders(Map headers) { - JsonObject params = new JsonObject(); - JsonArray jsonHeaders = new JsonArray(); + BrowserContextSetExtraHTTPHeadersParams params = new BrowserContextSetExtraHTTPHeadersParams(); + params.headers = new ArrayList<>(); for (Map.Entry e : headers.entrySet()) { - JsonObject header = new JsonObject(); - header.addProperty("name", e.getKey()); - header.addProperty("value", e.getValue()); - jsonHeaders.add(header); + NameValue header = new NameValue(); + header.name = e.getKey(); + header.value = e.getValue(); + params.headers.add(header); } - params.add("headers", jsonHeaders); - sendMessage("setExtraHTTPHeaders", params, NO_TIMEOUT); + channel.setExtraHTTPHeaders(params, NO_TIMEOUT); } @Override public void setGeolocation(Geolocation geolocation) { - JsonObject params = new JsonObject(); + BrowserContextSetGeolocationParams params = new BrowserContextSetGeolocationParams(); if (geolocation != null) { - params.add("geolocation", gson().toJsonTree(geolocation)); + params.geolocation = toProtocol(geolocation, BrowserContextSetGeolocationParams.BrowserContextSetGeolocationParamsGeolocation.class); } - sendMessage("setGeolocation", params, NO_TIMEOUT); + channel.setGeolocation(params, NO_TIMEOUT); } @Override public void setOffline(boolean offline) { - JsonObject params = new JsonObject(); - params.addProperty("offline", offline); - sendMessage("setOffline", params, NO_TIMEOUT); + BrowserContextSetOfflineParams params = new BrowserContextSetOfflineParams(); + params.offline = offline; + channel.setOffline(params, NO_TIMEOUT); } @Override public void setStorageState(Path storageState) { try { String state = new String(readAllBytes(storageState), UTF_8); - JsonObject params = new JsonObject(); - params.add("storageState", gson().fromJson(state, JsonObject.class)); - sendMessage("setStorageState", params, NO_TIMEOUT); + BrowserContextSetStorageStateParams params = new BrowserContextSetStorageStateParams(); + params.storageState = connection.protocolGson().fromJson(state, BrowserContextSetStorageStateParams.BrowserContextSetStorageStateParamsStorageState.class); + channel.setStorageState(params, NO_TIMEOUT); } catch (IOException e) { throw new PlaywrightException("Failed to read storage state from file", e); } @@ -650,11 +643,10 @@ public String storageState(StorageStateOptions options) { if (options == null) { options = new StorageStateOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.remove("path"); - JsonElement json = sendMessage("storageState", params, NO_TIMEOUT); + BrowserContextStorageStateParams params = toProtocol(options, BrowserContextStorageStateParams.class); + BrowserContextStorageStateResult result = channel.storageState(params, NO_TIMEOUT); - String storageState = json.toString(); + String storageState = connection.protocolGson().toJson(result); if (options.path != null) { Utils.writeToFile(storageState.getBytes(StandardCharsets.UTF_8), options.path); } @@ -735,11 +727,13 @@ private void unroute(UrlMatcher matcher, Consumer handler) { } private void updateInterceptionPatterns() { - sendMessage("setNetworkInterceptionPatterns", routes.interceptionPatterns(), NO_TIMEOUT); + BrowserContextSetNetworkInterceptionPatternsParams params = connection.protocolGson().fromJson(routes.interceptionPatterns(), BrowserContextSetNetworkInterceptionPatternsParams.class); + channel.setNetworkInterceptionPatterns(params, NO_TIMEOUT); } private void updateWebSocketInterceptionPatterns() { - sendMessage("setWebSocketInterceptionPatterns", webSocketRoutes.interceptionPatterns(), NO_TIMEOUT); + BrowserContextSetWebSocketInterceptionPatternsParams params = connection.protocolGson().fromJson(webSocketRoutes.interceptionPatterns(), BrowserContextSetWebSocketInterceptionPatternsParams.class); + channel.setWebSocketInterceptionPatterns(params, NO_TIMEOUT); } void handleRoute(RouteImpl route) { @@ -766,7 +760,7 @@ void handleWebSocketRoute(WebSocketRouteImpl route) { } WaitableResult pause() { - return sendMessageAsync("pause", new JsonObject()); + return sendMessageAsync("pause", connection.protocolGson().toJsonTree(new BrowserContextPauseParams()).getAsJsonObject()); } @Override diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java index 6177cfb3b..77d776e8e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java @@ -19,8 +19,10 @@ import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; +import com.google.gson.reflect.TypeToken; import com.microsoft.playwright.*; import com.microsoft.playwright.options.BindResult; +import com.microsoft.playwright.options.ClientCertificate; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -94,7 +96,7 @@ public void close(CloseOptions options) { return; } try { - sendMessage("close"); + channel.close(new BrowserCloseParams(), NO_TIMEOUT); } catch (PlaywrightException e) { if (!isSafeCloseError(e)) { throw e; @@ -148,28 +150,30 @@ public BrowserContextImpl newContext(NewContextOptions options) { throw new PlaywrightException("Failed to read storage state from file", e); } } - JsonObject storageState = null; + BrowserNewContextParams.BrowserNewContextParamsStorageState storageState = null; if (options.storageState != null) { - storageState = new Gson().fromJson(options.storageState, JsonObject.class); + storageState = connection.protocolGson().fromJson(options.storageState, BrowserNewContextParams.BrowserNewContextParamsStorageState.class); options.storageState = null; } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - if (storageState != null) { - params.add("storageState", storageState); - } + // These two are converted below, their option types differ from the protocol ones. + Object httpCredentials = options.httpCredentials; + options.httpCredentials = null; + List clientCertificates = options.clientCertificates; + options.clientCertificates = null; + BrowserNewContextParams params = toProtocol(options, BrowserNewContextParams.class); + params.storageState = storageState; if (options.recordVideoDir != null) { - JsonObject recordVideo = new JsonObject(); - recordVideo.addProperty("dir", options.recordVideoDir.toAbsolutePath().toString()); + BrowserNewContextParams.BrowserNewContextParamsRecordVideo recordVideo = new BrowserNewContextParams.BrowserNewContextParamsRecordVideo(); + recordVideo.dir = options.recordVideoDir.toAbsolutePath().toString(); if (options.recordVideoSize != null) { - recordVideo.add("size", gson().toJsonTree(options.recordVideoSize)); + recordVideo.size = new BrowserNewContextParams.BrowserNewContextParamsRecordVideo.BrowserNewContextParamsRecordVideoSize(); + recordVideo.size.width = options.recordVideoSize.width; + recordVideo.size.height = options.recordVideoSize.height; } if (options.recordVideoFps != null) { - recordVideo.addProperty("fps", options.recordVideoFps); + recordVideo.fps = options.recordVideoFps; } - params.remove("recordVideoDir"); - params.remove("recordVideoSize"); - params.remove("recordVideoFps"); - params.add("recordVideo", recordVideo); + params.recordVideo = recordVideo; } else if (options.recordVideoSize != null) { throw new PlaywrightException("recordVideoSize is set but recordVideoDir is null"); } else if (options.recordVideoFps != null) { @@ -177,29 +181,24 @@ public BrowserContextImpl newContext(NewContextOptions options) { } if (options.viewportSize != null) { if (options.viewportSize.isPresent()) { - JsonElement size = params.get("viewportSize"); - params.remove("viewportSize"); - params.add("viewport", size); + params.viewport = new BrowserNewContextParams.BrowserNewContextParamsViewport(); + params.viewport.width = options.viewportSize.get().width; + params.viewport.height = options.viewportSize.get().height; } else { - params.remove("viewportSize"); - params.addProperty("noDefaultViewport", true); + params.noDefaultViewport = true; } } if (options.screenSize != null) { - JsonElement size = params.get("screenSize"); - params.remove("screenSize"); - params.add("screen", size); - } - addToProtocol(params, options.clientCertificates); - addHttpCredentialsToProtocol(params); - params.remove("acceptDownloads"); - if (options.acceptDownloads != null) { - params.addProperty("acceptDownloads", options.acceptDownloads ? "accept" : "deny"); + params.screen = new BrowserNewContextParams.BrowserNewContextParamsScreen(); + params.screen.width = options.screenSize.width; + params.screen.height = options.screenSize.height; } - params.add("selectorEngines", gson().toJsonTree(browserType.playwright.selectors.selectorEngines)); - params.addProperty("testIdAttributeName", browserType.playwright.selectors.testIdAttributeName); - JsonElement result = sendMessage("newContext", params, NO_TIMEOUT); - BrowserContextImpl context = connection.getExistingObject(result.getAsJsonObject().getAsJsonObject("context").get("guid").getAsString()); + params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserNewContextParams.BrowserNewContextParamsClientCertificates.class); + params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); + params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); + params.selectorEngines = selectorEnginesToProtocol(connection, browserType.playwright.selectors.selectorEngines); + params.testIdAttributeName = browserType.playwright.selectors.testIdAttributeName; + BrowserContextImpl context = channel.newContext(params, NO_TIMEOUT).context; context.initializeHarFromOptions(harOptions); return context; } @@ -215,43 +214,31 @@ public void startTracing(Page page, StartTracingOptions options) { options = new StartTracingOptions(); } tracePath = options.path; - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + BrowserStartTracingParams params = toProtocol(options, BrowserStartTracingParams.class); if (page != null) { - params.add("page", ((PageImpl) page).toProtocolRef()); + params.page = (PageImpl) page; } - sendMessage("startTracing", params, NO_TIMEOUT); + channel.startTracing(params, NO_TIMEOUT); } @Override public BindResult bind(String title, BindOptions options) { - JsonObject params = new JsonObject(); - params.addProperty("title", title); - if (options != null) { - if (options.host != null) { - params.addProperty("host", options.host); - } - if (options.port != null) { - params.addProperty("port", options.port); - } - if (options.workspaceDir != null) { - params.addProperty("workspaceDir", options.workspaceDir); - } - } - JsonObject result = sendMessage("startServer", params, NO_TIMEOUT).getAsJsonObject(); + BrowserStartServerParams params = toProtocol(options, BrowserStartServerParams.class); + params.title = title; + BrowserStartServerResult result = channel.startServer(params, NO_TIMEOUT); BindResult bindResult = new BindResult(); - bindResult.endpoint = result.get("endpoint").getAsString(); + bindResult.endpoint = result.endpoint; return bindResult; } @Override public void unbind() { - sendMessage("stopServer", new JsonObject(), NO_TIMEOUT); + channel.stopServer(NO_TIMEOUT); } @Override public byte[] stopTracing() { - JsonObject json = sendMessage("stopTracing").getAsJsonObject(); - ArtifactImpl artifact = connection.getExistingObject(json.getAsJsonObject().getAsJsonObject("artifact").get("guid").getAsString()); + ArtifactImpl artifact = channel.stopTracing(NO_TIMEOUT).artifact; byte[] data = artifact.readAllBytes(); artifact.delete(); if (tracePath != null) { @@ -267,6 +254,37 @@ public byte[] stopTracing() { return data; } + // The protocol takes a list of http credentials, the option is a single value or a list. + static List httpCredentialsToProtocol(Connection connection, Object httpCredentials) { + if (httpCredentials == null) { + return null; + } + JsonObject tmp = new JsonObject(); + tmp.add("httpCredentials", connection.protocolGson().toJsonTree(httpCredentials)); + addHttpCredentialsToProtocol(tmp); + return fromJsonList(connection, tmp.get("httpCredentials"), ProtocolHttpCredentials.class); + } + + static List clientCertificatesToProtocol(Connection connection, List clientCertificates, Class protocolClass) { + if (clientCertificates == null) { + return null; + } + JsonObject tmp = new JsonObject(); + addToProtocol(tmp, clientCertificates); + return fromJsonList(connection, tmp.get("clientCertificates"), protocolClass); + } + + static List selectorEnginesToProtocol(Connection connection, Object selectorEngines) { + return fromJsonList(connection, connection.protocolGson().toJsonTree(selectorEngines), SelectorEngine.class); + } + + private static List fromJsonList(Connection connection, JsonElement json, Class elementClass) { + if (json == null) { + return null; + } + return connection.protocolGson().fromJson(json, TypeToken.getParameterized(List.class, elementClass).getType()); + } + private Page newPageImpl(NewPageOptions options) { BrowserContextImpl context = newContext(convertType(options, NewContextOptions.class)); PageImpl page = context.newPage(); @@ -302,9 +320,7 @@ void handleEvent(String event, JsonObject parameters) { @Override public CDPSession newBrowserCDPSession() { - JsonObject params = new JsonObject(); - JsonObject result = sendMessage("newBrowserCDPSession", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(result.getAsJsonObject("session").get("guid").getAsString()); + return channel.newBrowserCDPSession(NO_TIMEOUT).session; } protected void connectToBrowserType(BrowserTypeImpl browserType, Path tracesDir){ diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index dc6bf02a9..842de3bca 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -17,21 +17,23 @@ package com.microsoft.playwright.impl; import com.google.gson.Gson; -import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.Browser; import com.microsoft.playwright.BrowserType; import com.microsoft.playwright.PlaywrightException; +import com.microsoft.playwright.options.ClientCertificate; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.List; import java.util.function.Consumer; -import static com.microsoft.playwright.impl.Serialization.gson; -import static com.microsoft.playwright.impl.Utils.addHttpCredentialsToProtocol; -import static com.microsoft.playwright.impl.Utils.addToProtocol; +import static com.microsoft.playwright.impl.BrowserImpl.clientCertificatesToProtocol; +import static com.microsoft.playwright.impl.BrowserImpl.httpCredentialsToProtocol; +import static com.microsoft.playwright.impl.BrowserImpl.selectorEnginesToProtocol; import static com.microsoft.playwright.impl.Utils.convertType; +import static com.microsoft.playwright.impl.Utils.toProtocol; class BrowserTypeImpl extends ChannelOwner implements BrowserType { protected PlaywrightImpl playwright; @@ -47,9 +49,8 @@ public BrowserImpl launch(LaunchOptions options) { if (options == null) { options = new LaunchOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - JsonElement result = sendMessage("launch", params, TimeoutSettings.launchTimeout(options.timeout)); - BrowserImpl browser = connection.getExistingObject(result.getAsJsonObject().getAsJsonObject("browser").get("guid").getAsString()); + BrowserTypeLaunchParams params = toProtocol(options, BrowserTypeLaunchParams.class); + BrowserImpl browser = channel.launch(params, TimeoutSettings.launchTimeout(options.timeout)).browser; browser.browserType = this; browser.launchOptions = options; return browser; @@ -60,14 +61,12 @@ public Browser connect(String wsEndpoint, ConnectOptions options) { if (options == null) { options = new ConnectOptions(); } + LocalUtilsConnectParams params = new LocalUtilsConnectParams(); + params.endpoint = wsEndpoint; + params.exposeNetwork = options.exposeNetwork; + params.slowMo = options.slowMo; // We don't use gson() here as the headers map should be serialized to a json object. - JsonObject params = new Gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("endpoint", wsEndpoint); - - if (!params.has("headers")) { - params.add("headers", new JsonObject()); - } - JsonObject headers = params.get("headers").getAsJsonObject(); + JsonObject headers = options.headers == null ? new JsonObject() : new Gson().toJsonTree(options.headers).getAsJsonObject(); boolean foundBrowserHeader = false; for (String name : headers.keySet()) { if ("x-playwright-browser".equalsIgnoreCase(name)) { @@ -78,14 +77,14 @@ public Browser connect(String wsEndpoint, ConnectOptions options) { if (!foundBrowserHeader) { headers.addProperty("x-playwright-browser", name()); } + params.headers = headers; Double timeout = options.timeout; if (timeout == null) { timeout = 0.0; } - JsonObject json = connection.localUtils().sendMessage("connect", params, timeout).getAsJsonObject(); - JsonPipe pipe = connection.getExistingObject(json.getAsJsonObject("pipe").get("guid").getAsString()); + JsonPipe pipe = connection.localUtils().channel.connect(params, timeout).pipe; Connection connection = new Connection(pipe, this.connection.env, this.connection.localUtils); PlaywrightImpl playwright = connection.initializePlaywright(); if (!playwright.initializer.has("preLaunchedBrowser")) { @@ -122,11 +121,9 @@ public Browser connectOverCDP(String endpointURL, ConnectOverCDPOptions options) options = new ConnectOverCDPOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("endpointURL", endpointURL); - JsonObject json = sendMessage("connectOverCDP", params, TimeoutSettings.launchTimeout(options.timeout)).getAsJsonObject(); - - BrowserImpl browser = connection.getExistingObject(json.getAsJsonObject("browser").get("guid").getAsString()); + BrowserTypeConnectOverCDPParams params = toProtocol(options, BrowserTypeConnectOverCDPParams.class); + params.endpointURL = endpointURL; + BrowserImpl browser = channel.connectOverCDP(params, TimeoutSettings.launchTimeout(options.timeout)).browser; browser.connectToBrowserType(this, null); return browser; } @@ -151,25 +148,29 @@ public BrowserContextImpl launchPersistentContext(Path userDataDir, LaunchPersis options.recordHarOmitContent = null; options.recordHarUrlFilter = null; - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); + // These two are converted below, their option types differ from the protocol ones. + Object httpCredentials = options.httpCredentials; + options.httpCredentials = null; + List clientCertificates = options.clientCertificates; + options.clientCertificates = null; + BrowserTypeLaunchPersistentContextParams params = toProtocol(options, BrowserTypeLaunchPersistentContextParams.class); if (!userDataDir.isAbsolute() && !userDataDir.toString().isEmpty()) { Path cwd = Paths.get("").toAbsolutePath(); userDataDir = cwd.resolve(userDataDir); } - params.addProperty("userDataDir", userDataDir.toString()); + params.userDataDir = userDataDir.toString(); if (options.recordVideoDir != null) { - JsonObject recordVideo = new JsonObject(); - recordVideo.addProperty("dir", options.recordVideoDir.toAbsolutePath().toString()); + BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsRecordVideo recordVideo = new BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsRecordVideo(); + recordVideo.dir = options.recordVideoDir.toAbsolutePath().toString(); if (options.recordVideoSize != null) { - recordVideo.add("size", gson().toJsonTree(options.recordVideoSize)); + recordVideo.size = new BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsRecordVideo.BrowserTypeLaunchPersistentContextParamsRecordVideoSize(); + recordVideo.size.width = options.recordVideoSize.width; + recordVideo.size.height = options.recordVideoSize.height; } if (options.recordVideoFps != null) { - recordVideo.addProperty("fps", options.recordVideoFps); + recordVideo.fps = options.recordVideoFps; } - params.remove("recordVideoDir"); - params.remove("recordVideoSize"); - params.remove("recordVideoFps"); - params.add("recordVideo", recordVideo); + params.recordVideo = recordVideo; } else if (options.recordVideoSize != null) { throw new PlaywrightException("recordVideoSize is set but recordVideoDir is null"); } else if (options.recordVideoFps != null) { @@ -177,26 +178,22 @@ public BrowserContextImpl launchPersistentContext(Path userDataDir, LaunchPersis } if (options.viewportSize != null) { if (options.viewportSize.isPresent()) { - JsonElement size = params.get("viewportSize"); - params.remove("viewportSize"); - params.add("viewport", size); + params.viewport = new BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsViewport(); + params.viewport.width = options.viewportSize.get().width; + params.viewport.height = options.viewportSize.get().height; } else { - params.remove("viewportSize"); - params.addProperty("noDefaultViewport", true); + params.noDefaultViewport = true; } } - addToProtocol(params, options.clientCertificates); - addHttpCredentialsToProtocol(params); - params.remove("acceptDownloads"); - if (options.acceptDownloads != null) { - params.addProperty("acceptDownloads", options.acceptDownloads ? "accept" : "deny"); - } - params.add("selectorEngines", gson().toJsonTree(playwright.selectors.selectorEngines)); - params.addProperty("testIdAttributeName", playwright.selectors.testIdAttributeName); - JsonObject json = sendMessage("launchPersistentContext", params, TimeoutSettings.launchTimeout(options.timeout)).getAsJsonObject(); - BrowserImpl browser = connection.getExistingObject(json.getAsJsonObject("browser").get("guid").getAsString()); + params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsClientCertificates.class); + params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); + params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); + params.selectorEngines = selectorEnginesToProtocol(connection, playwright.selectors.selectorEngines); + params.testIdAttributeName = playwright.selectors.testIdAttributeName; + BrowserTypeLaunchPersistentContextResult result = channel.launchPersistentContext(params, TimeoutSettings.launchTimeout(options.timeout)); + BrowserImpl browser = result.browser; browser.connectToBrowserType(this, options.tracesDir); - BrowserContextImpl context = connection.getExistingObject(json.getAsJsonObject("context").get("guid").getAsString()); + BrowserContextImpl context = result.context; context.initializeHarFromOptions(harOptions); context.setTracesDir(options.tracesDir); return context; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index 72dfc855d..b24e9d463 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java @@ -98,11 +98,9 @@ class Root extends ChannelOwner { } PlaywrightImpl initialize() { - JsonObject params = new JsonObject(); - params.addProperty("sdkLanguage", "java"); - params.addProperty("supportsLoneSurrogates", true); - JsonElement result = sendMessage("initialize", params.getAsJsonObject(), NO_TIMEOUT); - return this.connection.getExistingObject(result.getAsJsonObject().getAsJsonObject("playwright").get("guid").getAsString()); + RootInitializeParams params = new RootInitializeParams(); + params.sdkLanguage = "java"; + return new RootChannel(this).initialize(params, NO_TIMEOUT).playwright; } } From 92c716ef8485f0a34b544cb86f3e7ae360505672 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:01:20 -0800 Subject: [PATCH 22/33] refactor(browser): keep raw storageState reply and connect options fields --- .../microsoft/playwright/impl/BrowserContextImpl.java | 7 +++++-- .../com/microsoft/playwright/impl/BrowserTypeImpl.java | 10 +++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 228874be2..8605490f1 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -644,9 +644,12 @@ public String storageState(StorageStateOptions options) { options = new StorageStateOptions(); } BrowserContextStorageStateParams params = toProtocol(options, BrowserContextStorageStateParams.class); - BrowserContextStorageStateResult result = channel.storageState(params, NO_TIMEOUT); + // The reply is returned to the user verbatim: a typed round trip would print -1 as -1.0 and + // differ from the raw string of APIRequestContext.storageState(), so the typed params go through + // the JsonObject overload and the result stays a JsonElement. + JsonElement json = sendMessage("storageState", connection.protocolGson().toJsonTree(params).getAsJsonObject(), NO_TIMEOUT); - String storageState = connection.protocolGson().toJson(result); + String storageState = json.toString(); if (options.path != null) { Utils.writeToFile(storageState.getBytes(StandardCharsets.UTF_8), options.path); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index 842de3bca..3e11353c7 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -61,12 +61,12 @@ public Browser connect(String wsEndpoint, ConnectOptions options) { if (options == null) { options = new ConnectOptions(); } - LocalUtilsConnectParams params = new LocalUtilsConnectParams(); - params.endpoint = wsEndpoint; - params.exposeNetwork = options.exposeNetwork; - params.slowMo = options.slowMo; // We don't use gson() here as the headers map should be serialized to a json object. - JsonObject headers = options.headers == null ? new JsonObject() : new Gson().toJsonTree(options.headers).getAsJsonObject(); + // Serializing the options object itself (not field by field) keeps fields added by subclasses, like the tests do. + JsonObject optionsJson = new Gson().toJsonTree(options).getAsJsonObject(); + LocalUtilsConnectParams params = connection.protocolGson().fromJson(optionsJson, LocalUtilsConnectParams.class); + params.endpoint = wsEndpoint; + JsonObject headers = options.headers == null ? new JsonObject() : optionsJson.getAsJsonObject("headers"); boolean foundBrowserHeader = false; for (String name : headers.keySet()) { if ("x-playwright-browser".equalsIgnoreCase(name)) { From 4ce496f70fc601cac8cc090cf175419059ebb215 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:05:21 -0800 Subject: [PATCH 23/33] refactor(channel): typed sendMessageAsync and sendMessageNoReply --- .../playwright/impl/BindingCall.java | 3 +- .../playwright/impl/BrowserContextImpl.java | 2 +- .../playwright/impl/ChannelOwner.java | 19 +++++++++++++ .../microsoft/playwright/impl/HARRouter.java | 2 +- .../microsoft/playwright/impl/PageImpl.java | 2 +- .../microsoft/playwright/impl/RouteImpl.java | 12 +++----- .../playwright/impl/ScreencastImpl.java | 3 +- .../playwright/impl/SelectorsImpl.java | 3 +- .../playwright/impl/WebSocketRouteImpl.java | 28 ++++++++----------- 9 files changed, 41 insertions(+), 33 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java index eb3c37464..683eb7a3e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java @@ -78,8 +78,7 @@ void call(BindingCallback binding) { method = "reject"; } // Like the Node client, do not fail when the page was closed before the result arrived. - // java: there is no typed async send yet, so the typed params are converted to a JsonObject. - sendMessageAsync(method, connection.protocolGson().toJsonTree(params).getAsJsonObject()); + sendMessageAsync(method, params); } private Object invoke(BindingCallback binding) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 8605490f1..1cd0ff8ef 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -763,7 +763,7 @@ void handleWebSocketRoute(WebSocketRouteImpl route) { } WaitableResult pause() { - return sendMessageAsync("pause", connection.protocolGson().toJsonTree(new BrowserContextPauseParams()).getAsJsonObject()); + return sendMessageAsync("pause", new BrowserContextPauseParams()); } @Override diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java index eebcd6158..5ee609363 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java @@ -119,6 +119,25 @@ WaitableResult sendMessageAsync(String method, JsonObject params) { return connection.sendMessageAsync(guid, method, params); } + /** Typed counterpart of {@link #sendMessageAsync(String, JsonObject)}; {@code null} params mean an empty object. */ + WaitableResult sendMessageAsync(String method, Object params) { + return sendMessageAsync(method, paramsToJson(params)); + } + + /** Typed counterpart of {@link #sendMessageNoReply(String, JsonObject)}. */ + void sendMessageNoReply(String method, Object params) { + sendMessageNoReply(method, paramsToJson(params)); + } + + private JsonObject paramsToJson(Object params) { + if (params == null) { + return new JsonObject(); + } + JsonObject json = connection.protocolGson().toJsonTree(params).getAsJsonObject(); + json.remove("timeout"); + return json; + } + // Fire-and-forget: silently drop if the object was collected. void sendMessageNoReply(String method, JsonObject params) { if (wasCollected) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java index 52fe717d3..ab46c21e3 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java @@ -131,6 +131,6 @@ private static Map mergeSetCookieHeaders(List headers void dispose() { LocalUtilsHarCloseParams params = new LocalUtilsHarCloseParams(); params.harId = harId; - localUtils.sendMessageAsync("harClose", localUtils.connection.protocolGson().toJsonTree(params).getAsJsonObject()); + localUtils.sendMessageAsync("harClose", params); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index 1cfe21522..a5e83bf6f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -660,7 +660,7 @@ private void onLocatorHandlerTriggered(int uid) { PageResolveLocatorHandlerNoReplyParams params = new PageResolveLocatorHandlerNoReplyParams(); params.uid = uid; params.remove = remove; - sendMessageAsync("resolveLocatorHandlerNoReply", connection.protocolGson().toJsonTree(params).getAsJsonObject()); + sendMessageAsync("resolveLocatorHandlerNoReply", params); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java index 8bc0e61b9..38e8eec12 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java @@ -50,7 +50,7 @@ public void abort(String errorCode) { startHandling(); RouteAbortParams params = new RouteAbortParams(); params.errorCode = errorCode; - sendMessageAsync("abort", toJson(params)); + sendMessageAsync("abort", params); } boolean isHandled() { @@ -130,11 +130,7 @@ private void resumeImpl(RequestImpl.FallbackOverrides options, boolean isFallbac params.postData = options.postData; } params.isFallback = isFallback; - sendMessageAsync("continue", toJson(params)); - } - - private JsonObject toJson(Object params) { - return connection.protocolGson().toJsonTree(params).getAsJsonObject(); + sendMessageAsync("continue", params); } private static List toNameValues(Map map) { @@ -240,7 +236,7 @@ private void fulfillImpl(FulfillOptions options) { params.isBase64 = isBase64; params.body = body; params.fetchResponseUid = fetchResponseUid; - sendMessageAsync("fulfill", toJson(params)); + sendMessageAsync("fulfill", params); } @Override @@ -253,7 +249,7 @@ void redirectNavigationRequest(String redirectURL) { RouteRedirectNavigationRequestParams params = new RouteRedirectNavigationRequestParams(); params.url = redirectURL; // TODO: _raceWithPageClose ? - sendMessageAsync("redirectNavigationRequest", toJson(params)); + sendMessageAsync("redirectNavigationRequest", params); } private void startHandling() { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java index ce724f89f..2f49dc8d5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java @@ -52,8 +52,7 @@ void handleScreencastFrame(JsonObject params) { // The server sends the next frame only after the previous one is acknowledged. PageScreencastFrameAckParams ackParams = new PageScreencastFrameAckParams(); ackParams.frameId = params.get("frameId").getAsInt(); - // java: there is no typed async send yet, so the typed params are converted to a JsonObject. - page.sendMessageAsync("screencastFrameAck", page.connection.protocolGson().toJsonTree(ackParams).getAsJsonObject()); + page.sendMessageAsync("screencastFrameAck", ackParams); } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java index 19fe0bd3f..837fadcc0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java @@ -45,8 +45,7 @@ public void setTestIdAttribute(String attributeName) { try { BrowserContextSetTestIdAttributeNameParams params = new BrowserContextSetTestIdAttributeNameParams(); params.testIdAttributeName = attributeName; - // java: there is no typed async send yet, so the typed params are converted to a JsonObject. - context.sendMessageAsync("setTestIdAttributeName", context.connection.protocolGson().toJsonTree(params).getAsJsonObject()); + context.sendMessageAsync("setTestIdAttributeName", params); } catch (PlaywrightException e) { } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java index fa4fb42f5..b1a6e66ee 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java @@ -29,7 +29,7 @@ public void close(CloseOptions options) { } WebSocketRouteCloseServerParams params = toProtocol(options, WebSocketRouteCloseServerParams.class); params.wasClean = true; - sendMessageAsync("closeServer", toJson(params)); + sendMessageAsync("closeServer", params); } @Override @@ -52,7 +52,7 @@ public void send(String message) { WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); params.message = message; params.isBase64 = false; - sendMessageAsync("sendToServer", toJson(params)); + sendMessageAsync("sendToServer", params); } @Override @@ -60,7 +60,7 @@ public void send(byte[] message) { WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); params.message = Base64.getEncoder().encodeToString(message); params.isBase64 = true; - sendMessageAsync("sendToServer", toJson(params)); + sendMessageAsync("sendToServer", params); } @Override @@ -87,7 +87,7 @@ public void close(CloseOptions options) { } WebSocketRouteClosePageParams params = toProtocol(options, WebSocketRouteClosePageParams.class); params.wasClean = true; - sendMessageAsync("closePage", toJson(params)); + sendMessageAsync("closePage", params); } @Override @@ -96,7 +96,7 @@ public WebSocketRoute connectToServer() { throw new PlaywrightException("Already connected to the server"); } connected = true; - sendMessageAsync("connect"); + sendMessageAsync("connect", new WebSocketRouteConnectParams()); return server; } @@ -115,7 +115,7 @@ public void send(String message) { WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); params.message = message; params.isBase64 = false; - sendMessageAsync("sendToPage", toJson(params)); + sendMessageAsync("sendToPage", params); } @Override @@ -123,7 +123,7 @@ public void send(byte[] message) { WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); params.message = Base64.getEncoder().encodeToString(message); params.isBase64 = true; - sendMessageAsync("sendToPage", toJson(params)); + sendMessageAsync("sendToPage", params); } @Override @@ -147,17 +147,13 @@ private List readProtocols() { return result; } - private JsonObject toJson(Object params) { - return connection.protocolGson().toJsonTree(params).getAsJsonObject(); - } - void afterHandle() { if (this.connected) { return; } // Ensure that websocket is "open" and can send messages without an actual server connection. try { - sendMessageAsync("ensureOpened"); + sendMessageAsync("ensureOpened", new WebSocketRouteEnsureOpenedParams()); } catch (PlaywrightException e) { // If this happens after the page has been closed, ignore the error. } @@ -174,7 +170,7 @@ protected void handleEvent(String event, JsonObject params) { WebSocketRouteSendToServerParams messageParams = new WebSocketRouteSendToServerParams(); messageParams.message = message; messageParams.isBase64 = isBase64; - sendMessageAsync("sendToServer", toJson(messageParams)); + sendMessageAsync("sendToServer", messageParams); } } else if ("messageFromServer".equals(event)) { String message = params.get("message").getAsString(); @@ -185,7 +181,7 @@ protected void handleEvent(String event, JsonObject params) { WebSocketRouteSendToPageParams messageParams = new WebSocketRouteSendToPageParams(); messageParams.message = message; messageParams.isBase64 = isBase64; - sendMessageAsync("sendToPage", toJson(messageParams)); + sendMessageAsync("sendToPage", messageParams); } } else if ("closePage".equals(event)) { Integer code = params.has("code") ? params.get("code").getAsInt() : null; @@ -198,7 +194,7 @@ protected void handleEvent(String event, JsonObject params) { closeParams.code = code; closeParams.reason = reason; closeParams.wasClean = wasClean; - sendMessageAsync("closeServer", toJson(closeParams)); + sendMessageAsync("closeServer", closeParams); } } else if ("closeServer".equals(event)) { Integer code = params.has("code") ? params.get("code").getAsInt() : null; @@ -211,7 +207,7 @@ protected void handleEvent(String event, JsonObject params) { closeParams.code = code; closeParams.reason = reason; closeParams.wasClean = wasClean; - sendMessageAsync("closePage", toJson(closeParams)); + sendMessageAsync("closePage", closeParams); } } } From 2190898d4ed547c8ee64cfcaa85cfc8e6efae05f Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:06:07 -0800 Subject: [PATCH 24/33] refactor(upload): fill typed upload params and return typed temp files result --- .../playwright/impl/ElementHandleImpl.java | 17 +++---- .../microsoft/playwright/impl/FrameImpl.java | 28 +++++------ .../com/microsoft/playwright/impl/Utils.java | 50 +++++++++++-------- 3 files changed, 52 insertions(+), 43 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java index 762a757aa..f6fc7b71b 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java @@ -382,15 +382,14 @@ public void setInputFiles(Path[] files, SetInputFilesOptions options) { options = new SetInputFilesOptions(); } ElementHandleSetInputFilesParams params = Utils.toProtocol(options, ElementHandleSetInputFilesParams.class); - // java: addFilePathUploadParams (Utils) still fills a JsonObject, read it back into the typed params. - JsonObject upload = new JsonObject(); - addFilePathUploadParams(files, upload, frame.page().context()); - ElementHandleSetInputFilesParams uploadParams = connection.protocolGson().fromJson(upload, ElementHandleSetInputFilesParams.class); - params.payloads = uploadParams.payloads; - params.localDirectory = uploadParams.localDirectory; - params.directoryStream = uploadParams.directoryStream; - params.localPaths = uploadParams.localPaths; - params.streams = uploadParams.streams; + Utils.UploadParams upload = addFilePathUploadParams(files, frame.page().context()); + if (upload.emptyPayloads) { + params.payloads = new ArrayList<>(); + } + params.localDirectory = upload.localDirectory; + params.directoryStream = upload.directoryStream; + params.localPaths = upload.localPaths; + params.streams = upload.streams; channel.setInputFiles(params, frame.timeout(options.timeout)); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index 3930d2d20..29ca18608 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java @@ -719,14 +719,14 @@ void setInputFilesImpl(String selector, Path[] files, SetInputFilesOptions optio options = new SetInputFilesOptions(); } FrameSetInputFilesParams params = toProtocol(options, FrameSetInputFilesParams.class); - JsonObject upload = new JsonObject(); - addFilePathUploadParams(files, upload, page.context()); - FrameSetInputFilesParams uploadParams = connection.protocolGson().fromJson(upload, FrameSetInputFilesParams.class); - params.payloads = uploadParams.payloads; - params.localDirectory = uploadParams.localDirectory; - params.directoryStream = uploadParams.directoryStream; - params.localPaths = uploadParams.localPaths; - params.streams = uploadParams.streams; + Utils.UploadParams upload = addFilePathUploadParams(files, page.context()); + if (upload.emptyPayloads) { + params.payloads = new ArrayList<>(); + } + params.localDirectory = upload.localDirectory; + params.directoryStream = upload.directoryStream; + params.localPaths = upload.localPaths; + params.streams = upload.streams; params.selector = selector; channel.setInputFiles(params, timeout(options.timeout)); } @@ -1080,12 +1080,12 @@ void dropImpl(String selector, DropPayload payload, com.microsoft.playwright.Loc } private void addDropFilePaths(Path[] files, FrameDropParams params) { - JsonObject upload = new JsonObject(); - addFilePathUploadParams(files, upload, page.context()); - FrameDropParams uploadParams = connection.protocolGson().fromJson(upload, FrameDropParams.class); - params.payloads = uploadParams.payloads; - params.localPaths = uploadParams.localPaths; - params.streams = uploadParams.streams; + Utils.UploadParams upload = addFilePathUploadParams(files, page.context()); + if (upload.emptyPayloads) { + params.payloads = new ArrayList<>(); + } + params.localPaths = upload.localPaths; + params.streams = upload.streams; } private void addDropPayloads(com.microsoft.playwright.options.FilePayload[] files, FrameDropParams params) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index 9c94c4fd0..5eb809f38 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -166,32 +166,45 @@ static String mimeType(Path path) { return mimeType; } - static void addFilePathUploadParams(Path[] items, JsonObject params, BrowserContextImpl context) { + /** Upload fields shared by the set-input-files and drop params; each call site copies them into its own params class. */ + static class UploadParams { + boolean emptyPayloads; + List localPaths; + List streams; + String localDirectory; + WritableStream directoryStream; + } + + static UploadParams addFilePathUploadParams(Path[] items, BrowserContextImpl context) { + UploadParams upload = new UploadParams(); List localPaths = new ArrayList<>(); Path localDirectory = resolvePathsAndDirectoryForInputFiles(items, localPaths); if (items.length == 0) { // FIXME: shouldBeAbleToResetSelectedFilesWithEmptyFileList tesst hangs in Chromium if we pass empty paths list. - params.add("payloads", new JsonArray()); + upload.emptyPayloads = true; } else if (context.connection.isRemote) { if (localDirectory != null) { localPaths = collectFiles(localDirectory); } - JsonObject json = createTempFiles(context, localDirectory, localPaths); - JsonArray writableStreams = json.getAsJsonArray("writableStreams"); - JsonArray jsonStreams = copyLocalToTempFiles(context, localPaths, writableStreams); - if (json.has("rootDir")) { - params.add("directoryStream", json.get("rootDir")); + BrowserContextCreateTempFilesResult result = createTempFiles(context, localDirectory, localPaths); + List streams = copyLocalToTempFiles(localPaths, result.writableStreams); + if (result.rootDir != null) { + upload.directoryStream = result.rootDir; } else { - params.add("streams", jsonStreams); + upload.streams = streams; } } else { if (!localPaths.isEmpty()) { - params.add("localPaths", toJsonArray(localPaths.toArray(new Path[0]))); + upload.localPaths = new ArrayList<>(); + for (Path p : localPaths) { + upload.localPaths.add(p.toAbsolutePath().toString()); + } } if (localDirectory != null) { - params.addProperty("localDirectory", localDirectory.toString()); + upload.localDirectory = localDirectory.toString(); } } + return upload; } private static Path resolvePathsAndDirectoryForInputFiles(Path[] items, List outLocalPaths) { @@ -224,22 +237,21 @@ private static List collectFiles(Path localDirectory) { } } - private static JsonArray copyLocalToTempFiles(BrowserContextImpl context, List localPaths, JsonArray writableStreams) { - JsonArray jsonStreams = new JsonArray(); + private static List copyLocalToTempFiles(List localPaths, List writableStreams) { + List streams = new ArrayList<>(); for (int i = 0; i < localPaths.size(); i++) { - JsonObject jsonStream = writableStreams.get(i).getAsJsonObject(); - WritableStream temp = context.connection.getExistingObject(jsonStream.get("guid").getAsString()); + WritableStream temp = writableStreams.get(i); try (OutputStream out = temp.stream()) { Files.copy(localPaths.get(i), out); } catch (IOException e) { throw new PlaywrightException("Failed to copy file to remote server.", e); } - jsonStreams.add(temp.toProtocolRef()); + streams.add(temp); } - return jsonStreams; + return streams; } - private static JsonObject createTempFiles(BrowserContextImpl context, Path localDirectory, List localPaths) { + private static BrowserContextCreateTempFilesResult createTempFiles(BrowserContextImpl context, Path localDirectory, List localPaths) { BrowserContextCreateTempFilesParams params = new BrowserContextCreateTempFilesParams(); if (localDirectory != null) { params.rootDirName = localDirectory.getFileName().toString(); @@ -263,9 +275,7 @@ private static JsonObject createTempFiles(BrowserContextImpl context, Path local item.lastModifiedMs = (double) lastModifiedMs; params.items.add(item); } - BrowserContextCreateTempFilesResult result = context.channel.createTempFiles(params, NO_TIMEOUT); - // java: the caller still reads the reply as JsonObject ({guid} refs), see copyLocalToTempFiles. - return context.connection.protocolGson().toJsonTree(result).getAsJsonObject(); + return context.channel.createTempFiles(params, NO_TIMEOUT); } static void checkFilePayloadSize(FilePayload[] files) { From 83b2a2af3c9872fca6bf6f1b74e88933f567964d Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:07:06 -0800 Subject: [PATCH 25/33] refactor(client): type the inputs of APIResponseImpl and ConsoleMessageImpl --- .../impl/APIRequestContextImpl.java | 2 +- .../playwright/impl/APIResponseImpl.java | 61 ++++++++++++++----- .../playwright/impl/BrowserContextImpl.java | 13 ++-- .../playwright/impl/ConsoleMessageImpl.java | 50 +++++++++------ .../microsoft/playwright/impl/PageImpl.java | 2 +- 5 files changed, 83 insertions(+), 45 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java index a575dec20..c4d5ec881 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java @@ -190,7 +190,7 @@ private APIResponse fetchImpl(String url, RequestOptionsImpl options) { params.maxRetries = options.maxRetries; } APIRequestContextFetchResult result = channel.fetch(params, timeoutSettings.timeout(options.timeout)); - return new APIResponseImpl(this, connection.protocolGson().toJsonTree(result.response).getAsJsonObject()); + return new APIResponseImpl(this, result.response); } private static List toNameValues(JsonArray array) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java index 0f64982f4..71e6cdf7c 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java @@ -27,6 +27,7 @@ import com.microsoft.playwright.options.Timing; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.Base64; import java.util.List; import java.util.Map; @@ -38,13 +39,20 @@ class APIResponseImpl implements APIResponse { final APIRequestContextImpl context; - private final JsonObject initializer; + private final ProtocolAPIResponse response; private final RawHeaders headers; - APIResponseImpl(APIRequestContextImpl apiRequestContext, JsonObject response) { + APIResponseImpl(APIRequestContextImpl apiRequestContext, ProtocolAPIResponse response) { context = apiRequestContext; - initializer = response; - headers = new RawHeaders(asList(gson().fromJson(initializer.getAsJsonArray("headers"), HttpHeader[].class))); + this.response = response; + List headerList = new ArrayList<>(); + for (NameValue nv : response.headers) { + HttpHeader h = new HttpHeader(); + h.name = nv.name; + h.value = nv.value; + headerList.add(h); + } + headers = new RawHeaders(headerList); } @Override @@ -90,28 +98,38 @@ public boolean ok() { @Override public SecurityDetails securityDetails() { - if (!initializer.has("securityDetails")) { + ProtocolSecurityDetails d = response.securityDetails; + if (d == null) { return null; } - return gson().fromJson(initializer.get("securityDetails"), SecurityDetails.class); + SecurityDetails result = new SecurityDetails(); + result.issuer = d.issuer; + result.protocol = d.protocol; + result.subjectName = d.subjectName; + result.validFrom = d.validFrom; + result.validTo = d.validTo; + return result; } @Override public ServerAddr serverAddr() { - if (!initializer.has("serverAddr")) { + if (response.serverAddr == null) { return null; } - return gson().fromJson(initializer.get("serverAddr"), ServerAddr.class); + ServerAddr result = new ServerAddr(); + result.ipAddress = response.serverAddr.ipAddress; + result.port = response.serverAddr.port == null ? 0 : response.serverAddr.port; + return result; } @Override public int status() { - return initializer.get("status").getAsInt(); + return response.status; } @Override public String statusText() { - return initializer.get("statusText").getAsString(); + return response.statusText; } @Override @@ -122,8 +140,17 @@ public String text() { @Override public Timing timing() { Timing timing; - if (initializer.has("timing")) { - timing = gson().fromJson(initializer.get("timing"), Timing.class); + ResourceTiming t = response.timing; + if (t != null) { + timing = new Timing(); + timing.startTime = orZero(t.startTime); + timing.domainLookupStart = orZero(t.domainLookupStart); + timing.domainLookupEnd = orZero(t.domainLookupEnd); + timing.connectStart = orZero(t.connectStart); + timing.secureConnectionStart = orZero(t.secureConnectionStart); + timing.connectEnd = orZero(t.connectEnd); + timing.requestStart = orZero(t.requestStart); + timing.responseStart = orZero(t.responseStart); } else { timing = new Timing(); timing.startTime = -1; @@ -135,17 +162,21 @@ public Timing timing() { timing.requestStart = -1; timing.responseStart = -1; } - timing.responseEnd = initializer.has("responseEndTiming") ? initializer.get("responseEndTiming").getAsDouble() : -1; + timing.responseEnd = response.responseEndTiming != null ? response.responseEndTiming : -1; return timing; } + private static double orZero(Double value) { + return value == null ? 0 : value; + } + @Override public String url() { - return initializer.get("url").getAsString(); + return response.url; } String fetchUid() { - return initializer.get("fetchUid").getAsString(); + return response.fetchUid; } List fetchLog() { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 1cd0ff8ef..66529928a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -825,15 +825,10 @@ protected void handleEvent(String event, JsonObject params) { bindingCall.call(binding); } } else if ("console".equals(event)) { - PageImpl page = null; - if (params.has("page")) { - page = connection.getExistingObject(params.getAsJsonObject("page").get("guid").getAsString()); - } - WorkerImpl worker = null; - if (params.has("worker")) { - worker = connection.getExistingObject(params.getAsJsonObject("worker").get("guid").getAsString()); - } - ConsoleMessageImpl message = new ConsoleMessageImpl(connection, params, page, worker); + BrowserContextConsoleEvent consoleEvent = connection.protocolGson().fromJson(params, BrowserContextConsoleEvent.class); + PageImpl page = consoleEvent.page; + WorkerImpl worker = consoleEvent.worker; + ConsoleMessageImpl message = new ConsoleMessageImpl(consoleEvent); listeners.notify(BrowserContextImpl.EventType.CONSOLE, message); if (worker != null) { worker.listeners.notify(WorkerImpl.EventType.CONSOLE, message); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java index dcfde77ca..058c58f22 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java @@ -16,8 +16,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; import com.microsoft.playwright.ConsoleMessage; import com.microsoft.playwright.JSHandle; import com.microsoft.playwright.Worker; @@ -26,25 +24,46 @@ import java.util.List; public class ConsoleMessageImpl implements ConsoleMessage { - private final Connection connection; private final PageImpl page; private final WorkerImpl worker; - private final JsonObject initializer; + private final String type; + private final String text; + private final List args; + private final String url; + private final int lineNumber; + private final int columnNumber; + private final double timestamp; - public ConsoleMessageImpl(Connection connection, JsonObject initializer, PageImpl page, WorkerImpl worker) { - this.connection = connection; + ConsoleMessageImpl(BrowserContextConsoleEvent event) { + this(event.page, event.worker, event.type, event.text, event.args, + event.location.url, event.location.lineNumber, event.location.columnNumber, event.timestamp); + } + + ConsoleMessageImpl(PageImpl page, PageConsoleMessagesResult.PageConsoleMessagesResultMessages message) { + this(page, null, message.type, message.text, message.args, + message.location.url, message.location.lineNumber, message.location.columnNumber, message.timestamp); + } + + private ConsoleMessageImpl(PageImpl page, WorkerImpl worker, String type, String text, List args, + String url, int lineNumber, int columnNumber, double timestamp) { this.page = page; this.worker = worker; - this.initializer = initializer; + this.type = type; + this.text = text; + this.args = args; + this.url = url; + this.lineNumber = lineNumber; + this.columnNumber = columnNumber; + this.timestamp = timestamp; } @Override public double timestamp() { - return initializer.get("timestamp").getAsDouble(); + return timestamp; } public String type() { - return initializer.get("type").getAsString(); + return type; } @Override @@ -53,24 +72,17 @@ public Worker worker() { } public String text() { - return initializer.get("text").getAsString(); + return text; } @Override public List args() { - List result = new ArrayList<>(); - for (JsonElement item : initializer.getAsJsonArray("args")) { - result.add(connection.getExistingObject(item.getAsJsonObject().get("guid").getAsString())); - } - return result; + return new ArrayList(args); } @Override public String location() { - JsonObject location = initializer.getAsJsonObject("location"); - return location.get("url").getAsString() + ":" + - location.get("lineNumber").getAsNumber() + ":" + - location.get("columnNumber").getAsNumber(); + return url + ":" + lineNumber + ":" + columnNumber; } @Override diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index a5e83bf6f..73dae53a4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -1037,7 +1037,7 @@ public List consoleMessages(ConsoleMessagesOptions options) { PageConsoleMessagesResult json = channel.consoleMessages(params, NO_TIMEOUT); List result = new ArrayList<>(); for (PageConsoleMessagesResult.PageConsoleMessagesResultMessages item : json.messages) { - result.add(new ConsoleMessageImpl(connection, connection.protocolGson().toJsonTree(item).getAsJsonObject(), this, null)); + result.add(new ConsoleMessageImpl(this, item)); } return result; } From d374c3d623c89447b8cd0e0e5961ab8b86dbfc29 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:07:51 -0800 Subject: [PATCH 26/33] refactor(selectors): keep typed selector engines --- .../java/com/microsoft/playwright/impl/BrowserImpl.java | 6 +----- .../com/microsoft/playwright/impl/BrowserTypeImpl.java | 4 ++-- .../java/com/microsoft/playwright/impl/SelectorsImpl.java | 7 +++---- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java index 77d776e8e..03c292542 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java @@ -196,7 +196,7 @@ public BrowserContextImpl newContext(NewContextOptions options) { params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserNewContextParams.BrowserNewContextParamsClientCertificates.class); params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); - params.selectorEngines = selectorEnginesToProtocol(connection, browserType.playwright.selectors.selectorEngines); + params.selectorEngines = new ArrayList<>(browserType.playwright.selectors.selectorEngines); params.testIdAttributeName = browserType.playwright.selectors.testIdAttributeName; BrowserContextImpl context = channel.newContext(params, NO_TIMEOUT).context; context.initializeHarFromOptions(harOptions); @@ -274,10 +274,6 @@ static List clientCertificatesToProtocol(Connection connection, List selectorEnginesToProtocol(Connection connection, Object selectorEngines) { - return fromJsonList(connection, connection.protocolGson().toJsonTree(selectorEngines), SelectorEngine.class); - } - private static List fromJsonList(Connection connection, JsonElement json, Class elementClass) { if (json == null) { return null; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index 3e11353c7..869165704 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -26,12 +26,12 @@ import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; import static com.microsoft.playwright.impl.BrowserImpl.clientCertificatesToProtocol; import static com.microsoft.playwright.impl.BrowserImpl.httpCredentialsToProtocol; -import static com.microsoft.playwright.impl.BrowserImpl.selectorEnginesToProtocol; import static com.microsoft.playwright.impl.Utils.convertType; import static com.microsoft.playwright.impl.Utils.toProtocol; @@ -188,7 +188,7 @@ public BrowserContextImpl launchPersistentContext(Path userDataDir, LaunchPersis params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsClientCertificates.class); params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); - params.selectorEngines = selectorEnginesToProtocol(connection, playwright.selectors.selectorEngines); + params.selectorEngines = new ArrayList<>(playwright.selectors.selectorEngines); params.testIdAttributeName = playwright.selectors.testIdAttributeName; BrowserTypeLaunchPersistentContextResult result = channel.launchPersistentContext(params, TimeoutSettings.launchTimeout(options.timeout)); BrowserImpl browser = result.browser; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java index 837fadcc0..0d6fd9141 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java @@ -31,7 +31,7 @@ public class SelectorsImpl extends LoggingSupport implements Selectors { protected final List contextsForSelectors = new ArrayList<>(); - protected final List selectorEngines = new ArrayList<>(); + protected final List selectorEngines = new ArrayList<>(); String testIdAttributeName = "data-testid"; @@ -68,7 +68,7 @@ public void register(String name, Path path, RegisterOptions options) { } private void registerImpl(String name, String script, RegisterOptions options) { - if (selectorEngines.stream().anyMatch(engine -> name.equals(engine.get("name").getAsString()))) { + if (selectorEngines.stream().anyMatch(engine -> name.equals(engine.name))) { throw new PlaywrightException("selectors.register: \"" + name + "\" selector engine has been already registered"); } @@ -83,7 +83,6 @@ private void registerImpl(String name, String script, RegisterOptions options) { params.selectorEngine = engine; context.channel.registerSelectorEngine(params, NO_TIMEOUT); } - // java: kept as JsonObject because BrowserImpl and BrowserTypeImpl serialize the list as is. - selectorEngines.add(Serialization.gson().toJsonTree(engine).getAsJsonObject()); + selectorEngines.add(engine); } } From 877c4f0c237af905a42d5f0c44694981ef94e3b9 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Sun, 1 Nov 2026 14:09:17 -0800 Subject: [PATCH 27/33] refactor(client): drop dead JsonObject protocol helpers --- .../playwright/impl/BrowserContextImpl.java | 8 --- .../playwright/impl/BrowserImpl.java | 56 +++++++++++------ .../playwright/impl/BrowserTypeImpl.java | 21 ++++++- .../playwright/impl/Serialization.java | 32 ---------- .../com/microsoft/playwright/impl/Utils.java | 61 ------------------- 5 files changed, 57 insertions(+), 121 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index 66529928a..a3aec4965 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -911,14 +911,6 @@ void didClose() { listeners.notify(EventType.CLOSE, this); } - WritableStream createTempFile(String name, long lastModifiedMs) { - JsonObject params = new JsonObject(); - params.addProperty("name", name); - params.addProperty("lastModifiedMs", lastModifiedMs); - JsonObject json = sendMessage("createTempFile", params, NO_TIMEOUT).getAsJsonObject(); - return connection.getExistingObject(json.getAsJsonObject("writableStream").get("guid").getAsString()); - } - protected void initializeHarFromOptions(Browser.NewContextOptions options) { if (options.recordHarPath == null) { if (options.recordHarOmitContent != null) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java index 03c292542..6f24d0333 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java @@ -23,6 +23,7 @@ import com.microsoft.playwright.*; import com.microsoft.playwright.options.BindResult; import com.microsoft.playwright.options.ClientCertificate; +import com.microsoft.playwright.options.HttpCredentials; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -193,8 +194,8 @@ public BrowserContextImpl newContext(NewContextOptions options) { params.screen.width = options.screenSize.width; params.screen.height = options.screenSize.height; } - params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserNewContextParams.BrowserNewContextParamsClientCertificates.class); - params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); + params.clientCertificates = clientCertificatesToProtocol(clientCertificates); + params.httpCredentials = httpCredentialsToProtocol(httpCredentials); params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); params.selectorEngines = new ArrayList<>(browserType.playwright.selectors.selectorEngines); params.testIdAttributeName = browserType.playwright.selectors.testIdAttributeName; @@ -255,30 +256,51 @@ public byte[] stopTracing() { } // The protocol takes a list of http credentials, the option is a single value or a list. - static List httpCredentialsToProtocol(Connection connection, Object httpCredentials) { + @SuppressWarnings("unchecked") + static List httpCredentialsToProtocol(Object httpCredentials) { if (httpCredentials == null) { return null; } - JsonObject tmp = new JsonObject(); - tmp.add("httpCredentials", connection.protocolGson().toJsonTree(httpCredentials)); - addHttpCredentialsToProtocol(tmp); - return fromJsonList(connection, tmp.get("httpCredentials"), ProtocolHttpCredentials.class); - } - - static List clientCertificatesToProtocol(Connection connection, List clientCertificates, Class protocolClass) { - if (clientCertificates == null) { + List list = new ArrayList<>(); + if (httpCredentials instanceof List) { + list.addAll((List) httpCredentials); + } else { + list.add((HttpCredentials) httpCredentials); + } + if (list.isEmpty()) { return null; } - JsonObject tmp = new JsonObject(); - addToProtocol(tmp, clientCertificates); - return fromJsonList(connection, tmp.get("clientCertificates"), protocolClass); + List result = new ArrayList<>(); + for (HttpCredentials credentials : list) { + ProtocolHttpCredentials c = new ProtocolHttpCredentials(); + c.username = credentials.username; + c.password = credentials.password; + c.origin = credentials.origin; + c.send = credentials.send == null ? null : credentials.send.name().toLowerCase(); + result.add(c); + } + return result; } - private static List fromJsonList(Connection connection, JsonElement json, Class elementClass) { - if (json == null) { + static List clientCertificatesToProtocol(List clientCertificates) { + if (clientCertificates == null) { return null; } - return connection.protocolGson().fromJson(json, TypeToken.getParameterized(List.class, elementClass).getType()); + List result = new ArrayList<>(); + for (ClientCertificate cert : clientCertificates) { + BrowserNewContextParams.BrowserNewContextParamsClientCertificates c = new BrowserNewContextParams.BrowserNewContextParamsClientCertificates(); + c.origin = cert.origin; + try { + c.cert = cert.certPath != null ? Files.readAllBytes(cert.certPath) : cert.cert; + c.key = cert.keyPath != null ? Files.readAllBytes(cert.keyPath) : cert.key; + c.pfx = cert.pfxPath != null ? Files.readAllBytes(cert.pfxPath) : cert.pfx; + } catch (IOException e) { + throw new PlaywrightException("Failed to read from file", e); + } + c.passphrase = cert.passphrase; + result.add(c); + } + return result; } private Page newPageImpl(NewPageOptions options) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index 869165704..be77c8cee 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -24,13 +24,13 @@ import com.microsoft.playwright.options.ClientCertificate; import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; -import static com.microsoft.playwright.impl.BrowserImpl.clientCertificatesToProtocol; import static com.microsoft.playwright.impl.BrowserImpl.httpCredentialsToProtocol; import static com.microsoft.playwright.impl.Utils.convertType; import static com.microsoft.playwright.impl.Utils.toProtocol; @@ -185,8 +185,23 @@ public BrowserContextImpl launchPersistentContext(Path userDataDir, LaunchPersis params.noDefaultViewport = true; } } - params.clientCertificates = clientCertificatesToProtocol(connection, clientCertificates, BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsClientCertificates.class); - params.httpCredentials = httpCredentialsToProtocol(connection, httpCredentials); + if (clientCertificates != null) { + params.clientCertificates = new ArrayList<>(); + for (ClientCertificate cert : clientCertificates) { + BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsClientCertificates c = new BrowserTypeLaunchPersistentContextParams.BrowserTypeLaunchPersistentContextParamsClientCertificates(); + c.origin = cert.origin; + try { + c.cert = cert.certPath != null ? Files.readAllBytes(cert.certPath) : cert.cert; + c.key = cert.keyPath != null ? Files.readAllBytes(cert.keyPath) : cert.key; + c.pfx = cert.pfxPath != null ? Files.readAllBytes(cert.pfxPath) : cert.pfx; + } catch (IOException e) { + throw new PlaywrightException("Failed to read from file", e); + } + c.passphrase = cert.passphrase; + params.clientCertificates.add(c); + } + } + params.httpCredentials = httpCredentialsToProtocol(httpCredentials); params.acceptDownloads = options.acceptDownloads == null ? null : (options.acceptDownloads ? "accept" : "deny"); params.selectorEngines = new ArrayList<>(playwright.selectors.selectorEngines); params.testIdAttributeName = playwright.selectors.testIdAttributeName; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java index 63cb31c6c..53c327166 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java @@ -321,38 +321,6 @@ public JsonArray serialize(List modifiers, Type typeOfSrc, Jso } } - static JsonArray toJsonArray(Path[] files) { - JsonArray jsonFiles = new JsonArray(); - for (Path p : files) { - jsonFiles.add(p.toAbsolutePath().toString()); - } - return jsonFiles; - } - - static JsonArray toJsonArray(FilePayload[] files) { - JsonArray jsonFiles = new JsonArray(); - for (FilePayload p : files) { - jsonFiles.add(toProtocol(p)); - } - return jsonFiles; - } - - static JsonObject toProtocol(FilePayload p) { - JsonObject jsonFile = new JsonObject(); - jsonFile.addProperty("name", p.name); - jsonFile.addProperty("mimeType", p.mimeType); - jsonFile.addProperty("buffer", Base64.getEncoder().encodeToString(p.buffer)); - return jsonFile; - } - - static JsonArray toProtocol(ElementHandle[] handles) { - JsonArray jsonElements = new JsonArray(); - for (ElementHandle handle : handles) { - jsonElements.add(((ElementHandleImpl) handle).toProtocolRef()); - } - return jsonElements; - } - static JsonArray toProtocol(Map map) { for (String value : map.values()) { if (value == null) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index 5eb809f38..f17c16e5e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -45,7 +45,6 @@ import java.util.stream.Collectors; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; -import static com.microsoft.playwright.impl.Serialization.toJsonArray; import static java.nio.file.Files.readAllBytes; public class Utils { @@ -430,66 +429,6 @@ static String addSourceUrlToScript(String source, Path path) { return source + "\n//# sourceURL=" + path.toString().replace("\n", ""); } - static void addToProtocol(JsonObject params, List clientCertificateList) { - if (clientCertificateList == null) { - return; - } - JsonArray clientCertificates = new JsonArray(); - for (ClientCertificate cert: clientCertificateList) { - JsonObject jsonCert = new JsonObject(); - jsonCert.addProperty("origin", cert.origin); - try { - String certBase64 = base64Buffer(cert.cert, cert.certPath); - if (certBase64 != null) { - jsonCert.addProperty("cert", certBase64); - } - String keyBase64 = base64Buffer(cert.key, cert.keyPath); - if (keyBase64 != null) { - jsonCert.addProperty("key", keyBase64); - } - String pfxBase64 = base64Buffer(cert.pfx, cert.pfxPath); - if (pfxBase64 != null) { - jsonCert.addProperty("pfx", pfxBase64); - } - } catch (IOException e) { - throw new PlaywrightException("Failed to read from file", e); - } - if (cert.passphrase != null) { - jsonCert.addProperty("passphrase", cert.passphrase); - } - clientCertificates.add(jsonCert); - } - params.remove("clientCertificates"); - params.add("clientCertificates", clientCertificates); - } - - // Mirrors toHttpCredentialsProtocol() in the JS client: the protocol always takes a list. - static void addHttpCredentialsToProtocol(JsonObject params) { - JsonElement credentials = params.remove("httpCredentials"); - if (credentials == null) { - return; - } - JsonArray list = new JsonArray(); - if (credentials.isJsonArray()) { - list.addAll(credentials.getAsJsonArray()); - } else { - list.add(credentials); - } - if (list.size() > 0) { - params.add("httpCredentials", list); - } - } - - private static String base64Buffer(byte[] bytes, Path path) throws IOException { - if (path != null) { - bytes = readAllBytes(path); - } - if (bytes == null) { - return null; - } - return Base64.getEncoder().encodeToString(bytes); - } - static JsonObject interceptionPatterns(List matchers) { JsonArray jsonPatterns = new JsonArray(); for (UrlMatcher matcher: matchers) { From fd8d862e2473f8a4e45ba7e81988cf77042a6cf8 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 16:55:01 -0800 Subject: [PATCH 28/33] chore(protocol): regenerate channel types for driver 1.65.0 --- .../src/main/java/com/microsoft/playwright/impl/RootChannel.java | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java index dfcef789f..55b2b5719 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java @@ -35,6 +35,7 @@ class RootInitializer { class RootInitializeParams { String sdkLanguage; + Boolean supportsLoneSurrogates; } class RootInitializeResult { From 445b4f41b5858d4287017442dfa0bae4db3f3dd2 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 17:40:11 -0800 Subject: [PATCH 29/33] refactor(protocol): send supportsLoneSurrogates like the Node.js client --- .../src/main/java/com/microsoft/playwright/impl/Connection.java | 1 + 1 file changed, 1 insertion(+) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index b24e9d463..4be7f5cd4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java @@ -100,6 +100,7 @@ class Root extends ChannelOwner { PlaywrightImpl initialize() { RootInitializeParams params = new RootInitializeParams(); params.sdkLanguage = "java"; + params.supportsLoneSurrogates = true; return new RootChannel(this).initialize(params, NO_TIMEOUT).playwright; } } From be04f569fa07768314283c6d91c8e49d8d0d5323 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 17:41:09 -0800 Subject: [PATCH 30/33] refactor(protocol): move the generated channel types into impl.protocol The generator writes one public class per file into com.microsoft.playwright.impl.protocol, with the upstream names (no Protocol prefix). The client uses the new package, and the owner classes and ChannelOwner.sendMessage that the generated channels call are public. --- .../impl/APIRequestContextChannel.java | 147 --- .../impl/APIRequestContextImpl.java | 3 +- .../playwright/impl/APIRequestImpl.java | 3 +- .../impl/APIResponseAssertionsImpl.java | 1 + .../playwright/impl/APIResponseImpl.java | 7 +- .../playwright/impl/ArtifactImpl.java | 3 +- .../playwright/impl/AssertionsBase.java | 1 + .../playwright/impl/BindingCall.java | 3 +- .../impl/BrowserContextChannel.java | 641 ------------- .../playwright/impl/BrowserContextImpl.java | 3 +- .../playwright/impl/BrowserImpl.java | 11 +- .../playwright/impl/BrowserTypeChannel.java | 220 ----- .../playwright/impl/BrowserTypeImpl.java | 3 +- .../playwright/impl/CDPSessionImpl.java | 1 + .../playwright/impl/ChannelOwner.java | 6 +- .../microsoft/playwright/impl/ClockImpl.java | 1 + .../microsoft/playwright/impl/Connection.java | 1 + .../playwright/impl/ConsoleMessageImpl.java | 1 + .../playwright/impl/CredentialsImpl.java | 1 + .../impl/DebugControllerChannel.java | 126 --- .../playwright/impl/DebuggerChannel.java | 126 --- .../playwright/impl/DebuggerImpl.java | 3 +- .../microsoft/playwright/impl/DialogImpl.java | 3 +- .../playwright/impl/DisposableObject.java | 3 +- .../playwright/impl/ElementHandleChannel.java | 562 ----------- .../playwright/impl/ElementHandleImpl.java | 1 + .../playwright/impl/FrameChannel.java | 791 ---------------- .../microsoft/playwright/impl/FrameImpl.java | 1 + .../microsoft/playwright/impl/HARRouter.java | 1 + .../playwright/impl/JSHandleChannel.java | 123 --- .../playwright/impl/JSHandleImpl.java | 1 + .../microsoft/playwright/impl/JsonPipe.java | 3 +- .../playwright/impl/KeyboardImpl.java | 1 + .../microsoft/playwright/impl/LocalUtils.java | 1 + .../playwright/impl/LocalUtilsChannel.java | 199 ---- .../impl/LocatorAssertionsImpl.java | 1 + .../playwright/impl/LocatorImpl.java | 1 + .../microsoft/playwright/impl/MouseImpl.java | 1 + .../playwright/impl/PageAssertionsImpl.java | 1 + .../playwright/impl/PageChannel.java | 875 ------------------ .../microsoft/playwright/impl/PageImpl.java | 3 +- .../playwright/impl/PlaywrightChannel.java | 79 -- .../playwright/impl/PlaywrightImpl.java | 1 + .../microsoft/playwright/impl/Protocol.java | 1 + .../impl/ProtocolBrowserChannel.java | 362 -------- .../playwright/impl/ProtocolStructs.java | 408 -------- .../playwright/impl/RequestImpl.java | 1 + .../playwright/impl/ResponseChannel.java | 129 --- .../playwright/impl/ResponseImpl.java | 3 +- .../microsoft/playwright/impl/RouteImpl.java | 2 + .../playwright/impl/ScreencastImpl.java | 1 + .../playwright/impl/SelectorsImpl.java | 1 + .../playwright/impl/Serialization.java | 3 + .../com/microsoft/playwright/impl/Stream.java | 1 + .../playwright/impl/TouchscreenImpl.java | 1 + .../playwright/impl/TracingChannel.java | 136 --- .../playwright/impl/TracingImpl.java | 3 +- .../com/microsoft/playwright/impl/Utils.java | 1 + .../microsoft/playwright/impl/WebMCPImpl.java | 1 + .../playwright/impl/WebSocketImpl.java | 3 +- .../impl/WebSocketRouteChannel.java | 116 --- .../playwright/impl/WebSocketRouteImpl.java | 3 +- .../playwright/impl/WebStorageImpl.java | 1 + .../playwright/impl/WorkerChannel.java | 95 -- .../microsoft/playwright/impl/WorkerImpl.java | 3 +- .../playwright/impl/WritableStream.java | 3 +- .../APIRequestContextAddCookiesParams.java | 25 + .../protocol/APIRequestContextChannel.java | 63 ++ .../APIRequestContextClearCookiesParams.java | 31 + .../APIRequestContextCookiesParams.java | 25 + .../APIRequestContextCookiesResult.java | 25 + ...equestContextDisposeAPIResponseParams.java | 23 + .../APIRequestContextDisposeParams.java | 23 + .../APIRequestContextFetchLogParams.java | 23 + .../APIRequestContextFetchLogResult.java | 25 + .../APIRequestContextFetchParams.java | 37 + ...RequestContextFetchResponseBodyParams.java | 23 + ...RequestContextFetchResponseBodyResult.java | 23 + .../APIRequestContextFetchResult.java | 23 + .../APIRequestContextInitializer.java | 23 + .../APIRequestContextStorageStateParams.java | 24 + .../APIRequestContextStorageStateResult.java | 26 + .../playwright/impl/protocol/APIResponse.java | 33 + .../impl/protocol/AndroidElementInfo.java | 37 + .../impl/protocol/AndroidSelector.java | 46 + .../impl/protocol/AndroidWebView.java | 25 + .../impl/protocol/ArtifactCancelParams.java | 22 + .../impl/{ => protocol}/ArtifactChannel.java | 76 +- .../impl/protocol/ArtifactDeleteParams.java | 22 + .../impl/protocol/ArtifactFailureParams.java | 22 + .../impl/protocol/ArtifactFailureResult.java | 23 + .../impl/protocol/ArtifactInitializer.java | 23 + .../ArtifactPathAfterFinishedParams.java | 22 + .../ArtifactPathAfterFinishedResult.java | 23 + .../impl/protocol/ArtifactSaveAsParams.java | 23 + .../protocol/ArtifactSaveAsStreamParams.java | 22 + .../protocol/ArtifactSaveAsStreamResult.java | 23 + .../impl/protocol/ArtifactStreamParams.java | 22 + .../impl/protocol/ArtifactStreamResult.java | 23 + .../{ => protocol}/BindingCallChannel.java | 28 +- .../impl/protocol/BindingCallInitializer.java | 27 + .../protocol/BindingCallRejectParams.java | 23 + .../protocol/BindingCallResolveParams.java | 23 + .../impl/protocol/BrowserChannel.java | 91 ++ .../impl/protocol/BrowserCloseEvent.java | 22 + .../impl/protocol/BrowserCloseParams.java | 23 + .../BrowserContextAddCookiesParams.java | 25 + .../BrowserContextAddInitScriptParams.java | 23 + .../BrowserContextAddInitScriptResult.java | 23 + .../BrowserContextBindingCallEvent.java | 23 + .../impl/protocol/BrowserContextChannel.java | 207 +++++ .../BrowserContextClearCookiesParams.java | 31 + .../BrowserContextClearPermissionsParams.java | 22 + .../BrowserContextClockFastForwardParams.java | 24 + .../BrowserContextClockInstallParams.java | 24 + .../BrowserContextClockPauseAtParams.java | 24 + .../BrowserContextClockResumeParams.java | 22 + .../BrowserContextClockRunForParams.java | 24 + ...BrowserContextClockSetFixedTimeParams.java | 24 + ...rowserContextClockSetSystemTimeParams.java | 24 + .../protocol/BrowserContextCloseEvent.java | 22 + .../protocol/BrowserContextCloseParams.java | 23 + .../protocol/BrowserContextConsoleEvent.java | 37 + .../protocol/BrowserContextCookiesParams.java | 25 + .../protocol/BrowserContextCookiesResult.java | 25 + .../BrowserContextCreateTempFilesParams.java | 31 + .../BrowserContextCreateTempFilesResult.java | 26 + ...BrowserContextCredentialsCreateParams.java | 28 + ...BrowserContextCredentialsCreateResult.java | 23 + ...BrowserContextCredentialsDeleteParams.java | 23 + .../BrowserContextCredentialsGetParams.java | 24 + .../BrowserContextCredentialsGetResult.java | 25 + ...rowserContextCredentialsInstallParams.java | 22 + .../BrowserContextDialogClosedEvent.java | 23 + .../protocol/BrowserContextDialogEvent.java | 23 + .../impl/protocol/BrowserContextEvent.java | 23 + .../BrowserContextExposeBindingParams.java | 24 + .../BrowserContextExposeBindingResult.java | 23 + .../BrowserContextExposeConsoleApiParams.java | 22 + .../BrowserContextGrantPermissionsParams.java | 26 + .../protocol/BrowserContextInitializer.java | 110 +++ .../BrowserContextNewCDPSessionParams.java | 24 + .../BrowserContextNewCDPSessionResult.java | 23 + .../protocol/BrowserContextNewPageParams.java | 22 + .../protocol/BrowserContextNewPageResult.java | 23 + .../BrowserContextPageErrorEvent.java | 31 + .../protocol/BrowserContextPageEvent.java | 23 + .../protocol/BrowserContextPauseParams.java | 22 + .../BrowserContextRecorderEventEvent.java | 28 + ...erContextRegisterSelectorEngineParams.java | 23 + .../protocol/BrowserContextRequestEvent.java | 24 + .../BrowserContextRequestFailedEvent.java | 26 + .../BrowserContextRequestFinishedEvent.java | 26 + .../protocol/BrowserContextResponseEvent.java | 24 + .../protocol/BrowserContextRouteEvent.java | 23 + .../BrowserContextServiceWorkerEvent.java | 23 + ...owserContextSetExtraHTTPHeadersParams.java | 25 + .../BrowserContextSetGeolocationParams.java | 29 + ...rowserContextSetHTTPCredentialsParams.java | 25 + ...tSetNetworkInterceptionPatternsParams.java | 32 + .../BrowserContextSetOfflineParams.java | 23 + .../BrowserContextSetStorageStateParams.java | 31 + ...erContextSetTestIdAttributeNameParams.java | 23 + ...etWebSocketInterceptionPatternsParams.java | 32 + .../BrowserContextShowRecorderParams.java | 35 + .../BrowserContextStartRecordingParams.java | 23 + .../BrowserContextStopRecordingParams.java | 22 + .../BrowserContextStorageStateParams.java | 25 + .../BrowserContextStorageStateResult.java | 27 + ...rowserContextUpdateSubscriptionParams.java | 24 + .../BrowserContextWebSocketRouteEvent.java | 23 + .../BrowserDefaultUserAgentForTestParams.java | 22 + .../BrowserDefaultUserAgentForTestResult.java | 23 + ...wserDisconnectFromReusedContextParams.java | 23 + .../impl/protocol/BrowserInitializer.java | 25 + .../protocol/BrowserKillForTestsParams.java | 22 + .../BrowserNewBrowserCDPSessionParams.java | 22 + .../BrowserNewBrowserCDPSessionResult.java | 23 + .../BrowserNewContextForReuseParams.java | 118 +++ .../BrowserNewContextForReuseResult.java | 23 + .../protocol/BrowserNewContextParams.java | 118 +++ .../protocol/BrowserNewContextResult.java | 23 + .../protocol/BrowserStartServerParams.java | 29 + .../protocol/BrowserStartServerResult.java | 23 + .../protocol/BrowserStartTracingParams.java | 27 + .../protocol/BrowserStopServerParams.java | 22 + .../protocol/BrowserStopTracingParams.java | 22 + .../protocol/BrowserStopTracingResult.java | 23 + .../impl/protocol/BrowserTypeChannel.java | 43 + .../BrowserTypeConnectOverCDPParams.java | 32 + .../BrowserTypeConnectOverCDPResult.java | 24 + .../BrowserTypeConnectToWorkerParams.java | 23 + .../BrowserTypeConnectToWorkerResult.java | 23 + .../impl/protocol/BrowserTypeInitializer.java | 24 + .../protocol/BrowserTypeLaunchParams.java | 50 + ...wserTypeLaunchPersistentContextParams.java | 130 +++ ...wserTypeLaunchPersistentContextResult.java | 24 + .../protocol/BrowserTypeLaunchResult.java | 23 + .../{ => protocol}/CDPSessionChannel.java | 39 +- .../impl/protocol/CDPSessionCloseEvent.java | 22 + .../impl/protocol/CDPSessionDetachParams.java | 22 + .../impl/protocol/CDPSessionEventEvent.java | 26 + .../impl/protocol/CDPSessionInitializer.java | 22 + .../impl/protocol/CDPSessionSendParams.java | 26 + .../impl/protocol/CDPSessionSendResult.java | 25 + .../impl/protocol/ClientSideCallMetadata.java | 26 + .../impl/protocol/ConsoleMessagesFilter.java | 24 + .../impl/protocol/DebugControllerChannel.java | 67 ++ .../DebugControllerHideHighlightParams.java | 22 + .../DebugControllerHighlightParams.java | 24 + .../DebugControllerInitializeParams.java | 24 + .../protocol/DebugControllerInitializer.java | 22 + .../DebugControllerInspectRequestedEvent.java | 25 + .../protocol/DebugControllerKillParams.java | 22 + .../protocol/DebugControllerPausedEvent.java | 23 + .../protocol/DebugControllerResumeParams.java | 22 + .../DebugControllerSetModeRequestedEvent.java | 23 + .../DebugControllerSetRecorderModeParams.java | 25 + ...ControllerSetReportStateChangedParams.java | 23 + .../DebugControllerSourceChangedEvent.java | 28 + .../DebugControllerStateChangedEvent.java | 23 + .../DebuggerApiCallsUpdatedEvent.java | 41 + .../impl/protocol/DebuggerChannel.java | 63 ++ .../impl/protocol/DebuggerEnableParams.java | 22 + .../impl/protocol/DebuggerInitializer.java | 22 + .../impl/protocol/DebuggerNextParams.java | 22 + .../DebuggerPausedStateChangedEvent.java | 35 + .../protocol/DebuggerRequestPauseParams.java | 22 + .../impl/protocol/DebuggerResumeParams.java | 22 + .../impl/protocol/DebuggerRunToParams.java | 29 + .../impl/protocol/DialogAcceptParams.java | 23 + .../impl/{ => protocol}/DialogChannel.java | 28 +- .../impl/protocol/DialogDismissParams.java | 22 + .../impl/protocol/DialogInitializer.java | 26 + .../{ => protocol}/DisposableChannel.java | 18 +- .../protocol/DisposableDisposeParams.java | 22 + .../impl/protocol/DisposableInitializer.java | 22 + .../ElementHandleBoundingBoxParams.java | 22 + .../ElementHandleBoundingBoxResult.java | 23 + .../impl/protocol/ElementHandleChannel.java | 267 ++++++ .../protocol/ElementHandleCheckParams.java | 26 + .../protocol/ElementHandleClickParams.java | 34 + .../ElementHandleContentFrameParams.java | 22 + .../ElementHandleContentFrameResult.java | 23 + .../protocol/ElementHandleDblclickParams.java | 32 + .../ElementHandleDispatchEventParams.java | 24 + .../ElementHandleEvalOnSelectorAllParams.java | 26 + .../ElementHandleEvalOnSelectorAllResult.java | 23 + .../ElementHandleEvalOnSelectorParams.java | 27 + .../ElementHandleEvalOnSelectorResult.java | 23 + .../protocol/ElementHandleFillParams.java | 24 + .../protocol/ElementHandleFocusParams.java | 22 + .../ElementHandleGetAttributeParams.java | 23 + .../ElementHandleGetAttributeResult.java | 23 + .../protocol/ElementHandleHoverParams.java | 29 + .../protocol/ElementHandleInitializer.java | 22 + .../ElementHandleInnerHTMLParams.java | 22 + .../ElementHandleInnerHTMLResult.java | 23 + .../ElementHandleInnerTextParams.java | 22 + .../ElementHandleInnerTextResult.java | 23 + .../ElementHandleInputValueParams.java | 22 + .../ElementHandleInputValueResult.java | 23 + .../ElementHandleIsCheckedParams.java | 22 + .../ElementHandleIsCheckedResult.java | 23 + .../ElementHandleIsDisabledParams.java | 22 + .../ElementHandleIsDisabledResult.java | 23 + .../ElementHandleIsEditableParams.java | 22 + .../ElementHandleIsEditableResult.java | 23 + .../ElementHandleIsEnabledParams.java | 22 + .../ElementHandleIsEnabledResult.java | 23 + .../protocol/ElementHandleIsHiddenParams.java | 22 + .../protocol/ElementHandleIsHiddenResult.java | 23 + .../ElementHandleIsVisibleParams.java | 22 + .../ElementHandleIsVisibleResult.java | 23 + .../ElementHandleOwnerFrameParams.java | 22 + .../ElementHandleOwnerFrameResult.java | 23 + .../protocol/ElementHandlePressParams.java | 25 + .../ElementHandleQuerySelectorAllParams.java | 23 + .../ElementHandleQuerySelectorAllResult.java | 25 + .../ElementHandleQuerySelectorParams.java | 24 + .../ElementHandleQuerySelectorResult.java | 23 + .../ElementHandleScreenshotParams.java | 38 + .../ElementHandleScreenshotResult.java | 23 + ...entHandleScrollIntoViewIfNeededParams.java | 22 + .../ElementHandleSelectOptionParams.java | 34 + .../ElementHandleSelectOptionResult.java | 25 + .../ElementHandleSelectTextParams.java | 23 + .../ElementHandleSetInputFilesParams.java | 35 + .../impl/protocol/ElementHandleTapParams.java | 29 + .../ElementHandleTextContentParams.java | 22 + .../ElementHandleTextContentResult.java | 23 + .../protocol/ElementHandleTypeParams.java | 24 + .../protocol/ElementHandleUncheckParams.java | 26 + ...lementHandleWaitForElementStateParams.java | 23 + .../ElementHandleWaitForSelectorParams.java | 25 + .../ElementHandleWaitForSelectorResult.java | 23 + .../impl/protocol/ExpectedTextValue.java | 28 + .../playwright/impl/protocol/FormField.java | 31 + .../protocol/FrameAddScriptTagParams.java | 25 + .../protocol/FrameAddScriptTagResult.java | 23 + .../impl/protocol/FrameAddStyleTagParams.java | 24 + .../impl/protocol/FrameAddStyleTagResult.java | 23 + .../protocol/FrameAriaSnapshotJSONParams.java | 26 + .../protocol/FrameAriaSnapshotJSONResult.java | 25 + .../protocol/FrameAriaSnapshotParams.java | 26 + .../protocol/FrameAriaSnapshotResult.java | 23 + .../impl/protocol/FrameBlurParams.java | 24 + .../impl/protocol/FrameChannel.java | 247 +++++ .../impl/protocol/FrameCheckParams.java | 28 + .../impl/protocol/FrameClickParams.java | 36 + .../impl/protocol/FrameContentParams.java | 23 + .../impl/protocol/FrameContentResult.java | 23 + .../impl/protocol/FrameDblclickParams.java | 34 + .../protocol/FrameDispatchEventParams.java | 26 + .../impl/protocol/FrameDragAndDropParams.java | 31 + .../impl/protocol/FrameDropParams.java | 42 + .../FrameEvalOnSelectorAllParams.java | 26 + .../FrameEvalOnSelectorAllResult.java | 23 + .../protocol/FrameEvalOnSelectorParams.java | 27 + .../protocol/FrameEvalOnSelectorResult.java | 23 + .../FrameEvaluateExpressionHandleParams.java | 25 + .../FrameEvaluateExpressionHandleResult.java | 23 + .../FrameEvaluateExpressionParams.java | 25 + .../FrameEvaluateExpressionResult.java | 23 + .../protocol/FrameExpectErrorDetails.java | 30 + .../impl/protocol/FrameExpectParams.java | 34 + .../impl/protocol/FrameFillParams.java | 26 + .../impl/protocol/FrameFocusParams.java | 24 + .../protocol/FrameFrameElementParams.java | 22 + .../protocol/FrameFrameElementResult.java | 23 + .../protocol/FrameGetAttributeParams.java | 25 + .../protocol/FrameGetAttributeResult.java | 23 + .../impl/protocol/FrameGotoParams.java | 25 + .../impl/protocol/FrameGotoResult.java | 23 + .../protocol/FrameHideHighlightParams.java | 23 + .../impl/protocol/FrameHighlightParams.java | 24 + .../impl/protocol/FrameHoverParams.java | 31 + .../impl/protocol/FrameInitializer.java | 28 + .../impl/protocol/FrameInnerHTMLParams.java | 24 + .../impl/protocol/FrameInnerHTMLResult.java | 23 + .../impl/protocol/FrameInnerTextParams.java | 24 + .../impl/protocol/FrameInnerTextResult.java | 23 + .../impl/protocol/FrameInputValueParams.java | 24 + .../impl/protocol/FrameInputValueResult.java | 23 + .../impl/protocol/FrameIsCheckedParams.java | 24 + .../impl/protocol/FrameIsCheckedResult.java | 23 + .../impl/protocol/FrameIsDisabledParams.java | 24 + .../impl/protocol/FrameIsDisabledResult.java | 23 + .../impl/protocol/FrameIsEditableParams.java | 24 + .../impl/protocol/FrameIsEditableResult.java | 23 + .../impl/protocol/FrameIsEnabledParams.java | 24 + .../impl/protocol/FrameIsEnabledResult.java | 23 + .../impl/protocol/FrameIsHiddenParams.java | 24 + .../impl/protocol/FrameIsHiddenResult.java | 23 + .../impl/protocol/FrameIsVisibleParams.java | 24 + .../impl/protocol/FrameIsVisibleResult.java | 23 + .../impl/protocol/FrameLoadstateEvent.java | 24 + .../impl/protocol/FrameNavigatedEvent.java | 30 + .../impl/protocol/FramePressParams.java | 27 + .../impl/protocol/FrameQueryCountParams.java | 23 + .../impl/protocol/FrameQueryCountResult.java | 23 + .../protocol/FrameQuerySelectorAllParams.java | 23 + .../protocol/FrameQuerySelectorAllResult.java | 25 + .../protocol/FrameQuerySelectorParams.java | 24 + .../protocol/FrameQuerySelectorResult.java | 23 + .../protocol/FrameResolveSelectorParams.java | 24 + .../protocol/FrameResolveSelectorResult.java | 24 + .../protocol/FrameSelectOptionParams.java | 36 + .../protocol/FrameSelectOptionResult.java | 25 + .../impl/protocol/FrameSetContentParams.java | 24 + .../protocol/FrameSetInputFilesParams.java | 37 + .../impl/protocol/FrameTapParams.java | 31 + .../impl/protocol/FrameTextContentParams.java | 24 + .../impl/protocol/FrameTextContentResult.java | 23 + .../impl/protocol/FrameTitleParams.java | 22 + .../impl/protocol/FrameTitleResult.java | 23 + .../impl/protocol/FrameTypeParams.java | 26 + .../impl/protocol/FrameUncheckParams.java | 28 + .../protocol/FrameWaitForFunctionParams.java | 28 + .../protocol/FrameWaitForFunctionResult.java | 23 + .../protocol/FrameWaitForSelectorParams.java | 26 + .../protocol/FrameWaitForSelectorResult.java | 23 + .../protocol/FrameWaitForTimeoutParams.java | 23 + .../protocol/FrameWebmcpCallToolParams.java | 24 + .../protocol/FrameWebmcpCallToolResult.java | 23 + .../impl/protocol/FrameWebmcpToolsParams.java | 22 + .../impl/protocol/FrameWebmcpToolsResult.java | 39 + .../impl/protocol/HttpCredentials.java | 26 + .../impl/protocol/IndexedDBDatabase.java | 52 ++ .../impl/protocol/JSHandleChannel.java | 63 ++ .../impl/protocol/JSHandleDisposeParams.java | 22 + ...SHandleEvaluateExpressionHandleParams.java | 25 + ...SHandleEvaluateExpressionHandleResult.java | 23 + .../JSHandleEvaluateExpressionParams.java | 25 + .../JSHandleEvaluateExpressionResult.java | 23 + .../JSHandleGetPropertyListParams.java | 22 + .../JSHandleGetPropertyListResult.java | 30 + .../protocol/JSHandleGetPropertyParams.java | 23 + .../protocol/JSHandleGetPropertyResult.java | 23 + .../impl/protocol/JSHandleInitializer.java | 23 + .../protocol/JSHandleJsonValueParams.java | 22 + .../protocol/JSHandleJsonValueResult.java | 23 + .../protocol/JSHandlePreviewUpdatedEvent.java | 23 + .../impl/{ => protocol}/JsonPipeChannel.java | 34 +- .../impl/protocol/JsonPipeCloseParams.java | 22 + .../impl/protocol/JsonPipeClosedEvent.java | 23 + .../impl/protocol/JsonPipeInitializer.java | 22 + .../impl/protocol/JsonPipeMessageEvent.java | 25 + .../impl/protocol/JsonPipeSendParams.java | 25 + .../impl/protocol/LifecycleEvent.java | 26 + ...alUtilsAddStackToTracingNoReplyParams.java | 23 + .../LocalUtilsAsLocatorDescriptionParams.java | 24 + .../LocalUtilsAsLocatorDescriptionResult.java | 23 + .../impl/protocol/LocalUtilsChannel.java | 71 ++ .../protocol/LocalUtilsConnectParams.java | 29 + .../protocol/LocalUtilsConnectResult.java | 26 + .../protocol/LocalUtilsGlobToRegexParams.java | 25 + .../protocol/LocalUtilsGlobToRegexResult.java | 23 + .../protocol/LocalUtilsHarCloseParams.java | 23 + .../protocol/LocalUtilsHarLookupParams.java | 30 + .../protocol/LocalUtilsHarLookupResult.java | 30 + .../protocol/LocalUtilsHarOpenParams.java | 23 + .../protocol/LocalUtilsHarOpenResult.java | 24 + .../protocol/LocalUtilsHarUnzipParams.java | 25 + .../impl/protocol/LocalUtilsInitializer.java | 50 + .../LocalUtilsTraceDiscardedParams.java | 23 + .../LocalUtilsTracingStartedParams.java | 25 + .../LocalUtilsTracingStartedResult.java | 23 + .../impl/protocol/LocalUtilsZipParams.java | 30 + .../playwright/impl/protocol/Metadata.java | 32 + .../playwright/impl/protocol/NameValue.java | 24 + .../impl/protocol/NetworkCookie.java | 32 + .../playwright/impl/protocol/OPFSEntry.java | 25 + .../impl/protocol/OriginStorage.java | 28 + .../protocol/PageAddInitScriptParams.java | 23 + .../protocol/PageAddInitScriptResult.java | 23 + .../impl/protocol/PageBindingCallEvent.java | 23 + .../impl/protocol/PageBringToFrontParams.java | 22 + .../protocol/PageCancelPickLocatorParams.java | 22 + .../playwright/impl/protocol/PageChannel.java | 315 +++++++ .../PageClearConsoleMessagesParams.java | 22 + .../protocol/PageClearPageErrorsParams.java | 22 + .../impl/protocol/PageCloseEvent.java | 22 + .../impl/protocol/PageCloseParams.java | 23 + .../protocol/PageConsoleMessagesParams.java | 23 + .../protocol/PageConsoleMessagesResult.java | 39 + .../impl/protocol/PageCrashEvent.java | 22 + .../impl/protocol/PageDownloadEvent.java | 25 + .../impl/protocol/PageEmulateMediaParams.java | 27 + .../PageExpectScreenshotErrorDetails.java | 30 + .../protocol/PageExpectScreenshotParams.java | 51 + .../protocol/PageExpectScreenshotResult.java | 23 + .../protocol/PageExposeBindingParams.java | 24 + .../protocol/PageExposeBindingResult.java | 23 + .../impl/protocol/PageFileChooserEvent.java | 24 + .../impl/protocol/PageFrameAttachedEvent.java | 23 + .../impl/protocol/PageFrameDetachedEvent.java | 23 + .../impl/protocol/PageGoBackParams.java | 23 + .../impl/protocol/PageGoBackResult.java | 23 + .../impl/protocol/PageGoForwardParams.java | 23 + .../impl/protocol/PageGoForwardResult.java | 23 + .../protocol/PageHideHighlightParams.java | 22 + .../impl/protocol/PageInitializer.java | 32 + .../impl/protocol/PageKeyboardDownParams.java | 23 + .../PageKeyboardInsertTextParams.java | 23 + .../protocol/PageKeyboardPressParams.java | 24 + .../impl/protocol/PageKeyboardTypeParams.java | 24 + .../impl/protocol/PageKeyboardUpParams.java | 23 + .../PageLocatorHandlerTriggeredEvent.java | 23 + .../impl/protocol/PageMouseClickParams.java | 27 + .../impl/protocol/PageMouseDownParams.java | 24 + .../impl/protocol/PageMouseMoveParams.java | 25 + .../impl/protocol/PageMouseUpParams.java | 24 + .../impl/protocol/PageMouseWheelParams.java | 24 + .../impl/protocol/PagePageErrorsParams.java | 23 + .../impl/protocol/PagePageErrorsResult.java | 25 + .../impl/protocol/PagePdfParams.java | 43 + .../impl/protocol/PagePdfResult.java | 23 + .../impl/protocol/PagePickLocatorParams.java | 22 + .../impl/protocol/PagePickLocatorResult.java | 23 + .../PageRegisterLocatorHandlerParams.java | 24 + .../PageRegisterLocatorHandlerResult.java | 23 + .../impl/protocol/PageReloadParams.java | 23 + .../impl/protocol/PageReloadResult.java | 23 + .../impl/protocol/PageRequestGCParams.java | 22 + .../impl/protocol/PageRequestsParams.java | 22 + .../impl/protocol/PageRequestsResult.java | 25 + ...ageResolveLocatorHandlerNoReplyParams.java | 24 + .../impl/protocol/PageRouteEvent.java | 23 + .../protocol/PageRunBeforeUnloadParams.java | 22 + .../protocol/PageScreencastChapterParams.java | 25 + .../PageScreencastFrameAckParams.java | 23 + .../protocol/PageScreencastFrameEvent.java | 27 + .../PageScreencastHideActionsParams.java | 22 + .../PageScreencastRemoveOverlayParams.java | 23 + ...PageScreencastSetOverlayVisibleParams.java | 23 + .../PageScreencastShowActionsParams.java | 33 + .../PageScreencastShowOverlayParams.java | 24 + .../PageScreencastShowOverlayResult.java | 23 + .../protocol/PageScreencastStartParams.java | 32 + .../protocol/PageScreencastStartResult.java | 23 + .../protocol/PageScreencastStopParams.java | 22 + .../impl/protocol/PageScreenshotParams.java | 40 + .../impl/protocol/PageScreenshotResult.java | 23 + .../impl/protocol/PageSetDockTileParams.java | 23 + .../PageSetExtraHTTPHeadersParams.java | 25 + ...eSetNetworkInterceptionPatternsParams.java | 32 + .../protocol/PageSetViewportSizeParams.java | 28 + ...etWebSocketInterceptionPatternsParams.java | 32 + .../protocol/PageStartCSSCoverageParams.java | 23 + .../protocol/PageStartJSCoverageParams.java | 24 + .../protocol/PageStopCSSCoverageParams.java | 22 + .../protocol/PageStopCSSCoverageResult.java | 36 + .../protocol/PageStopJSCoverageParams.java | 22 + .../protocol/PageStopJSCoverageResult.java | 44 + .../protocol/PageTouchscreenTapParams.java | 24 + .../PageUnregisterLocatorHandlerParams.java | 23 + .../PageUpdateSubscriptionParams.java | 24 + .../PageViewportSizeChangedEvent.java | 28 + .../impl/protocol/PageWebSocketEvent.java | 23 + .../protocol/PageWebSocketRouteEvent.java | 23 + .../protocol/PageWebStorageClearParams.java | 23 + .../protocol/PageWebStorageGetItemParams.java | 24 + .../protocol/PageWebStorageGetItemResult.java | 23 + .../protocol/PageWebStorageItemsParams.java | 23 + .../protocol/PageWebStorageItemsResult.java | 25 + .../PageWebStorageRemoveItemParams.java | 24 + .../protocol/PageWebStorageSetItemParams.java | 25 + .../impl/protocol/PageWorkerEvent.java | 23 + .../PlaywrightChannel.java} | 34 +- .../impl/protocol/PlaywrightInitializer.java | 27 + .../protocol/PlaywrightNewRequestParams.java | 55 ++ .../protocol/PlaywrightNewRequestResult.java | 23 + .../playwright/impl/protocol/Point.java | 24 + .../impl/protocol/RecordHarOptions.java | 29 + .../impl/protocol/RecorderSource.java | 37 + .../playwright/impl/protocol/Rect.java | 26 + .../playwright/impl/protocol/RemoteAddr.java | 24 + .../impl/{ => protocol}/RequestChannel.java | 44 +- .../impl/protocol/RequestInitializer.java | 33 + .../RequestRawRequestHeadersParams.java | 22 + .../RequestRawRequestHeadersResult.java | 25 + .../impl/protocol/RequestResponseParams.java | 22 + .../impl/protocol/RequestResponseResult.java | 23 + .../impl/protocol/RequestSizes.java | 26 + .../impl/protocol/ResourceTiming.java | 30 + .../impl/protocol/ResponseBodyParams.java | 22 + .../impl/protocol/ResponseBodyResult.java | 23 + .../impl/protocol/ResponseChannel.java | 75 ++ .../protocol/ResponseHttpVersionParams.java | 22 + .../protocol/ResponseHttpVersionResult.java | 23 + .../impl/protocol/ResponseInitializer.java | 31 + .../ResponseRawResponseHeadersParams.java | 22 + .../ResponseRawResponseHeadersResult.java | 25 + .../ResponseSecurityDetailsParams.java | 22 + .../ResponseSecurityDetailsResult.java | 23 + .../protocol/ResponseServerAddrParams.java | 22 + .../protocol/ResponseServerAddrResult.java | 23 + .../impl/protocol/ResponseSizesParams.java | 22 + .../impl/protocol/ResponseSizesResult.java | 23 + .../impl/{ => protocol}/RootChannel.java | 22 +- .../impl/protocol/RootInitializeParams.java | 24 + .../impl/protocol/RootInitializeResult.java | 23 + .../impl/protocol/RootInitializer.java | 22 + .../impl/protocol/RouteAbortParams.java | 23 + .../impl/{ => protocol}/RouteChannel.java | 46 +- .../impl/protocol/RouteContinueParams.java | 29 + .../impl/protocol/RouteFulfillParams.java | 29 + .../impl/protocol/RouteInitializer.java | 23 + .../RouteRedirectNavigationRequestParams.java | 23 + .../playwright/impl/protocol/SDKLanguage.java | 26 + .../impl/protocol/SecurityDetails.java | 27 + .../impl/protocol/SelectorEngine.java | 25 + .../impl/protocol/SerializedArgument.java | 26 + .../impl/protocol/SerializedError.java | 31 + .../impl/protocol/SerializedValue.java | 61 ++ .../impl/protocol/SetNetworkCookie.java | 33 + .../impl/protocol/SetOriginStorage.java | 28 + .../impl/protocol/SetVirtualCredential.java | 28 + .../playwright/impl/protocol/StackFrame.java | 26 + .../impl/{ => protocol}/StreamChannel.java | 28 +- .../impl/protocol/StreamCloseParams.java | 22 + .../impl/protocol/StreamInitializer.java | 22 + .../impl/protocol/StreamReadParams.java | 23 + .../impl/protocol/StreamReadResult.java | 23 + .../impl/protocol/TracingChannel.java | 67 ++ .../impl/protocol/TracingHarExportParams.java | 24 + .../impl/protocol/TracingHarExportResult.java | 26 + .../impl/protocol/TracingHarStartParams.java | 24 + .../impl/protocol/TracingHarStartResult.java | 23 + .../impl/protocol/TracingInitializer.java | 22 + .../TracingTracingGroupEndParams.java | 22 + .../protocol/TracingTracingGroupParams.java | 30 + .../TracingTracingStartChunkParams.java | 24 + .../TracingTracingStartChunkResult.java | 23 + .../protocol/TracingTracingStartParams.java | 29 + .../TracingTracingStopChunkParams.java | 23 + .../TracingTracingStopChunkResult.java | 26 + .../protocol/TracingTracingStopParams.java | 22 + .../playwright/impl/protocol/URLPattern.java | 30 + .../impl/protocol/VirtualCredential.java | 28 + .../playwright/impl/protocol/WaitInfo.java | 27 + .../impl/protocol/WebSocketChannel.java | 27 + .../impl/protocol/WebSocketCloseEvent.java | 22 + .../protocol/WebSocketFrameReceivedEvent.java | 24 + .../protocol/WebSocketFrameSentEvent.java | 24 + .../impl/protocol/WebSocketInitializer.java | 23 + .../impl/protocol/WebSocketOpenEvent.java | 22 + .../impl/protocol/WebSocketRouteChannel.java | 59 ++ .../WebSocketRouteClosePageEvent.java | 25 + .../WebSocketRouteClosePageParams.java | 25 + .../WebSocketRouteCloseServerEvent.java | 25 + .../WebSocketRouteCloseServerParams.java | 25 + .../protocol/WebSocketRouteConnectParams.java | 22 + .../WebSocketRouteEnsureOpenedParams.java | 22 + .../protocol/WebSocketRouteInitializer.java | 26 + .../WebSocketRouteMessageFromPageEvent.java | 24 + .../WebSocketRouteMessageFromServerEvent.java | 24 + .../WebSocketRouteSendToPageParams.java | 24 + .../WebSocketRouteSendToServerParams.java | 24 + .../protocol/WebSocketSocketErrorEvent.java | 23 + .../impl/protocol/WorkerChannel.java | 43 + .../impl/protocol/WorkerCloseEvent.java | 22 + .../impl/protocol/WorkerConsoleEvent.java | 35 + .../impl/protocol/WorkerDisconnectParams.java | 23 + .../WorkerEvaluateExpressionHandleParams.java | 25 + .../WorkerEvaluateExpressionHandleResult.java | 23 + .../WorkerEvaluateExpressionParams.java | 25 + .../WorkerEvaluateExpressionResult.java | 23 + .../impl/protocol/WorkerInitializer.java | 23 + .../WorkerUpdateSubscriptionParams.java | 24 + .../{ => protocol}/WritableStreamChannel.java | 24 +- .../protocol/WritableStreamCloseParams.java | 22 + .../protocol/WritableStreamInitializer.java | 22 + .../protocol/WritableStreamWriteParams.java | 23 + scripts/generate_java_channels.js | 132 +-- 636 files changed, 16025 insertions(+), 5553 deletions(-) delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java delete mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextAddCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextClearCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeAPIResponseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIResponse.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidElementInfo.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidSelector.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidWebView.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactCancelParams.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/ArtifactChannel.java (53%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactDeleteParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamResult.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/BindingCallChannel.java (61%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallRejectParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallResolveParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextBindingCallEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearPermissionsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockFastForwardParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockInstallParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockPauseAtParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockResumeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockRunForParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetFixedTimeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetSystemTimeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextConsoleEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsDeleteParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsInstallParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogClosedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeConsoleApiParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextGrantPermissionsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageErrorEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPauseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRecorderEventEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRegisterSelectorEngineParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFailedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFinishedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextResponseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRouteEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextServiceWorkerEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetExtraHTTPHeadersParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetGeolocationParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetHTTPCredentialsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetNetworkInterceptionPatternsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetOfflineParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetStorageStateParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetTestIdAttributeNameParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetWebSocketInterceptionPatternsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextShowRecorderParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStartRecordingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStopRecordingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextUpdateSubscriptionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextWebSocketRouteEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDisconnectFromReusedContextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserKillForTestsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartTracingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopServerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchResult.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/CDPSessionChannel.java (58%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionDetachParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionEventEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ClientSideCallMetadata.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ConsoleMessagesFilter.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHideHighlightParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHighlightParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInspectRequestedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerKillParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerPausedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerResumeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetModeRequestedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetRecorderModeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetReportStateChangedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSourceChangedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerStateChangedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerApiCallsUpdatedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerEnableParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerNextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerPausedStateChangedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRequestPauseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerResumeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRunToParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogAcceptParams.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/DialogChannel.java (65%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogDismissParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogInitializer.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/DisposableChannel.java (71%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableDisposeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleCheckParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleClickParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDblclickParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDispatchEventParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFillParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFocusParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleHoverParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandlePressParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScrollIntoViewIfNeededParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectTextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSetInputFilesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTapParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTypeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleUncheckParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForElementStateParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ExpectedTextValue.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FormField.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameBlurParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameCheckParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameClickParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDblclickParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDispatchEventParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDragAndDropParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDropParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectErrorDetails.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFillParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFocusParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHideHighlightParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHighlightParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHoverParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameLoadstateEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameNavigatedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FramePressParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetContentParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetInputFilesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTapParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTypeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameUncheckParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForTimeoutParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/HttpCredentials.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/IndexedDBDatabase.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleDisposeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandlePreviewUpdatedEvent.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/JsonPipeChannel.java (61%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeClosedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeMessageEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeSendParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LifecycleEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAddStackToTracingNoReplyParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarUnzipParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTraceDiscardedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsZipParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/Metadata.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/NameValue.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/NetworkCookie.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/OPFSEntry.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/OriginStorage.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBindingCallEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBringToFrontParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCancelPickLocatorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearConsoleMessagesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearPageErrorsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCrashEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageDownloadEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageEmulateMediaParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotErrorDetails.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFileChooserEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameAttachedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameDetachedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageHideHighlightParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardDownParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardInsertTextParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardPressParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardTypeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardUpParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageLocatorHandlerTriggeredEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseClickParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseDownParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseMoveParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseUpParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseWheelParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestGCParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageResolveLocatorHandlerNoReplyParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRouteEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRunBeforeUnloadParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastChapterParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameAckParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastHideActionsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastRemoveOverlayParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastSetOverlayVisibleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowActionsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStopParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetDockTileParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetExtraHTTPHeadersParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetNetworkInterceptionPatternsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetViewportSizeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetWebSocketInterceptionPatternsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartCSSCoverageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartJSCoverageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageTouchscreenTapParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUnregisterLocatorHandlerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUpdateSubscriptionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageViewportSizeChangedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketRouteEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageClearParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageRemoveItemParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageSetItemParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWorkerEvent.java rename playwright/src/main/java/com/microsoft/playwright/impl/{WebSocketChannel.java => protocol/PlaywrightChannel.java} (62%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/Point.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecordHarOptions.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecorderSource.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/Rect.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RemoteAddr.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/RequestChannel.java (54%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestSizes.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResourceTiming.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesResult.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/RootChannel.java (67%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteAbortParams.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/RouteChannel.java (52%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteContinueParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteFulfillParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteRedirectNavigationRequestParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SDKLanguage.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SecurityDetails.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SelectorEngine.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedArgument.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedError.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedValue.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetNetworkCookie.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetOriginStorage.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetVirtualCredential.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/StackFrame.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/StreamChannel.java (67%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupEndParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/URLPattern.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/VirtualCredential.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WaitInfo.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameReceivedEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameSentEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketOpenEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteConnectParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteEnsureOpenedParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromPageEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromServerEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToPageParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToServerParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketSocketErrorEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerChannel.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerCloseEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerConsoleEvent.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerDisconnectParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionResult.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerUpdateSubscriptionParams.java rename playwright/src/main/java/com/microsoft/playwright/impl/{ => protocol}/WritableStreamChannel.java (66%) create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamCloseParams.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamInitializer.java create mode 100644 playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamWriteParams.java diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java deleted file mode 100644 index 9e36463fd..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextChannel.java +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class APIRequestContextChannel { - private final ChannelOwner owner; - - APIRequestContextChannel(ChannelOwner owner) { - this.owner = owner; - } - - APIRequestContextFetchResult fetch(APIRequestContextFetchParams params, Double timeout) { - return owner.sendMessage("fetch", params, APIRequestContextFetchResult.class, timeout); - } - - APIRequestContextFetchResponseBodyResult fetchResponseBody(APIRequestContextFetchResponseBodyParams params, Double timeout) { - return owner.sendMessage("fetchResponseBody", params, APIRequestContextFetchResponseBodyResult.class, timeout); - } - - APIRequestContextFetchLogResult fetchLog(APIRequestContextFetchLogParams params, Double timeout) { - return owner.sendMessage("fetchLog", params, APIRequestContextFetchLogResult.class, timeout); - } - - void addCookies(APIRequestContextAddCookiesParams params, Double timeout) { - owner.sendMessage("addCookies", params, timeout); - } - - void clearCookies(APIRequestContextClearCookiesParams params, Double timeout) { - owner.sendMessage("clearCookies", params, timeout); - } - - APIRequestContextCookiesResult cookies(APIRequestContextCookiesParams params, Double timeout) { - return owner.sendMessage("cookies", params, APIRequestContextCookiesResult.class, timeout); - } - - APIRequestContextStorageStateResult storageState(APIRequestContextStorageStateParams params, Double timeout) { - return owner.sendMessage("storageState", params, APIRequestContextStorageStateResult.class, timeout); - } - - void disposeAPIResponse(APIRequestContextDisposeAPIResponseParams params, Double timeout) { - owner.sendMessage("disposeAPIResponse", params, timeout); - } - - void dispose(APIRequestContextDisposeParams params, Double timeout) { - owner.sendMessage("dispose", params, timeout); - } -} - -class APIRequestContextInitializer { - TracingImpl tracing; -} - -class APIRequestContextFetchParams { - String url; - String encodedParams; - List params; - String method; - List headers; - byte[] postData; - String jsonData; - List formData; - List multipartData; - Boolean failOnStatusCode; - Boolean ignoreHTTPSErrors; - Integer maxRedirects; - Integer maxRetries; -} - -class APIRequestContextFetchResult { - ProtocolAPIResponse response; -} - -class APIRequestContextFetchResponseBodyParams { - String fetchUid; -} - -class APIRequestContextFetchResponseBodyResult { - byte[] binary; -} - -class APIRequestContextFetchLogParams { - String fetchUid; -} - -class APIRequestContextFetchLogResult { - List log; -} - -class APIRequestContextAddCookiesParams { - List cookies; -} - -class APIRequestContextClearCookiesParams { - String name; - String nameRegexSource; - String nameRegexFlags; - String domain; - String domainRegexSource; - String domainRegexFlags; - String path; - String pathRegexSource; - String pathRegexFlags; -} - -class APIRequestContextCookiesParams { - List urls; -} - -class APIRequestContextCookiesResult { - List cookies; -} - -class APIRequestContextStorageStateParams { - Boolean indexedDB; - Boolean opfs; -} - -class APIRequestContextStorageStateResult { - List cookies; - List origins; -} - -class APIRequestContextDisposeAPIResponseParams { - String fetchUid; -} - -class APIRequestContextDisposeParams { - String reason; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java index c4d5ec881..9bb969126 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestContextImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.*; import com.google.gson.reflect.TypeToken; import com.microsoft.playwright.APIRequestContext; @@ -41,7 +42,7 @@ import static com.microsoft.playwright.impl.Utils.toProtocol; import static java.util.Arrays.asList; -class APIRequestContextImpl extends ChannelOwner implements APIRequestContext { +public class APIRequestContextImpl extends ChannelOwner implements APIRequestContext { private final TracingImpl tracing; private String disposeReason; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java index b5b08e1af..3122ba2bb 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIRequestImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; @@ -98,7 +99,7 @@ public APIRequestContextImpl newContext(NewContextOptions options) { list.add(credentials); } if (list.size() > 0) { - params.httpCredentials = gson().fromJson(list, new TypeToken>() {}.getType()); + params.httpCredentials = gson().fromJson(list, new TypeToken>() {}.getType()); } } APIRequestContextImpl context = playwright.channel.newRequest(params, NO_TIMEOUT).request; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseAssertionsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseAssertionsImpl.java index 67d7dfc57..e3ad8aa0a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseAssertionsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseAssertionsImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.APIResponse; import com.microsoft.playwright.assertions.APIResponseAssertions; import org.opentest4j.AssertionFailedError; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java index 71e6cdf7c..904f6147b 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/APIResponseImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; @@ -39,10 +40,10 @@ class APIResponseImpl implements APIResponse { final APIRequestContextImpl context; - private final ProtocolAPIResponse response; + private final com.microsoft.playwright.impl.protocol.APIResponse response; private final RawHeaders headers; - APIResponseImpl(APIRequestContextImpl apiRequestContext, ProtocolAPIResponse response) { + APIResponseImpl(APIRequestContextImpl apiRequestContext, com.microsoft.playwright.impl.protocol.APIResponse response) { context = apiRequestContext; this.response = response; List headerList = new ArrayList<>(); @@ -98,7 +99,7 @@ public boolean ok() { @Override public SecurityDetails securityDetails() { - ProtocolSecurityDetails d = response.securityDetails; + com.microsoft.playwright.impl.protocol.SecurityDetails d = response.securityDetails; if (d == null) { return null; } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java index 23d9ba871..03ea75ca3 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; @@ -27,7 +28,7 @@ import static com.microsoft.playwright.impl.Utils.writeToFile; -class ArtifactImpl extends ChannelOwner { +public class ArtifactImpl extends ChannelOwner { final ArtifactChannel channel = new ArtifactChannel(this); public ArtifactImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/AssertionsBase.java b/playwright/src/main/java/com/microsoft/playwright/impl/AssertionsBase.java index 5e9a6520b..dd2cc0968 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/AssertionsBase.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/AssertionsBase.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import org.opentest4j.AssertionFailedError; import org.opentest4j.ValueWrapper; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java index 683eb7a3e..a74c8d91c 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BindingCall.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.BrowserContext; @@ -29,7 +30,7 @@ import static com.microsoft.playwright.impl.Serialization.*; -class BindingCall extends ChannelOwner { +public class BindingCall extends ChannelOwner { private static class SourceImpl implements BindingCallback.Source { private final Frame frame; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java deleted file mode 100644 index 12951a4a2..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextChannel.java +++ /dev/null @@ -1,641 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class BrowserContextChannel { - private final ChannelOwner owner; - - BrowserContextChannel(ChannelOwner owner) { - this.owner = owner; - } - - void addCookies(BrowserContextAddCookiesParams params, Double timeout) { - owner.sendMessage("addCookies", params, timeout); - } - - BrowserContextAddInitScriptResult addInitScript(BrowserContextAddInitScriptParams params, Double timeout) { - return owner.sendMessage("addInitScript", params, BrowserContextAddInitScriptResult.class, timeout); - } - - void clearCookies(BrowserContextClearCookiesParams params, Double timeout) { - owner.sendMessage("clearCookies", params, timeout); - } - - void clearPermissions(BrowserContextClearPermissionsParams params, Double timeout) { - owner.sendMessage("clearPermissions", params, timeout); - } - - void clearPermissions(Double timeout) { - clearPermissions(new BrowserContextClearPermissionsParams(), timeout); - } - - void close(BrowserContextCloseParams params, Double timeout) { - owner.sendMessage("close", params, timeout); - } - - BrowserContextCookiesResult cookies(BrowserContextCookiesParams params, Double timeout) { - return owner.sendMessage("cookies", params, BrowserContextCookiesResult.class, timeout); - } - - BrowserContextExposeBindingResult exposeBinding(BrowserContextExposeBindingParams params, Double timeout) { - return owner.sendMessage("exposeBinding", params, BrowserContextExposeBindingResult.class, timeout); - } - - void grantPermissions(BrowserContextGrantPermissionsParams params, Double timeout) { - owner.sendMessage("grantPermissions", params, timeout); - } - - BrowserContextNewPageResult newPage(BrowserContextNewPageParams params, Double timeout) { - return owner.sendMessage("newPage", params, BrowserContextNewPageResult.class, timeout); - } - - BrowserContextNewPageResult newPage(Double timeout) { - return newPage(new BrowserContextNewPageParams(), timeout); - } - - void registerSelectorEngine(BrowserContextRegisterSelectorEngineParams params, Double timeout) { - owner.sendMessage("registerSelectorEngine", params, timeout); - } - - void setTestIdAttributeName(BrowserContextSetTestIdAttributeNameParams params, Double timeout) { - owner.sendMessage("setTestIdAttributeName", params, timeout); - } - - void setExtraHTTPHeaders(BrowserContextSetExtraHTTPHeadersParams params, Double timeout) { - owner.sendMessage("setExtraHTTPHeaders", params, timeout); - } - - void setGeolocation(BrowserContextSetGeolocationParams params, Double timeout) { - owner.sendMessage("setGeolocation", params, timeout); - } - - void setHTTPCredentials(BrowserContextSetHTTPCredentialsParams params, Double timeout) { - owner.sendMessage("setHTTPCredentials", params, timeout); - } - - void setNetworkInterceptionPatterns(BrowserContextSetNetworkInterceptionPatternsParams params, Double timeout) { - owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); - } - - void setWebSocketInterceptionPatterns(BrowserContextSetWebSocketInterceptionPatternsParams params, Double timeout) { - owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); - } - - void setOffline(BrowserContextSetOfflineParams params, Double timeout) { - owner.sendMessage("setOffline", params, timeout); - } - - BrowserContextStorageStateResult storageState(BrowserContextStorageStateParams params, Double timeout) { - return owner.sendMessage("storageState", params, BrowserContextStorageStateResult.class, timeout); - } - - void setStorageState(BrowserContextSetStorageStateParams params, Double timeout) { - owner.sendMessage("setStorageState", params, timeout); - } - - void pause(BrowserContextPauseParams params, Double timeout) { - owner.sendMessage("pause", params, timeout); - } - - void pause(Double timeout) { - pause(new BrowserContextPauseParams(), timeout); - } - - void showRecorder(BrowserContextShowRecorderParams params, Double timeout) { - owner.sendMessage("showRecorder", params, timeout); - } - - void startRecording(BrowserContextStartRecordingParams params, Double timeout) { - owner.sendMessage("startRecording", params, timeout); - } - - void stopRecording(BrowserContextStopRecordingParams params, Double timeout) { - owner.sendMessage("stopRecording", params, timeout); - } - - void stopRecording(Double timeout) { - stopRecording(new BrowserContextStopRecordingParams(), timeout); - } - - void exposeConsoleApi(BrowserContextExposeConsoleApiParams params, Double timeout) { - owner.sendMessage("exposeConsoleApi", params, timeout); - } - - void exposeConsoleApi(Double timeout) { - exposeConsoleApi(new BrowserContextExposeConsoleApiParams(), timeout); - } - - BrowserContextNewCDPSessionResult newCDPSession(BrowserContextNewCDPSessionParams params, Double timeout) { - return owner.sendMessage("newCDPSession", params, BrowserContextNewCDPSessionResult.class, timeout); - } - - BrowserContextCreateTempFilesResult createTempFiles(BrowserContextCreateTempFilesParams params, Double timeout) { - return owner.sendMessage("createTempFiles", params, BrowserContextCreateTempFilesResult.class, timeout); - } - - void updateSubscription(BrowserContextUpdateSubscriptionParams params, Double timeout) { - owner.sendMessage("updateSubscription", params, timeout); - } - - void clockFastForward(BrowserContextClockFastForwardParams params, Double timeout) { - owner.sendMessage("clockFastForward", params, timeout); - } - - void clockInstall(BrowserContextClockInstallParams params, Double timeout) { - owner.sendMessage("clockInstall", params, timeout); - } - - void clockPauseAt(BrowserContextClockPauseAtParams params, Double timeout) { - owner.sendMessage("clockPauseAt", params, timeout); - } - - void clockResume(BrowserContextClockResumeParams params, Double timeout) { - owner.sendMessage("clockResume", params, timeout); - } - - void clockResume(Double timeout) { - clockResume(new BrowserContextClockResumeParams(), timeout); - } - - void clockRunFor(BrowserContextClockRunForParams params, Double timeout) { - owner.sendMessage("clockRunFor", params, timeout); - } - - void clockSetFixedTime(BrowserContextClockSetFixedTimeParams params, Double timeout) { - owner.sendMessage("clockSetFixedTime", params, timeout); - } - - void clockSetSystemTime(BrowserContextClockSetSystemTimeParams params, Double timeout) { - owner.sendMessage("clockSetSystemTime", params, timeout); - } - - void credentialsInstall(BrowserContextCredentialsInstallParams params, Double timeout) { - owner.sendMessage("credentialsInstall", params, timeout); - } - - void credentialsInstall(Double timeout) { - credentialsInstall(new BrowserContextCredentialsInstallParams(), timeout); - } - - BrowserContextCredentialsCreateResult credentialsCreate(BrowserContextCredentialsCreateParams params, Double timeout) { - return owner.sendMessage("credentialsCreate", params, BrowserContextCredentialsCreateResult.class, timeout); - } - - BrowserContextCredentialsGetResult credentialsGet(BrowserContextCredentialsGetParams params, Double timeout) { - return owner.sendMessage("credentialsGet", params, BrowserContextCredentialsGetResult.class, timeout); - } - - void credentialsDelete(BrowserContextCredentialsDeleteParams params, Double timeout) { - owner.sendMessage("credentialsDelete", params, timeout); - } -} - -class BrowserContextInitializer { - DebuggerImpl debugger; - APIRequestContextImpl requestContext; - TracingImpl tracing; - BrowserContextInitializerOptions options; - - static class BrowserContextInitializerOptions { - Boolean noDefaultViewport; - BrowserContextInitializerOptionsViewport viewport; - BrowserContextInitializerOptionsScreen screen; - Boolean ignoreHTTPSErrors; - List clientCertificates; - Boolean javaScriptEnabled; - Boolean bypassCSP; - String userAgent; - String locale; - String timezoneId; - BrowserContextInitializerOptionsGeolocation geolocation; - List permissions; - List extraHTTPHeaders; - Boolean offline; - List httpCredentials; - Double deviceScaleFactor; - Boolean isMobile; - Boolean hasTouch; - String colorScheme; - String reducedMotion; - String forcedColors; - String acceptDownloads; - String contrast; - String baseURL; - BrowserContextInitializerOptionsRecordVideo recordVideo; - Boolean strictSelectors; - String serviceWorkers; - List selectorEngines; - String testIdAttributeName; - - static class BrowserContextInitializerOptionsViewport { - Integer width; - Integer height; - } - - static class BrowserContextInitializerOptionsScreen { - Integer width; - Integer height; - } - - static class BrowserContextInitializerOptionsClientCertificates { - String origin; - byte[] cert; - byte[] key; - String passphrase; - byte[] pfx; - } - - static class BrowserContextInitializerOptionsGeolocation { - Double longitude; - Double latitude; - Double accuracy; - } - - static class BrowserContextInitializerOptionsRecordVideo { - String dir; - BrowserContextInitializerOptionsRecordVideoSize size; - Integer fps; - BrowserContextInitializerOptionsRecordVideoShowActions showActions; - - static class BrowserContextInitializerOptionsRecordVideoSize { - Integer width; - Integer height; - } - - static class BrowserContextInitializerOptionsRecordVideoShowActions { - Double duration; - String position; - Integer fontSize; - String cursor; - BrowserContextInitializerOptionsRecordVideoShowActionsStyle style; - - static class BrowserContextInitializerOptionsRecordVideoShowActionsStyle { - String point; - String highlight; - String title; - } - } - } - } -} - -class BrowserContextAddCookiesParams { - List cookies; -} - -class BrowserContextAddInitScriptParams { - String source; -} - -class BrowserContextAddInitScriptResult { - DisposableObject disposable; -} - -class BrowserContextClearCookiesParams { - String name; - String nameRegexSource; - String nameRegexFlags; - String domain; - String domainRegexSource; - String domainRegexFlags; - String path; - String pathRegexSource; - String pathRegexFlags; -} - -class BrowserContextClearPermissionsParams { -} - -class BrowserContextCloseParams { - String reason; -} - -class BrowserContextCookiesParams { - List urls; -} - -class BrowserContextCookiesResult { - List cookies; -} - -class BrowserContextExposeBindingParams { - String name; - Boolean noGlobal; -} - -class BrowserContextExposeBindingResult { - DisposableObject disposable; -} - -class BrowserContextGrantPermissionsParams { - List permissions; - String origin; -} - -class BrowserContextNewPageParams { -} - -class BrowserContextNewPageResult { - PageImpl page; -} - -class BrowserContextRegisterSelectorEngineParams { - SelectorEngine selectorEngine; -} - -class BrowserContextSetTestIdAttributeNameParams { - String testIdAttributeName; -} - -class BrowserContextSetExtraHTTPHeadersParams { - List headers; -} - -class BrowserContextSetGeolocationParams { - BrowserContextSetGeolocationParamsGeolocation geolocation; - - static class BrowserContextSetGeolocationParamsGeolocation { - Double longitude; - Double latitude; - Double accuracy; - } -} - -class BrowserContextSetHTTPCredentialsParams { - List httpCredentials; -} - -class BrowserContextSetNetworkInterceptionPatternsParams { - List patterns; - - static class BrowserContextSetNetworkInterceptionPatternsParamsPatterns { - String glob; - String regexSource; - String regexFlags; - URLPattern urlPattern; - } -} - -class BrowserContextSetWebSocketInterceptionPatternsParams { - List patterns; - - static class BrowserContextSetWebSocketInterceptionPatternsParamsPatterns { - String glob; - String regexSource; - String regexFlags; - URLPattern urlPattern; - } -} - -class BrowserContextSetOfflineParams { - Boolean offline; -} - -class BrowserContextStorageStateParams { - Boolean indexedDB; - Boolean opfs; - Boolean credentials; -} - -class BrowserContextStorageStateResult { - List cookies; - List origins; - List credentials; -} - -class BrowserContextSetStorageStateParams { - BrowserContextSetStorageStateParamsStorageState storageState; - - static class BrowserContextSetStorageStateParamsStorageState { - List cookies; - List origins; - List credentials; - } -} - -class BrowserContextPauseParams { -} - -class BrowserContextShowRecorderParams { - String language; - String mode; - Boolean pauseOnNextStatement; - String testIdAttributeName; - JsonElement launchOptions; - JsonElement contextOptions; - String device; - String saveStorage; - String outputFile; - Boolean handleSIGINT; - Boolean omitCallTracking; -} - -class BrowserContextStartRecordingParams { - String language; -} - -class BrowserContextStopRecordingParams { -} - -class BrowserContextExposeConsoleApiParams { -} - -class BrowserContextNewCDPSessionParams { - PageImpl page; - FrameImpl frame; -} - -class BrowserContextNewCDPSessionResult { - CDPSessionImpl session; -} - -class BrowserContextCreateTempFilesParams { - String rootDirName; - List items; - - static class BrowserContextCreateTempFilesParamsItems { - String name; - Double lastModifiedMs; - } -} - -class BrowserContextCreateTempFilesResult { - WritableStream rootDir; - List writableStreams; -} - -class BrowserContextUpdateSubscriptionParams { - String event; - Boolean enabled; -} - -class BrowserContextClockFastForwardParams { - Double ticksNumber; - String ticksString; -} - -class BrowserContextClockInstallParams { - Double timeNumber; - String timeString; -} - -class BrowserContextClockPauseAtParams { - Double timeNumber; - String timeString; -} - -class BrowserContextClockResumeParams { -} - -class BrowserContextClockRunForParams { - Double ticksNumber; - String ticksString; -} - -class BrowserContextClockSetFixedTimeParams { - Double timeNumber; - String timeString; -} - -class BrowserContextClockSetSystemTimeParams { - Double timeNumber; - String timeString; -} - -class BrowserContextCredentialsInstallParams { -} - -class BrowserContextCredentialsCreateParams { - String rpId; - String id; - String userHandle; - String privateKey; - String publicKey; - Integer signCount; -} - -class BrowserContextCredentialsCreateResult { - ProtocolVirtualCredential credential; -} - -class BrowserContextCredentialsGetParams { - String rpId; - String id; -} - -class BrowserContextCredentialsGetResult { - List credentials; -} - -class BrowserContextCredentialsDeleteParams { - String id; -} - -class BrowserContextBindingCallEvent { - BindingCall binding; -} - -class BrowserContextConsoleEvent { - String type; - String text; - List args; - BrowserContextConsoleEventLocation location; - Double timestamp; - PageImpl page; - WorkerImpl worker; - - static class BrowserContextConsoleEventLocation { - String url; - Integer lineNumber; - Integer columnNumber; - } -} - -class BrowserContextCloseEvent { -} - -class BrowserContextDialogEvent { - DialogImpl dialog; -} - -class BrowserContextDialogClosedEvent { - DialogImpl dialog; -} - -class BrowserContextPageEvent { - PageImpl page; -} - -class BrowserContextPageErrorEvent { - SerializedError error; - PageImpl page; - BrowserContextPageErrorEventLocation location; - - static class BrowserContextPageErrorEventLocation { - String url; - Integer line; - Integer column; - } -} - -class BrowserContextRouteEvent { - RouteImpl route; -} - -class BrowserContextWebSocketRouteEvent { - WebSocketRouteImpl webSocketRoute; -} - -class BrowserContextServiceWorkerEvent { - WorkerImpl worker; -} - -class BrowserContextRequestEvent { - RequestImpl request; - PageImpl page; -} - -class BrowserContextRequestFailedEvent { - RequestImpl request; - String failureText; - Double responseEndTiming; - PageImpl page; -} - -class BrowserContextRequestFinishedEvent { - RequestImpl request; - ResponseImpl response; - Double responseEndTiming; - PageImpl page; -} - -class BrowserContextResponseEvent { - ResponseImpl response; - PageImpl page; -} - -class BrowserContextRecorderEventEvent { - String event; - JsonElement data; - PageImpl page; - String code; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java index a3aec4965..41e77105d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserContextImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -41,7 +42,7 @@ import static java.nio.file.Files.readAllBytes; import static java.util.Arrays.asList; -class BrowserContextImpl extends ChannelOwner implements BrowserContext { +public class BrowserContextImpl extends ChannelOwner implements BrowserContext { protected BrowserImpl browser; private final TracingImpl tracing; private final DebuggerImpl debugger; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java index 6f24d0333..cc0dccf18 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -35,7 +36,7 @@ import static com.microsoft.playwright.impl.Serialization.gson; import static com.microsoft.playwright.impl.Utils.*; -class BrowserImpl extends ChannelOwner implements Browser { +public class BrowserImpl extends ChannelOwner implements Browser { // Insertion order, so that browser.contexts() lists the contexts in creation order like the other clients. final Set contexts = new LinkedHashSet<>(); private final ListenerCollection listeners = new ListenerCollection<>(); @@ -51,7 +52,7 @@ enum EventType { DISCONNECTED, } - final ProtocolBrowserChannel channel = new ProtocolBrowserChannel(this); + final BrowserChannel channel = new BrowserChannel(this); BrowserImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); @@ -257,7 +258,7 @@ public byte[] stopTracing() { // The protocol takes a list of http credentials, the option is a single value or a list. @SuppressWarnings("unchecked") - static List httpCredentialsToProtocol(Object httpCredentials) { + static List httpCredentialsToProtocol(Object httpCredentials) { if (httpCredentials == null) { return null; } @@ -270,9 +271,9 @@ static List httpCredentialsToProtocol(Object httpCreden if (list.isEmpty()) { return null; } - List result = new ArrayList<>(); + List result = new ArrayList<>(); for (HttpCredentials credentials : list) { - ProtocolHttpCredentials c = new ProtocolHttpCredentials(); + com.microsoft.playwright.impl.protocol.HttpCredentials c = new com.microsoft.playwright.impl.protocol.HttpCredentials(); c.username = credentials.username; c.password = credentials.password; c.origin = credentials.origin; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java deleted file mode 100644 index 4d0680dfb..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeChannel.java +++ /dev/null @@ -1,220 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class BrowserTypeChannel { - private final ChannelOwner owner; - - BrowserTypeChannel(ChannelOwner owner) { - this.owner = owner; - } - - BrowserTypeLaunchResult launch(BrowserTypeLaunchParams params, Double timeout) { - return owner.sendMessage("launch", params, BrowserTypeLaunchResult.class, timeout); - } - - BrowserTypeLaunchPersistentContextResult launchPersistentContext(BrowserTypeLaunchPersistentContextParams params, Double timeout) { - return owner.sendMessage("launchPersistentContext", params, BrowserTypeLaunchPersistentContextResult.class, timeout); - } - - BrowserTypeConnectOverCDPResult connectOverCDP(BrowserTypeConnectOverCDPParams params, Double timeout) { - return owner.sendMessage("connectOverCDP", params, BrowserTypeConnectOverCDPResult.class, timeout); - } - - BrowserTypeConnectToWorkerResult connectToWorker(BrowserTypeConnectToWorkerParams params, Double timeout) { - return owner.sendMessage("connectToWorker", params, BrowserTypeConnectToWorkerResult.class, timeout); - } -} - -class BrowserTypeInitializer { - String executablePath; - String name; -} - -class BrowserTypeLaunchParams { - String channel; - String executablePath; - List args; - Boolean ignoreAllDefaultArgs; - List ignoreDefaultArgs; - Boolean handleSIGINT; - Boolean handleSIGTERM; - Boolean handleSIGHUP; - List env; - Boolean headless; - BrowserTypeLaunchParamsProxy proxy; - String downloadsPath; - String tracesDir; - String artifactsDir; - Boolean chromiumSandbox; - JsonElement firefoxUserPrefs; - Integer cdpPort; - Double slowMo; - - static class BrowserTypeLaunchParamsProxy { - String server; - String bypass; - String username; - String password; - } -} - -class BrowserTypeLaunchResult { - BrowserImpl browser; -} - -class BrowserTypeLaunchPersistentContextParams { - String channel; - String executablePath; - List args; - Boolean ignoreAllDefaultArgs; - List ignoreDefaultArgs; - Boolean handleSIGINT; - Boolean handleSIGTERM; - Boolean handleSIGHUP; - List env; - Boolean headless; - BrowserTypeLaunchPersistentContextParamsProxy proxy; - String downloadsPath; - String tracesDir; - String artifactsDir; - Boolean chromiumSandbox; - JsonElement firefoxUserPrefs; - Integer cdpPort; - Boolean noDefaultViewport; - BrowserTypeLaunchPersistentContextParamsViewport viewport; - BrowserTypeLaunchPersistentContextParamsScreen screen; - Boolean ignoreHTTPSErrors; - List clientCertificates; - Boolean javaScriptEnabled; - Boolean bypassCSP; - String userAgent; - String locale; - String timezoneId; - BrowserTypeLaunchPersistentContextParamsGeolocation geolocation; - List permissions; - List extraHTTPHeaders; - Boolean offline; - List httpCredentials; - Double deviceScaleFactor; - Boolean isMobile; - Boolean hasTouch; - String colorScheme; - String reducedMotion; - String forcedColors; - String acceptDownloads; - String contrast; - String baseURL; - BrowserTypeLaunchPersistentContextParamsRecordVideo recordVideo; - Boolean strictSelectors; - String serviceWorkers; - List selectorEngines; - String testIdAttributeName; - String userDataDir; - Double slowMo; - - static class BrowserTypeLaunchPersistentContextParamsProxy { - String server; - String bypass; - String username; - String password; - } - - static class BrowserTypeLaunchPersistentContextParamsViewport { - Integer width; - Integer height; - } - - static class BrowserTypeLaunchPersistentContextParamsScreen { - Integer width; - Integer height; - } - - static class BrowserTypeLaunchPersistentContextParamsClientCertificates { - String origin; - byte[] cert; - byte[] key; - String passphrase; - byte[] pfx; - } - - static class BrowserTypeLaunchPersistentContextParamsGeolocation { - Double longitude; - Double latitude; - Double accuracy; - } - - static class BrowserTypeLaunchPersistentContextParamsRecordVideo { - String dir; - BrowserTypeLaunchPersistentContextParamsRecordVideoSize size; - Integer fps; - BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions showActions; - - static class BrowserTypeLaunchPersistentContextParamsRecordVideoSize { - Integer width; - Integer height; - } - - static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions { - Double duration; - String position; - Integer fontSize; - String cursor; - BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle style; - - static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle { - String point; - String highlight; - String title; - } - } - } -} - -class BrowserTypeLaunchPersistentContextResult { - BrowserImpl browser; - BrowserContextImpl context; -} - -class BrowserTypeConnectOverCDPParams { - String endpointURL; - List headers; - Double slowMo; - Boolean isLocal; - Boolean noDefaults; - Boolean isWebView; - String artifactsDir; - byte[] transport; -} - -class BrowserTypeConnectOverCDPResult { - BrowserImpl browser; - BrowserContextImpl defaultContext; -} - -class BrowserTypeConnectToWorkerParams { - String endpoint; -} - -class BrowserTypeConnectToWorkerResult { - WorkerImpl worker; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java index be77c8cee..5ea7b91ab 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/BrowserTypeImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.Gson; import com.google.gson.JsonObject; import com.microsoft.playwright.Browser; @@ -35,7 +36,7 @@ import static com.microsoft.playwright.impl.Utils.convertType; import static com.microsoft.playwright.impl.Utils.toProtocol; -class BrowserTypeImpl extends ChannelOwner implements BrowserType { +public class BrowserTypeImpl extends ChannelOwner implements BrowserType { protected PlaywrightImpl playwright; final BrowserTypeChannel channel = new BrowserTypeChannel(this); diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java index 92f510a7f..6f28c69be 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.CDPSession; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java index 5ee609363..0cdff1555 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java @@ -26,7 +26,7 @@ import java.util.function.Function; import java.util.function.Supplier; -class ChannelOwner extends LoggingSupport { +public class ChannelOwner extends LoggingSupport { final Connection connection; private ChannelOwner parent; private final Map objects = new HashMap<>(); @@ -167,7 +167,7 @@ JsonElement sendMessage(String method, JsonObject params, Double timeout) { * {@code resultClass}. {@code null} params mean an empty object, {@code null} or {@code Void.class} * result class discards the reply. */ - R sendMessage(String method, Object params, Class resultClass, Double timeout) { + public R sendMessage(String method, Object params, Class resultClass, Double timeout) { JsonObject paramsJson = params == null ? new JsonObject() : connection.protocolGson().toJsonTree(params).getAsJsonObject(); JsonElement result = sendMessage(method, paramsJson, timeout); if (resultClass == null || resultClass == Void.class || result == null || result.isJsonNull()) { @@ -176,7 +176,7 @@ R sendMessage(String method, Object params, Class resultClass, Double tim return connection.protocolGson().fromJson(result, resultClass); } - void sendMessage(String method, Object params, Double timeout) { + public void sendMessage(String method, Object params, Double timeout) { sendMessage(method, params, Void.class, timeout); } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java index 9f4c4a545..08773c758 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java @@ -1,5 +1,6 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Clock; import java.util.Date; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index 4be7f5cd4..41d1ff6f3 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java @@ -15,6 +15,7 @@ */ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.Gson; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java index 058c58f22..6b2e0e400 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.ConsoleMessage; import com.microsoft.playwright.JSHandle; import com.microsoft.playwright.Worker; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java index e9029d2a1..cae934527 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Credentials; import com.microsoft.playwright.options.VirtualCredential; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java deleted file mode 100644 index 35706cdd4..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DebugControllerChannel.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class DebugControllerChannel { - private final ChannelOwner owner; - - DebugControllerChannel(ChannelOwner owner) { - this.owner = owner; - } - - void initialize(DebugControllerInitializeParams params, Double timeout) { - owner.sendMessage("initialize", params, timeout); - } - - void setReportStateChanged(DebugControllerSetReportStateChangedParams params, Double timeout) { - owner.sendMessage("setReportStateChanged", params, timeout); - } - - void setRecorderMode(DebugControllerSetRecorderModeParams params, Double timeout) { - owner.sendMessage("setRecorderMode", params, timeout); - } - - void highlight(DebugControllerHighlightParams params, Double timeout) { - owner.sendMessage("highlight", params, timeout); - } - - void hideHighlight(DebugControllerHideHighlightParams params, Double timeout) { - owner.sendMessage("hideHighlight", params, timeout); - } - - void hideHighlight(Double timeout) { - hideHighlight(new DebugControllerHideHighlightParams(), timeout); - } - - void resume(DebugControllerResumeParams params, Double timeout) { - owner.sendMessage("resume", params, timeout); - } - - void resume(Double timeout) { - resume(new DebugControllerResumeParams(), timeout); - } - - void kill(DebugControllerKillParams params, Double timeout) { - owner.sendMessage("kill", params, timeout); - } - - void kill(Double timeout) { - kill(new DebugControllerKillParams(), timeout); - } -} - -class DebugControllerInitializer { -} - -class DebugControllerInitializeParams { - String codegenId; - String sdkLanguage; -} - -class DebugControllerSetReportStateChangedParams { - Boolean enabled; -} - -class DebugControllerSetRecorderModeParams { - String mode; - String testIdAttributeName; - Boolean generateAutoExpect; -} - -class DebugControllerHighlightParams { - String selector; - String ariaTemplate; -} - -class DebugControllerHideHighlightParams { -} - -class DebugControllerResumeParams { -} - -class DebugControllerKillParams { -} - -class DebugControllerInspectRequestedEvent { - String selector; - String locator; - String ariaSnapshot; -} - -class DebugControllerSetModeRequestedEvent { - String mode; -} - -class DebugControllerStateChangedEvent { - Integer pageCount; -} - -class DebugControllerSourceChangedEvent { - String text; - String header; - String footer; - List actions; -} - -class DebugControllerPausedEvent { - Boolean paused; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java deleted file mode 100644 index e19d97da0..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerChannel.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class DebuggerChannel { - private final ChannelOwner owner; - - DebuggerChannel(ChannelOwner owner) { - this.owner = owner; - } - - void requestPause(DebuggerRequestPauseParams params, Double timeout) { - owner.sendMessage("requestPause", params, timeout); - } - - void requestPause(Double timeout) { - requestPause(new DebuggerRequestPauseParams(), timeout); - } - - void resume(DebuggerResumeParams params, Double timeout) { - owner.sendMessage("resume", params, timeout); - } - - void resume(Double timeout) { - resume(new DebuggerResumeParams(), timeout); - } - - void next(DebuggerNextParams params, Double timeout) { - owner.sendMessage("next", params, timeout); - } - - void next(Double timeout) { - next(new DebuggerNextParams(), timeout); - } - - void runTo(DebuggerRunToParams params, Double timeout) { - owner.sendMessage("runTo", params, timeout); - } - - void enable(DebuggerEnableParams params, Double timeout) { - owner.sendMessage("enable", params, timeout); - } - - void enable(Double timeout) { - enable(new DebuggerEnableParams(), timeout); - } -} - -class DebuggerInitializer { -} - -class DebuggerRequestPauseParams { -} - -class DebuggerResumeParams { -} - -class DebuggerNextParams { -} - -class DebuggerRunToParams { - DebuggerRunToParamsLocation location; - - static class DebuggerRunToParamsLocation { - String file; - Integer line; - Integer column; - } -} - -class DebuggerEnableParams { -} - -class DebuggerPausedStateChangedEvent { - DebuggerPausedStateChangedEventPausedDetails pausedDetails; - - static class DebuggerPausedStateChangedEventPausedDetails { - DebuggerPausedStateChangedEventPausedDetailsLocation location; - String title; - String stack; - - static class DebuggerPausedStateChangedEventPausedDetailsLocation { - String file; - Integer line; - Integer column; - } - } -} - -class DebuggerApiCallsUpdatedEvent { - List apiCalls; - - static class DebuggerApiCallsUpdatedEventApiCalls { - String id; - String title; - DebuggerApiCallsUpdatedEventApiCallsLocation location; - List newLogEntries; - Point actionPoint; - String status; - String error; - - static class DebuggerApiCallsUpdatedEventApiCallsLocation { - String file; - Integer line; - Integer column; - } - } -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java index a91451bc2..10073539e 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DebuggerImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.Debugger; import com.microsoft.playwright.options.Location; @@ -27,7 +28,7 @@ import static com.microsoft.playwright.impl.Serialization.gson; import static com.microsoft.playwright.impl.Utils.toProtocol; -class DebuggerImpl extends ChannelOwner implements Debugger { +public class DebuggerImpl extends ChannelOwner implements Debugger { private final List pausedStateChangedHandlers = new ArrayList<>(); private DebuggerPausedDetails pausedDetails; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java index 719ac7c2e..5094095f4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java @@ -16,11 +16,12 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.Dialog; import com.microsoft.playwright.Page; -class DialogImpl extends ChannelOwner implements Dialog { +public class DialogImpl extends ChannelOwner implements Dialog { final DialogChannel channel = new DialogChannel(this); private PageImpl page; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java index db40f2e19..724a6eb03 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java @@ -16,9 +16,10 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; -class DisposableObject extends ChannelOwner implements AutoCloseable { +public class DisposableObject extends ChannelOwner implements AutoCloseable { final DisposableChannel channel = new DisposableChannel(this); DisposableObject(ChannelOwner parent, String type, String guid, JsonObject initializer) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java deleted file mode 100644 index 8b222f894..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleChannel.java +++ /dev/null @@ -1,562 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class ElementHandleChannel { - private final ChannelOwner owner; - - ElementHandleChannel(ChannelOwner owner) { - this.owner = owner; - } - - ElementHandleEvalOnSelectorResult evalOnSelector(ElementHandleEvalOnSelectorParams params, Double timeout) { - return owner.sendMessage("evalOnSelector", params, ElementHandleEvalOnSelectorResult.class, timeout); - } - - ElementHandleEvalOnSelectorAllResult evalOnSelectorAll(ElementHandleEvalOnSelectorAllParams params, Double timeout) { - return owner.sendMessage("evalOnSelectorAll", params, ElementHandleEvalOnSelectorAllResult.class, timeout); - } - - ElementHandleBoundingBoxResult boundingBox(ElementHandleBoundingBoxParams params, Double timeout) { - return owner.sendMessage("boundingBox", params, ElementHandleBoundingBoxResult.class, timeout); - } - - ElementHandleBoundingBoxResult boundingBox(Double timeout) { - return boundingBox(new ElementHandleBoundingBoxParams(), timeout); - } - - void check(ElementHandleCheckParams params, Double timeout) { - owner.sendMessage("check", params, timeout); - } - - void click(ElementHandleClickParams params, Double timeout) { - owner.sendMessage("click", params, timeout); - } - - ElementHandleContentFrameResult contentFrame(ElementHandleContentFrameParams params, Double timeout) { - return owner.sendMessage("contentFrame", params, ElementHandleContentFrameResult.class, timeout); - } - - ElementHandleContentFrameResult contentFrame(Double timeout) { - return contentFrame(new ElementHandleContentFrameParams(), timeout); - } - - void dblclick(ElementHandleDblclickParams params, Double timeout) { - owner.sendMessage("dblclick", params, timeout); - } - - void dispatchEvent(ElementHandleDispatchEventParams params, Double timeout) { - owner.sendMessage("dispatchEvent", params, timeout); - } - - void fill(ElementHandleFillParams params, Double timeout) { - owner.sendMessage("fill", params, timeout); - } - - void focus(ElementHandleFocusParams params, Double timeout) { - owner.sendMessage("focus", params, timeout); - } - - void focus(Double timeout) { - focus(new ElementHandleFocusParams(), timeout); - } - - ElementHandleGetAttributeResult getAttribute(ElementHandleGetAttributeParams params, Double timeout) { - return owner.sendMessage("getAttribute", params, ElementHandleGetAttributeResult.class, timeout); - } - - void hover(ElementHandleHoverParams params, Double timeout) { - owner.sendMessage("hover", params, timeout); - } - - ElementHandleInnerHTMLResult innerHTML(ElementHandleInnerHTMLParams params, Double timeout) { - return owner.sendMessage("innerHTML", params, ElementHandleInnerHTMLResult.class, timeout); - } - - ElementHandleInnerHTMLResult innerHTML(Double timeout) { - return innerHTML(new ElementHandleInnerHTMLParams(), timeout); - } - - ElementHandleInnerTextResult innerText(ElementHandleInnerTextParams params, Double timeout) { - return owner.sendMessage("innerText", params, ElementHandleInnerTextResult.class, timeout); - } - - ElementHandleInnerTextResult innerText(Double timeout) { - return innerText(new ElementHandleInnerTextParams(), timeout); - } - - ElementHandleInputValueResult inputValue(ElementHandleInputValueParams params, Double timeout) { - return owner.sendMessage("inputValue", params, ElementHandleInputValueResult.class, timeout); - } - - ElementHandleInputValueResult inputValue(Double timeout) { - return inputValue(new ElementHandleInputValueParams(), timeout); - } - - ElementHandleIsCheckedResult isChecked(ElementHandleIsCheckedParams params, Double timeout) { - return owner.sendMessage("isChecked", params, ElementHandleIsCheckedResult.class, timeout); - } - - ElementHandleIsCheckedResult isChecked(Double timeout) { - return isChecked(new ElementHandleIsCheckedParams(), timeout); - } - - ElementHandleIsDisabledResult isDisabled(ElementHandleIsDisabledParams params, Double timeout) { - return owner.sendMessage("isDisabled", params, ElementHandleIsDisabledResult.class, timeout); - } - - ElementHandleIsDisabledResult isDisabled(Double timeout) { - return isDisabled(new ElementHandleIsDisabledParams(), timeout); - } - - ElementHandleIsEditableResult isEditable(ElementHandleIsEditableParams params, Double timeout) { - return owner.sendMessage("isEditable", params, ElementHandleIsEditableResult.class, timeout); - } - - ElementHandleIsEditableResult isEditable(Double timeout) { - return isEditable(new ElementHandleIsEditableParams(), timeout); - } - - ElementHandleIsEnabledResult isEnabled(ElementHandleIsEnabledParams params, Double timeout) { - return owner.sendMessage("isEnabled", params, ElementHandleIsEnabledResult.class, timeout); - } - - ElementHandleIsEnabledResult isEnabled(Double timeout) { - return isEnabled(new ElementHandleIsEnabledParams(), timeout); - } - - ElementHandleIsHiddenResult isHidden(ElementHandleIsHiddenParams params, Double timeout) { - return owner.sendMessage("isHidden", params, ElementHandleIsHiddenResult.class, timeout); - } - - ElementHandleIsHiddenResult isHidden(Double timeout) { - return isHidden(new ElementHandleIsHiddenParams(), timeout); - } - - ElementHandleIsVisibleResult isVisible(ElementHandleIsVisibleParams params, Double timeout) { - return owner.sendMessage("isVisible", params, ElementHandleIsVisibleResult.class, timeout); - } - - ElementHandleIsVisibleResult isVisible(Double timeout) { - return isVisible(new ElementHandleIsVisibleParams(), timeout); - } - - ElementHandleOwnerFrameResult ownerFrame(ElementHandleOwnerFrameParams params, Double timeout) { - return owner.sendMessage("ownerFrame", params, ElementHandleOwnerFrameResult.class, timeout); - } - - ElementHandleOwnerFrameResult ownerFrame(Double timeout) { - return ownerFrame(new ElementHandleOwnerFrameParams(), timeout); - } - - void press(ElementHandlePressParams params, Double timeout) { - owner.sendMessage("press", params, timeout); - } - - ElementHandleQuerySelectorResult querySelector(ElementHandleQuerySelectorParams params, Double timeout) { - return owner.sendMessage("querySelector", params, ElementHandleQuerySelectorResult.class, timeout); - } - - ElementHandleQuerySelectorAllResult querySelectorAll(ElementHandleQuerySelectorAllParams params, Double timeout) { - return owner.sendMessage("querySelectorAll", params, ElementHandleQuerySelectorAllResult.class, timeout); - } - - ElementHandleScreenshotResult screenshot(ElementHandleScreenshotParams params, Double timeout) { - return owner.sendMessage("screenshot", params, ElementHandleScreenshotResult.class, timeout); - } - - void scrollIntoViewIfNeeded(ElementHandleScrollIntoViewIfNeededParams params, Double timeout) { - owner.sendMessage("scrollIntoViewIfNeeded", params, timeout); - } - - void scrollIntoViewIfNeeded(Double timeout) { - scrollIntoViewIfNeeded(new ElementHandleScrollIntoViewIfNeededParams(), timeout); - } - - ElementHandleSelectOptionResult selectOption(ElementHandleSelectOptionParams params, Double timeout) { - return owner.sendMessage("selectOption", params, ElementHandleSelectOptionResult.class, timeout); - } - - void selectText(ElementHandleSelectTextParams params, Double timeout) { - owner.sendMessage("selectText", params, timeout); - } - - void setInputFiles(ElementHandleSetInputFilesParams params, Double timeout) { - owner.sendMessage("setInputFiles", params, timeout); - } - - void tap(ElementHandleTapParams params, Double timeout) { - owner.sendMessage("tap", params, timeout); - } - - ElementHandleTextContentResult textContent(ElementHandleTextContentParams params, Double timeout) { - return owner.sendMessage("textContent", params, ElementHandleTextContentResult.class, timeout); - } - - ElementHandleTextContentResult textContent(Double timeout) { - return textContent(new ElementHandleTextContentParams(), timeout); - } - - void type(ElementHandleTypeParams params, Double timeout) { - owner.sendMessage("type", params, timeout); - } - - void uncheck(ElementHandleUncheckParams params, Double timeout) { - owner.sendMessage("uncheck", params, timeout); - } - - void waitForElementState(ElementHandleWaitForElementStateParams params, Double timeout) { - owner.sendMessage("waitForElementState", params, timeout); - } - - ElementHandleWaitForSelectorResult waitForSelector(ElementHandleWaitForSelectorParams params, Double timeout) { - return owner.sendMessage("waitForSelector", params, ElementHandleWaitForSelectorResult.class, timeout); - } - - void dispose(JSHandleDisposeParams params, Double timeout) { - owner.sendMessage("dispose", params, timeout); - } - - void dispose(Double timeout) { - dispose(new JSHandleDisposeParams(), timeout); - } - - JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { - return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); - } - - JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { - return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); - } - - JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { - return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); - } - - JSHandleGetPropertyListResult getPropertyList(Double timeout) { - return getPropertyList(new JSHandleGetPropertyListParams(), timeout); - } - - JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { - return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); - } - - JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { - return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); - } - - JSHandleJsonValueResult jsonValue(Double timeout) { - return jsonValue(new JSHandleJsonValueParams(), timeout); - } -} - -class ElementHandleInitializer extends JSHandleInitializer { -} - -class ElementHandleEvalOnSelectorParams { - String selector; - Boolean strict; - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class ElementHandleEvalOnSelectorResult { - SerializedValue value; -} - -class ElementHandleEvalOnSelectorAllParams { - String selector; - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class ElementHandleEvalOnSelectorAllResult { - SerializedValue value; -} - -class ElementHandleBoundingBoxParams { -} - -class ElementHandleBoundingBoxResult { - Rect value; -} - -class ElementHandleCheckParams { - Boolean force; - String scroll; - Point position; - Boolean trial; -} - -class ElementHandleClickParams { - Boolean force; - String scroll; - Boolean noWaitAfter; - List modifiers; - Point position; - Double delay; - String button; - Integer clickCount; - Boolean trial; - Integer steps; -} - -class ElementHandleContentFrameParams { -} - -class ElementHandleContentFrameResult { - FrameImpl frame; -} - -class ElementHandleDblclickParams { - Boolean force; - String scroll; - List modifiers; - Point position; - Double delay; - String button; - Boolean trial; - Integer steps; -} - -class ElementHandleDispatchEventParams { - String type; - SerializedArgument eventInit; -} - -class ElementHandleFillParams { - String value; - Boolean force; -} - -class ElementHandleFocusParams { -} - -class ElementHandleGetAttributeParams { - String name; -} - -class ElementHandleGetAttributeResult { - String value; -} - -class ElementHandleHoverParams { - Boolean force; - String scroll; - List modifiers; - Point position; - Boolean trial; -} - -class ElementHandleInnerHTMLParams { -} - -class ElementHandleInnerHTMLResult { - String value; -} - -class ElementHandleInnerTextParams { -} - -class ElementHandleInnerTextResult { - String value; -} - -class ElementHandleInputValueParams { -} - -class ElementHandleInputValueResult { - String value; -} - -class ElementHandleIsCheckedParams { -} - -class ElementHandleIsCheckedResult { - Boolean value; -} - -class ElementHandleIsDisabledParams { -} - -class ElementHandleIsDisabledResult { - Boolean value; -} - -class ElementHandleIsEditableParams { -} - -class ElementHandleIsEditableResult { - Boolean value; -} - -class ElementHandleIsEnabledParams { -} - -class ElementHandleIsEnabledResult { - Boolean value; -} - -class ElementHandleIsHiddenParams { -} - -class ElementHandleIsHiddenResult { - Boolean value; -} - -class ElementHandleIsVisibleParams { -} - -class ElementHandleIsVisibleResult { - Boolean value; -} - -class ElementHandleOwnerFrameParams { -} - -class ElementHandleOwnerFrameResult { - FrameImpl frame; -} - -class ElementHandlePressParams { - String key; - Double delay; - Boolean noWaitAfter; -} - -class ElementHandleQuerySelectorParams { - String selector; - Boolean strict; -} - -class ElementHandleQuerySelectorResult { - ElementHandleImpl element; -} - -class ElementHandleQuerySelectorAllParams { - String selector; -} - -class ElementHandleQuerySelectorAllResult { - List elements; -} - -class ElementHandleScreenshotParams { - String type; - Integer quality; - Boolean omitBackground; - String caret; - String animations; - String scale; - List mask; - String maskColor; - String style; - - static class ElementHandleScreenshotParamsMask { - FrameImpl frame; - String selector; - } -} - -class ElementHandleScreenshotResult { - byte[] binary; -} - -class ElementHandleScrollIntoViewIfNeededParams { -} - -class ElementHandleSelectOptionParams { - List elements; - List options; - Boolean force; - - static class ElementHandleSelectOptionParamsOptions { - String valueOrLabel; - String value; - String label; - Integer index; - } -} - -class ElementHandleSelectOptionResult { - List values; -} - -class ElementHandleSelectTextParams { - Boolean force; -} - -class ElementHandleSetInputFilesParams { - List payloads; - String localDirectory; - WritableStream directoryStream; - List localPaths; - List streams; - - static class ElementHandleSetInputFilesParamsPayloads { - String name; - String mimeType; - byte[] buffer; - } -} - -class ElementHandleTapParams { - Boolean force; - String scroll; - List modifiers; - Point position; - Boolean trial; -} - -class ElementHandleTextContentParams { -} - -class ElementHandleTextContentResult { - String value; -} - -class ElementHandleTypeParams { - String text; - Double delay; -} - -class ElementHandleUncheckParams { - Boolean force; - String scroll; - Point position; - Boolean trial; -} - -class ElementHandleWaitForElementStateParams { - String state; -} - -class ElementHandleWaitForSelectorParams { - String selector; - Boolean strict; - String state; -} - -class ElementHandleWaitForSelectorResult { - ElementHandleImpl element; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java index f6fc7b71b..4f3ef5322 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.ElementHandle; import com.microsoft.playwright.Frame; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java deleted file mode 100644 index 7965cd547..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameChannel.java +++ /dev/null @@ -1,791 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class FrameChannel { - private final ChannelOwner owner; - - FrameChannel(ChannelOwner owner) { - this.owner = owner; - } - - FrameEvalOnSelectorResult evalOnSelector(FrameEvalOnSelectorParams params, Double timeout) { - return owner.sendMessage("evalOnSelector", params, FrameEvalOnSelectorResult.class, timeout); - } - - FrameEvalOnSelectorAllResult evalOnSelectorAll(FrameEvalOnSelectorAllParams params, Double timeout) { - return owner.sendMessage("evalOnSelectorAll", params, FrameEvalOnSelectorAllResult.class, timeout); - } - - FrameAddScriptTagResult addScriptTag(FrameAddScriptTagParams params, Double timeout) { - return owner.sendMessage("addScriptTag", params, FrameAddScriptTagResult.class, timeout); - } - - FrameAddStyleTagResult addStyleTag(FrameAddStyleTagParams params, Double timeout) { - return owner.sendMessage("addStyleTag", params, FrameAddStyleTagResult.class, timeout); - } - - FrameAriaSnapshotResult ariaSnapshot(FrameAriaSnapshotParams params, Double timeout) { - return owner.sendMessage("ariaSnapshot", params, FrameAriaSnapshotResult.class, timeout); - } - - FrameAriaSnapshotJSONResult ariaSnapshotJSON(FrameAriaSnapshotJSONParams params, Double timeout) { - return owner.sendMessage("ariaSnapshotJSON", params, FrameAriaSnapshotJSONResult.class, timeout); - } - - void blur(FrameBlurParams params, Double timeout) { - owner.sendMessage("blur", params, timeout); - } - - void check(FrameCheckParams params, Double timeout) { - owner.sendMessage("check", params, timeout); - } - - void click(FrameClickParams params, Double timeout) { - owner.sendMessage("click", params, timeout); - } - - FrameContentResult content(FrameContentParams params, Double timeout) { - return owner.sendMessage("content", params, FrameContentResult.class, timeout); - } - - void dragAndDrop(FrameDragAndDropParams params, Double timeout) { - owner.sendMessage("dragAndDrop", params, timeout); - } - - void drop(FrameDropParams params, Double timeout) { - owner.sendMessage("drop", params, timeout); - } - - void dblclick(FrameDblclickParams params, Double timeout) { - owner.sendMessage("dblclick", params, timeout); - } - - void dispatchEvent(FrameDispatchEventParams params, Double timeout) { - owner.sendMessage("dispatchEvent", params, timeout); - } - - FrameEvaluateExpressionResult evaluateExpression(FrameEvaluateExpressionParams params, Double timeout) { - return owner.sendMessage("evaluateExpression", params, FrameEvaluateExpressionResult.class, timeout); - } - - FrameEvaluateExpressionHandleResult evaluateExpressionHandle(FrameEvaluateExpressionHandleParams params, Double timeout) { - return owner.sendMessage("evaluateExpressionHandle", params, FrameEvaluateExpressionHandleResult.class, timeout); - } - - void fill(FrameFillParams params, Double timeout) { - owner.sendMessage("fill", params, timeout); - } - - void focus(FrameFocusParams params, Double timeout) { - owner.sendMessage("focus", params, timeout); - } - - FrameFrameElementResult frameElement(FrameFrameElementParams params, Double timeout) { - return owner.sendMessage("frameElement", params, FrameFrameElementResult.class, timeout); - } - - FrameFrameElementResult frameElement(Double timeout) { - return frameElement(new FrameFrameElementParams(), timeout); - } - - FrameResolveSelectorResult resolveSelector(FrameResolveSelectorParams params, Double timeout) { - return owner.sendMessage("resolveSelector", params, FrameResolveSelectorResult.class, timeout); - } - - void highlight(FrameHighlightParams params, Double timeout) { - owner.sendMessage("highlight", params, timeout); - } - - void hideHighlight(FrameHideHighlightParams params, Double timeout) { - owner.sendMessage("hideHighlight", params, timeout); - } - - FrameGetAttributeResult getAttribute(FrameGetAttributeParams params, Double timeout) { - return owner.sendMessage("getAttribute", params, FrameGetAttributeResult.class, timeout); - } - - FrameGotoResult goto_(FrameGotoParams params, Double timeout) { - return owner.sendMessage("goto", params, FrameGotoResult.class, timeout); - } - - void hover(FrameHoverParams params, Double timeout) { - owner.sendMessage("hover", params, timeout); - } - - FrameInnerHTMLResult innerHTML(FrameInnerHTMLParams params, Double timeout) { - return owner.sendMessage("innerHTML", params, FrameInnerHTMLResult.class, timeout); - } - - FrameInnerTextResult innerText(FrameInnerTextParams params, Double timeout) { - return owner.sendMessage("innerText", params, FrameInnerTextResult.class, timeout); - } - - FrameInputValueResult inputValue(FrameInputValueParams params, Double timeout) { - return owner.sendMessage("inputValue", params, FrameInputValueResult.class, timeout); - } - - FrameIsCheckedResult isChecked(FrameIsCheckedParams params, Double timeout) { - return owner.sendMessage("isChecked", params, FrameIsCheckedResult.class, timeout); - } - - FrameIsDisabledResult isDisabled(FrameIsDisabledParams params, Double timeout) { - return owner.sendMessage("isDisabled", params, FrameIsDisabledResult.class, timeout); - } - - FrameIsEnabledResult isEnabled(FrameIsEnabledParams params, Double timeout) { - return owner.sendMessage("isEnabled", params, FrameIsEnabledResult.class, timeout); - } - - FrameIsHiddenResult isHidden(FrameIsHiddenParams params, Double timeout) { - return owner.sendMessage("isHidden", params, FrameIsHiddenResult.class, timeout); - } - - FrameIsVisibleResult isVisible(FrameIsVisibleParams params, Double timeout) { - return owner.sendMessage("isVisible", params, FrameIsVisibleResult.class, timeout); - } - - FrameIsEditableResult isEditable(FrameIsEditableParams params, Double timeout) { - return owner.sendMessage("isEditable", params, FrameIsEditableResult.class, timeout); - } - - void press(FramePressParams params, Double timeout) { - owner.sendMessage("press", params, timeout); - } - - FrameQuerySelectorResult querySelector(FrameQuerySelectorParams params, Double timeout) { - return owner.sendMessage("querySelector", params, FrameQuerySelectorResult.class, timeout); - } - - FrameQuerySelectorAllResult querySelectorAll(FrameQuerySelectorAllParams params, Double timeout) { - return owner.sendMessage("querySelectorAll", params, FrameQuerySelectorAllResult.class, timeout); - } - - FrameQueryCountResult queryCount(FrameQueryCountParams params, Double timeout) { - return owner.sendMessage("queryCount", params, FrameQueryCountResult.class, timeout); - } - - FrameSelectOptionResult selectOption(FrameSelectOptionParams params, Double timeout) { - return owner.sendMessage("selectOption", params, FrameSelectOptionResult.class, timeout); - } - - void setContent(FrameSetContentParams params, Double timeout) { - owner.sendMessage("setContent", params, timeout); - } - - void setInputFiles(FrameSetInputFilesParams params, Double timeout) { - owner.sendMessage("setInputFiles", params, timeout); - } - - void tap(FrameTapParams params, Double timeout) { - owner.sendMessage("tap", params, timeout); - } - - FrameTextContentResult textContent(FrameTextContentParams params, Double timeout) { - return owner.sendMessage("textContent", params, FrameTextContentResult.class, timeout); - } - - FrameTitleResult title(FrameTitleParams params, Double timeout) { - return owner.sendMessage("title", params, FrameTitleResult.class, timeout); - } - - FrameTitleResult title(Double timeout) { - return title(new FrameTitleParams(), timeout); - } - - void type(FrameTypeParams params, Double timeout) { - owner.sendMessage("type", params, timeout); - } - - void uncheck(FrameUncheckParams params, Double timeout) { - owner.sendMessage("uncheck", params, timeout); - } - - void waitForTimeout(FrameWaitForTimeoutParams params, Double timeout) { - owner.sendMessage("waitForTimeout", params, timeout); - } - - FrameWaitForFunctionResult waitForFunction(FrameWaitForFunctionParams params, Double timeout) { - return owner.sendMessage("waitForFunction", params, FrameWaitForFunctionResult.class, timeout); - } - - FrameWaitForSelectorResult waitForSelector(FrameWaitForSelectorParams params, Double timeout) { - return owner.sendMessage("waitForSelector", params, FrameWaitForSelectorResult.class, timeout); - } - - void expect(FrameExpectParams params, Double timeout) { - owner.sendMessage("expect", params, timeout); - } - - FrameWebmcpToolsResult webmcpTools(FrameWebmcpToolsParams params, Double timeout) { - return owner.sendMessage("webmcpTools", params, FrameWebmcpToolsResult.class, timeout); - } - - FrameWebmcpToolsResult webmcpTools(Double timeout) { - return webmcpTools(new FrameWebmcpToolsParams(), timeout); - } - - FrameWebmcpCallToolResult webmcpCallTool(FrameWebmcpCallToolParams params, Double timeout) { - return owner.sendMessage("webmcpCallTool", params, FrameWebmcpCallToolResult.class, timeout); - } -} - -class FrameInitializer { - String url; - String name; - FrameImpl parentFrame; - List loadStates; -} - -class FrameEvalOnSelectorParams { - String selector; - Boolean strict; - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class FrameEvalOnSelectorResult { - SerializedValue value; -} - -class FrameEvalOnSelectorAllParams { - String selector; - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class FrameEvalOnSelectorAllResult { - SerializedValue value; -} - -class FrameAddScriptTagParams { - String url; - String content; - String type; -} - -class FrameAddScriptTagResult { - ElementHandleImpl element; -} - -class FrameAddStyleTagParams { - String url; - String content; -} - -class FrameAddStyleTagResult { - ElementHandleImpl element; -} - -class FrameAriaSnapshotParams { - String mode; - String selector; - Integer depth; - Boolean boxes; -} - -class FrameAriaSnapshotResult { - String snapshot; -} - -class FrameAriaSnapshotJSONParams { - String mode; - String selector; - Integer depth; - Boolean boxes; -} - -class FrameAriaSnapshotJSONResult { - JsonElement snapshot; -} - -class FrameBlurParams { - String selector; - Boolean strict; -} - -class FrameCheckParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - Point position; - Boolean trial; -} - -class FrameClickParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - Boolean noWaitAfter; - List modifiers; - Point position; - Double delay; - String button; - Integer clickCount; - Boolean trial; - Integer steps; -} - -class FrameContentParams { - Boolean includeShadow; -} - -class FrameContentResult { - String value; -} - -class FrameDragAndDropParams { - String source; - String target; - Boolean force; - String scroll; - Boolean trial; - Point sourcePosition; - Point targetPosition; - Boolean strict; - Integer steps; -} - -class FrameDropParams { - String selector; - Boolean strict; - Point position; - List payloads; - List localPaths; - List streams; - List data; - - static class FrameDropParamsPayloads { - String name; - String mimeType; - byte[] buffer; - } - - static class FrameDropParamsData { - String mimeType; - String value; - } -} - -class FrameDblclickParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - List modifiers; - Point position; - Double delay; - String button; - Boolean trial; - Integer steps; -} - -class FrameDispatchEventParams { - String selector; - Boolean strict; - String type; - SerializedArgument eventInit; -} - -class FrameEvaluateExpressionParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class FrameEvaluateExpressionResult { - SerializedValue value; -} - -class FrameEvaluateExpressionHandleParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class FrameEvaluateExpressionHandleResult { - JSHandleImpl handle; -} - -class FrameFillParams { - String selector; - Boolean strict; - String value; - Boolean force; -} - -class FrameFocusParams { - String selector; - Boolean strict; -} - -class FrameFrameElementParams { -} - -class FrameFrameElementResult { - ElementHandleImpl element; -} - -class FrameResolveSelectorParams { - String selector; - String sdkLanguage; -} - -class FrameResolveSelectorResult { - String resolvedSelector; - String locatorCode; -} - -class FrameHighlightParams { - String selector; - String style; -} - -class FrameHideHighlightParams { - String selector; -} - -class FrameGetAttributeParams { - String selector; - Boolean strict; - String name; -} - -class FrameGetAttributeResult { - String value; -} - -class FrameGotoParams { - String url; - String waitUntil; - String referer; -} - -class FrameGotoResult { - ResponseImpl response; -} - -class FrameHoverParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - List modifiers; - Point position; - Boolean trial; -} - -class FrameInnerHTMLParams { - String selector; - Boolean strict; -} - -class FrameInnerHTMLResult { - String value; -} - -class FrameInnerTextParams { - String selector; - Boolean strict; -} - -class FrameInnerTextResult { - String value; -} - -class FrameInputValueParams { - String selector; - Boolean strict; -} - -class FrameInputValueResult { - String value; -} - -class FrameIsCheckedParams { - String selector; - Boolean strict; -} - -class FrameIsCheckedResult { - Boolean value; -} - -class FrameIsDisabledParams { - String selector; - Boolean strict; -} - -class FrameIsDisabledResult { - Boolean value; -} - -class FrameIsEnabledParams { - String selector; - Boolean strict; -} - -class FrameIsEnabledResult { - Boolean value; -} - -class FrameIsHiddenParams { - String selector; - Boolean strict; -} - -class FrameIsHiddenResult { - Boolean value; -} - -class FrameIsVisibleParams { - String selector; - Boolean strict; -} - -class FrameIsVisibleResult { - Boolean value; -} - -class FrameIsEditableParams { - String selector; - Boolean strict; -} - -class FrameIsEditableResult { - Boolean value; -} - -class FramePressParams { - String selector; - Boolean strict; - String key; - Double delay; - Boolean noWaitAfter; -} - -class FrameQuerySelectorParams { - String selector; - Boolean strict; -} - -class FrameQuerySelectorResult { - ElementHandleImpl element; -} - -class FrameQuerySelectorAllParams { - String selector; -} - -class FrameQuerySelectorAllResult { - List elements; -} - -class FrameQueryCountParams { - String selector; -} - -class FrameQueryCountResult { - Integer value; -} - -class FrameSelectOptionParams { - String selector; - Boolean strict; - List elements; - List options; - Boolean force; - - static class FrameSelectOptionParamsOptions { - String valueOrLabel; - String value; - String label; - Integer index; - } -} - -class FrameSelectOptionResult { - List values; -} - -class FrameSetContentParams { - String html; - String waitUntil; -} - -class FrameSetInputFilesParams { - String selector; - Boolean strict; - List payloads; - String localDirectory; - WritableStream directoryStream; - List localPaths; - List streams; - - static class FrameSetInputFilesParamsPayloads { - String name; - String mimeType; - byte[] buffer; - } -} - -class FrameTapParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - List modifiers; - Point position; - Boolean trial; -} - -class FrameTextContentParams { - String selector; - Boolean strict; -} - -class FrameTextContentResult { - String value; -} - -class FrameTitleParams { -} - -class FrameTitleResult { - String value; -} - -class FrameTypeParams { - String selector; - Boolean strict; - String text; - Double delay; -} - -class FrameUncheckParams { - String selector; - Boolean strict; - Boolean force; - String scroll; - Point position; - Boolean trial; -} - -class FrameWaitForTimeoutParams { - Double waitTimeout; -} - -class FrameWaitForFunctionParams { - String expression; - Boolean isFunction; - SerializedArgument arg; - Double pollingInterval; - String selector; - Boolean strict; -} - -class FrameWaitForFunctionResult { - JSHandleImpl handle; -} - -class FrameWaitForSelectorParams { - String selector; - Boolean strict; - String state; - Boolean omitReturnValue; -} - -class FrameWaitForSelectorResult { - ElementHandleImpl element; -} - -class FrameExpectParams { - String selector; - String expression; - JsonElement expressionArg; - String pseudo; - List expectedText; - Double expectedNumber; - SerializedArgument expectedValue; - Boolean useInnerText; - Boolean isNot; -} - -class FrameExpectErrorDetails { - FrameExpectErrorDetailsReceived received; - Boolean timedOut; - String customErrorMessage; - - static class FrameExpectErrorDetailsReceived { - SerializedValue value; - String ariaSnapshot; - } -} - -class FrameWebmcpToolsParams { -} - -class FrameWebmcpToolsResult { - List tools; - - static class FrameWebmcpToolsResultTools { - String name; - String description; - JsonElement inputSchema; - FrameWebmcpToolsResultToolsAnnotations annotations; - - static class FrameWebmcpToolsResultToolsAnnotations { - Boolean readOnly; - Boolean untrustedContent; - Boolean consequential; - } - } -} - -class FrameWebmcpCallToolParams { - String name; - SerializedArgument input; -} - -class FrameWebmcpCallToolResult { - SerializedValue result; -} - -class FrameLoadstateEvent { - String add; - String remove; -} - -class FrameNavigatedEvent { - String url; - String name; - FrameNavigatedEventNewDocument newDocument; - String error; - - static class FrameNavigatedEventNewDocument { - RequestImpl request; - } -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index 29ca18608..048bd0437 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java index ab46c21e3..951117ca2 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/HARRouter.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Request; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java deleted file mode 100644 index 031a38eb6..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleChannel.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class JSHandleChannel { - private final ChannelOwner owner; - - JSHandleChannel(ChannelOwner owner) { - this.owner = owner; - } - - void dispose(JSHandleDisposeParams params, Double timeout) { - owner.sendMessage("dispose", params, timeout); - } - - void dispose(Double timeout) { - dispose(new JSHandleDisposeParams(), timeout); - } - - JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { - return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); - } - - JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { - return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); - } - - JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { - return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); - } - - JSHandleGetPropertyListResult getPropertyList(Double timeout) { - return getPropertyList(new JSHandleGetPropertyListParams(), timeout); - } - - JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { - return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); - } - - JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { - return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); - } - - JSHandleJsonValueResult jsonValue(Double timeout) { - return jsonValue(new JSHandleJsonValueParams(), timeout); - } -} - -class JSHandleInitializer { - String preview; -} - -class JSHandleDisposeParams { -} - -class JSHandleEvaluateExpressionParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class JSHandleEvaluateExpressionResult { - SerializedValue value; -} - -class JSHandleEvaluateExpressionHandleParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class JSHandleEvaluateExpressionHandleResult { - JSHandleImpl handle; -} - -class JSHandleGetPropertyListParams { -} - -class JSHandleGetPropertyListResult { - List properties; - - static class JSHandleGetPropertyListResultProperties { - String name; - JSHandleImpl value; - } -} - -class JSHandleGetPropertyParams { - String name; -} - -class JSHandleGetPropertyResult { - JSHandleImpl handle; -} - -class JSHandleJsonValueParams { -} - -class JSHandleJsonValueResult { - SerializedValue value; -} - -class JSHandlePreviewUpdatedEvent { - String preview; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java index 2d4f73234..67c0a5459 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JSHandleImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.ElementHandle; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java index a596e0878..b791721d8 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipe.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; @@ -28,7 +29,7 @@ import static com.microsoft.playwright.impl.Serialization.gson; -class JsonPipe extends ChannelOwner implements Transport { +public class JsonPipe extends ChannelOwner implements Transport { private final Queue incoming = new LinkedList<>(); private ListenerCollection listeners = new ListenerCollection<>(); private enum EventType { CLOSE } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java index 7bf8c0900..f03b2204a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Keyboard; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java index 6915147ae..47d1e4f46 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonObject; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java deleted file mode 100644 index b92038a60..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtilsChannel.java +++ /dev/null @@ -1,199 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class LocalUtilsChannel { - private final ChannelOwner owner; - - LocalUtilsChannel(ChannelOwner owner) { - this.owner = owner; - } - - void zip(LocalUtilsZipParams params, Double timeout) { - owner.sendMessage("zip", params, timeout); - } - - LocalUtilsHarOpenResult harOpen(LocalUtilsHarOpenParams params, Double timeout) { - return owner.sendMessage("harOpen", params, LocalUtilsHarOpenResult.class, timeout); - } - - LocalUtilsHarLookupResult harLookup(LocalUtilsHarLookupParams params, Double timeout) { - return owner.sendMessage("harLookup", params, LocalUtilsHarLookupResult.class, timeout); - } - - void harClose(LocalUtilsHarCloseParams params, Double timeout) { - owner.sendMessage("harClose", params, timeout); - } - - void harUnzip(LocalUtilsHarUnzipParams params, Double timeout) { - owner.sendMessage("harUnzip", params, timeout); - } - - LocalUtilsConnectResult connect(LocalUtilsConnectParams params, Double timeout) { - return owner.sendMessage("connect", params, LocalUtilsConnectResult.class, timeout); - } - - LocalUtilsTracingStartedResult tracingStarted(LocalUtilsTracingStartedParams params, Double timeout) { - return owner.sendMessage("tracingStarted", params, LocalUtilsTracingStartedResult.class, timeout); - } - - void addStackToTracingNoReply(LocalUtilsAddStackToTracingNoReplyParams params, Double timeout) { - owner.sendMessage("addStackToTracingNoReply", params, timeout); - } - - void traceDiscarded(LocalUtilsTraceDiscardedParams params, Double timeout) { - owner.sendMessage("traceDiscarded", params, timeout); - } - - LocalUtilsGlobToRegexResult globToRegex(LocalUtilsGlobToRegexParams params, Double timeout) { - return owner.sendMessage("globToRegex", params, LocalUtilsGlobToRegexResult.class, timeout); - } - - LocalUtilsAsLocatorDescriptionResult asLocatorDescription(LocalUtilsAsLocatorDescriptionParams params, Double timeout) { - return owner.sendMessage("asLocatorDescription", params, LocalUtilsAsLocatorDescriptionResult.class, timeout); - } -} - -class LocalUtilsInitializer { - List deviceDescriptors; - - static class LocalUtilsInitializerDeviceDescriptors { - String name; - LocalUtilsInitializerDeviceDescriptorsDescriptor descriptor; - - static class LocalUtilsInitializerDeviceDescriptorsDescriptor { - String userAgent; - LocalUtilsInitializerDeviceDescriptorsDescriptorViewport viewport; - LocalUtilsInitializerDeviceDescriptorsDescriptorScreen screen; - Double deviceScaleFactor; - Boolean isMobile; - Boolean hasTouch; - String defaultBrowserType; - - static class LocalUtilsInitializerDeviceDescriptorsDescriptorViewport { - Integer width; - Integer height; - } - - static class LocalUtilsInitializerDeviceDescriptorsDescriptorScreen { - Integer width; - Integer height; - } - } - } -} - -class LocalUtilsZipParams { - String zipFile; - List entries; - String stacksId; - String mode; - Boolean includeSources; - List additionalSources; -} - -class LocalUtilsHarOpenParams { - String file; -} - -class LocalUtilsHarOpenResult { - String harId; - String error; -} - -class LocalUtilsHarLookupParams { - String harId; - String url; - String method; - List headers; - byte[] postData; - Boolean isNavigationRequest; -} - -class LocalUtilsHarLookupResult { - String action; - String message; - String redirectURL; - Integer status; - List headers; - byte[] body; -} - -class LocalUtilsHarCloseParams { - String harId; -} - -class LocalUtilsHarUnzipParams { - String zipFile; - String harFile; - String resourcesDir; -} - -class LocalUtilsConnectParams { - String endpoint; - JsonElement headers; - String exposeNetwork; - Double slowMo; - Integer socksProxyRedirectPortForTest; -} - -class LocalUtilsConnectResult { - JsonPipe pipe; - List headers; -} - -class LocalUtilsTracingStartedParams { - String tracesDir; - String traceName; - Boolean live; -} - -class LocalUtilsTracingStartedResult { - String stacksId; -} - -class LocalUtilsAddStackToTracingNoReplyParams { - ClientSideCallMetadata callData; -} - -class LocalUtilsTraceDiscardedParams { - String stacksId; -} - -class LocalUtilsGlobToRegexParams { - String glob; - String baseURL; - Boolean webSocketUrl; -} - -class LocalUtilsGlobToRegexResult { - String regex; -} - -class LocalUtilsAsLocatorDescriptionParams { - String selector; - String sdkLanguage; -} - -class LocalUtilsAsLocatorDescriptionResult { - String description; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorAssertionsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorAssertionsImpl.java index 088910c98..fa481ef86 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorAssertionsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorAssertionsImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Locator; import com.microsoft.playwright.assertions.LocatorAssertions; import com.microsoft.playwright.options.AriaRole; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java index 67536e9d8..5c418c3fa 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/LocatorImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.*; import com.microsoft.playwright.options.*; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java index b531265cf..f0f06d1b9 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/MouseImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Mouse; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageAssertionsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageAssertionsImpl.java index 2cdd63d17..1c78a8eb5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageAssertionsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageAssertionsImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Page; import com.microsoft.playwright.assertions.PageAssertions; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java deleted file mode 100644 index 29d335cb2..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageChannel.java +++ /dev/null @@ -1,875 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class PageChannel { - private final ChannelOwner owner; - - PageChannel(ChannelOwner owner) { - this.owner = owner; - } - - PageAddInitScriptResult addInitScript(PageAddInitScriptParams params, Double timeout) { - return owner.sendMessage("addInitScript", params, PageAddInitScriptResult.class, timeout); - } - - void close(PageCloseParams params, Double timeout) { - owner.sendMessage("close", params, timeout); - } - - void runBeforeUnload(PageRunBeforeUnloadParams params, Double timeout) { - owner.sendMessage("runBeforeUnload", params, timeout); - } - - void runBeforeUnload(Double timeout) { - runBeforeUnload(new PageRunBeforeUnloadParams(), timeout); - } - - void clearConsoleMessages(PageClearConsoleMessagesParams params, Double timeout) { - owner.sendMessage("clearConsoleMessages", params, timeout); - } - - void clearConsoleMessages(Double timeout) { - clearConsoleMessages(new PageClearConsoleMessagesParams(), timeout); - } - - PageConsoleMessagesResult consoleMessages(PageConsoleMessagesParams params, Double timeout) { - return owner.sendMessage("consoleMessages", params, PageConsoleMessagesResult.class, timeout); - } - - void emulateMedia(PageEmulateMediaParams params, Double timeout) { - owner.sendMessage("emulateMedia", params, timeout); - } - - PageExposeBindingResult exposeBinding(PageExposeBindingParams params, Double timeout) { - return owner.sendMessage("exposeBinding", params, PageExposeBindingResult.class, timeout); - } - - PageGoBackResult goBack(PageGoBackParams params, Double timeout) { - return owner.sendMessage("goBack", params, PageGoBackResult.class, timeout); - } - - PageGoForwardResult goForward(PageGoForwardParams params, Double timeout) { - return owner.sendMessage("goForward", params, PageGoForwardResult.class, timeout); - } - - void requestGC(PageRequestGCParams params, Double timeout) { - owner.sendMessage("requestGC", params, timeout); - } - - void requestGC(Double timeout) { - requestGC(new PageRequestGCParams(), timeout); - } - - PageRegisterLocatorHandlerResult registerLocatorHandler(PageRegisterLocatorHandlerParams params, Double timeout) { - return owner.sendMessage("registerLocatorHandler", params, PageRegisterLocatorHandlerResult.class, timeout); - } - - void resolveLocatorHandlerNoReply(PageResolveLocatorHandlerNoReplyParams params, Double timeout) { - owner.sendMessage("resolveLocatorHandlerNoReply", params, timeout); - } - - void unregisterLocatorHandler(PageUnregisterLocatorHandlerParams params, Double timeout) { - owner.sendMessage("unregisterLocatorHandler", params, timeout); - } - - PageReloadResult reload(PageReloadParams params, Double timeout) { - return owner.sendMessage("reload", params, PageReloadResult.class, timeout); - } - - PageExpectScreenshotResult expectScreenshot(PageExpectScreenshotParams params, Double timeout) { - return owner.sendMessage("expectScreenshot", params, PageExpectScreenshotResult.class, timeout); - } - - PageScreenshotResult screenshot(PageScreenshotParams params, Double timeout) { - return owner.sendMessage("screenshot", params, PageScreenshotResult.class, timeout); - } - - void setExtraHTTPHeaders(PageSetExtraHTTPHeadersParams params, Double timeout) { - owner.sendMessage("setExtraHTTPHeaders", params, timeout); - } - - void setNetworkInterceptionPatterns(PageSetNetworkInterceptionPatternsParams params, Double timeout) { - owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); - } - - void setWebSocketInterceptionPatterns(PageSetWebSocketInterceptionPatternsParams params, Double timeout) { - owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); - } - - void setViewportSize(PageSetViewportSizeParams params, Double timeout) { - owner.sendMessage("setViewportSize", params, timeout); - } - - void keyboardDown(PageKeyboardDownParams params, Double timeout) { - owner.sendMessage("keyboardDown", params, timeout); - } - - void keyboardUp(PageKeyboardUpParams params, Double timeout) { - owner.sendMessage("keyboardUp", params, timeout); - } - - void keyboardInsertText(PageKeyboardInsertTextParams params, Double timeout) { - owner.sendMessage("keyboardInsertText", params, timeout); - } - - void keyboardType(PageKeyboardTypeParams params, Double timeout) { - owner.sendMessage("keyboardType", params, timeout); - } - - void keyboardPress(PageKeyboardPressParams params, Double timeout) { - owner.sendMessage("keyboardPress", params, timeout); - } - - void mouseMove(PageMouseMoveParams params, Double timeout) { - owner.sendMessage("mouseMove", params, timeout); - } - - void mouseDown(PageMouseDownParams params, Double timeout) { - owner.sendMessage("mouseDown", params, timeout); - } - - void mouseUp(PageMouseUpParams params, Double timeout) { - owner.sendMessage("mouseUp", params, timeout); - } - - void mouseClick(PageMouseClickParams params, Double timeout) { - owner.sendMessage("mouseClick", params, timeout); - } - - void mouseWheel(PageMouseWheelParams params, Double timeout) { - owner.sendMessage("mouseWheel", params, timeout); - } - - void touchscreenTap(PageTouchscreenTapParams params, Double timeout) { - owner.sendMessage("touchscreenTap", params, timeout); - } - - void clearPageErrors(PageClearPageErrorsParams params, Double timeout) { - owner.sendMessage("clearPageErrors", params, timeout); - } - - void clearPageErrors(Double timeout) { - clearPageErrors(new PageClearPageErrorsParams(), timeout); - } - - PagePageErrorsResult pageErrors(PagePageErrorsParams params, Double timeout) { - return owner.sendMessage("pageErrors", params, PagePageErrorsResult.class, timeout); - } - - PagePdfResult pdf(PagePdfParams params, Double timeout) { - return owner.sendMessage("pdf", params, PagePdfResult.class, timeout); - } - - PageRequestsResult requests(PageRequestsParams params, Double timeout) { - return owner.sendMessage("requests", params, PageRequestsResult.class, timeout); - } - - PageRequestsResult requests(Double timeout) { - return requests(new PageRequestsParams(), timeout); - } - - void startJSCoverage(PageStartJSCoverageParams params, Double timeout) { - owner.sendMessage("startJSCoverage", params, timeout); - } - - PageStopJSCoverageResult stopJSCoverage(PageStopJSCoverageParams params, Double timeout) { - return owner.sendMessage("stopJSCoverage", params, PageStopJSCoverageResult.class, timeout); - } - - PageStopJSCoverageResult stopJSCoverage(Double timeout) { - return stopJSCoverage(new PageStopJSCoverageParams(), timeout); - } - - void startCSSCoverage(PageStartCSSCoverageParams params, Double timeout) { - owner.sendMessage("startCSSCoverage", params, timeout); - } - - PageStopCSSCoverageResult stopCSSCoverage(PageStopCSSCoverageParams params, Double timeout) { - return owner.sendMessage("stopCSSCoverage", params, PageStopCSSCoverageResult.class, timeout); - } - - PageStopCSSCoverageResult stopCSSCoverage(Double timeout) { - return stopCSSCoverage(new PageStopCSSCoverageParams(), timeout); - } - - void bringToFront(PageBringToFrontParams params, Double timeout) { - owner.sendMessage("bringToFront", params, timeout); - } - - void bringToFront(Double timeout) { - bringToFront(new PageBringToFrontParams(), timeout); - } - - PagePickLocatorResult pickLocator(PagePickLocatorParams params, Double timeout) { - return owner.sendMessage("pickLocator", params, PagePickLocatorResult.class, timeout); - } - - PagePickLocatorResult pickLocator(Double timeout) { - return pickLocator(new PagePickLocatorParams(), timeout); - } - - void cancelPickLocator(PageCancelPickLocatorParams params, Double timeout) { - owner.sendMessage("cancelPickLocator", params, timeout); - } - - void cancelPickLocator(Double timeout) { - cancelPickLocator(new PageCancelPickLocatorParams(), timeout); - } - - void hideHighlight(PageHideHighlightParams params, Double timeout) { - owner.sendMessage("hideHighlight", params, timeout); - } - - void hideHighlight(Double timeout) { - hideHighlight(new PageHideHighlightParams(), timeout); - } - - PageScreencastShowOverlayResult screencastShowOverlay(PageScreencastShowOverlayParams params, Double timeout) { - return owner.sendMessage("screencastShowOverlay", params, PageScreencastShowOverlayResult.class, timeout); - } - - void screencastRemoveOverlay(PageScreencastRemoveOverlayParams params, Double timeout) { - owner.sendMessage("screencastRemoveOverlay", params, timeout); - } - - void screencastChapter(PageScreencastChapterParams params, Double timeout) { - owner.sendMessage("screencastChapter", params, timeout); - } - - void screencastSetOverlayVisible(PageScreencastSetOverlayVisibleParams params, Double timeout) { - owner.sendMessage("screencastSetOverlayVisible", params, timeout); - } - - void screencastShowActions(PageScreencastShowActionsParams params, Double timeout) { - owner.sendMessage("screencastShowActions", params, timeout); - } - - void screencastHideActions(PageScreencastHideActionsParams params, Double timeout) { - owner.sendMessage("screencastHideActions", params, timeout); - } - - void screencastHideActions(Double timeout) { - screencastHideActions(new PageScreencastHideActionsParams(), timeout); - } - - PageScreencastStartResult screencastStart(PageScreencastStartParams params, Double timeout) { - return owner.sendMessage("screencastStart", params, PageScreencastStartResult.class, timeout); - } - - void screencastFrameAck(PageScreencastFrameAckParams params, Double timeout) { - owner.sendMessage("screencastFrameAck", params, timeout); - } - - void screencastStop(PageScreencastStopParams params, Double timeout) { - owner.sendMessage("screencastStop", params, timeout); - } - - void screencastStop(Double timeout) { - screencastStop(new PageScreencastStopParams(), timeout); - } - - void updateSubscription(PageUpdateSubscriptionParams params, Double timeout) { - owner.sendMessage("updateSubscription", params, timeout); - } - - void setDockTile(PageSetDockTileParams params, Double timeout) { - owner.sendMessage("setDockTile", params, timeout); - } - - PageWebStorageItemsResult webStorageItems(PageWebStorageItemsParams params, Double timeout) { - return owner.sendMessage("webStorageItems", params, PageWebStorageItemsResult.class, timeout); - } - - PageWebStorageGetItemResult webStorageGetItem(PageWebStorageGetItemParams params, Double timeout) { - return owner.sendMessage("webStorageGetItem", params, PageWebStorageGetItemResult.class, timeout); - } - - void webStorageSetItem(PageWebStorageSetItemParams params, Double timeout) { - owner.sendMessage("webStorageSetItem", params, timeout); - } - - void webStorageRemoveItem(PageWebStorageRemoveItemParams params, Double timeout) { - owner.sendMessage("webStorageRemoveItem", params, timeout); - } - - void webStorageClear(PageWebStorageClearParams params, Double timeout) { - owner.sendMessage("webStorageClear", params, timeout); - } -} - -class PageInitializer { - FrameImpl mainFrame; - PageInitializerViewportSize viewportSize; - Boolean isClosed; - PageImpl opener; - ArtifactImpl video; - - static class PageInitializerViewportSize { - Integer width; - Integer height; - } -} - -class PageAddInitScriptParams { - String source; -} - -class PageAddInitScriptResult { - DisposableObject disposable; -} - -class PageCloseParams { - String reason; -} - -class PageRunBeforeUnloadParams { -} - -class PageClearConsoleMessagesParams { -} - -class PageConsoleMessagesParams { - String filter; -} - -class PageConsoleMessagesResult { - List messages; - - static class PageConsoleMessagesResultMessages { - String type; - String text; - List args; - PageConsoleMessagesResultMessagesLocation location; - Double timestamp; - - static class PageConsoleMessagesResultMessagesLocation { - String url; - Integer lineNumber; - Integer columnNumber; - } - } -} - -class PageEmulateMediaParams { - String media; - String colorScheme; - String reducedMotion; - String forcedColors; - String contrast; -} - -class PageExposeBindingParams { - String name; - Boolean noGlobal; -} - -class PageExposeBindingResult { - DisposableObject disposable; -} - -class PageGoBackParams { - String waitUntil; -} - -class PageGoBackResult { - ResponseImpl response; -} - -class PageGoForwardParams { - String waitUntil; -} - -class PageGoForwardResult { - ResponseImpl response; -} - -class PageRequestGCParams { -} - -class PageRegisterLocatorHandlerParams { - String selector; - Boolean noWaitAfter; -} - -class PageRegisterLocatorHandlerResult { - Integer uid; -} - -class PageResolveLocatorHandlerNoReplyParams { - Integer uid; - Boolean remove; -} - -class PageUnregisterLocatorHandlerParams { - Integer uid; -} - -class PageReloadParams { - String waitUntil; -} - -class PageReloadResult { - ResponseImpl response; -} - -class PageExpectScreenshotParams { - byte[] expected; - Boolean isNot; - PageExpectScreenshotParamsLocator locator; - String comparator; - Integer maxDiffPixels; - Double maxDiffPixelRatio; - Double threshold; - Boolean fullPage; - Rect clip; - String type; - Boolean omitBackground; - String caret; - String animations; - String scale; - List mask; - String maskColor; - String style; - - static class PageExpectScreenshotParamsLocator { - FrameImpl frame; - String selector; - } - - static class PageExpectScreenshotParamsMask { - FrameImpl frame; - String selector; - } -} - -class PageExpectScreenshotResult { - byte[] actual; -} - -class PageExpectScreenshotErrorDetails { - byte[] diff; - String customErrorMessage; - byte[] actual; - byte[] previous; - Boolean timedOut; - List log; -} - -class PageScreenshotParams { - String type; - Integer quality; - Boolean fullPage; - Rect clip; - Boolean omitBackground; - String caret; - String animations; - String scale; - List mask; - String maskColor; - String style; - - static class PageScreenshotParamsMask { - FrameImpl frame; - String selector; - } -} - -class PageScreenshotResult { - byte[] binary; -} - -class PageSetExtraHTTPHeadersParams { - List headers; -} - -class PageSetNetworkInterceptionPatternsParams { - List patterns; - - static class PageSetNetworkInterceptionPatternsParamsPatterns { - String glob; - String regexSource; - String regexFlags; - URLPattern urlPattern; - } -} - -class PageSetWebSocketInterceptionPatternsParams { - List patterns; - - static class PageSetWebSocketInterceptionPatternsParamsPatterns { - String glob; - String regexSource; - String regexFlags; - URLPattern urlPattern; - } -} - -class PageSetViewportSizeParams { - PageSetViewportSizeParamsViewportSize viewportSize; - - static class PageSetViewportSizeParamsViewportSize { - Integer width; - Integer height; - } -} - -class PageKeyboardDownParams { - String key; -} - -class PageKeyboardUpParams { - String key; -} - -class PageKeyboardInsertTextParams { - String text; -} - -class PageKeyboardTypeParams { - String text; - Double delay; -} - -class PageKeyboardPressParams { - String key; - Double delay; -} - -class PageMouseMoveParams { - Double x; - Double y; - Integer steps; -} - -class PageMouseDownParams { - String button; - Integer clickCount; -} - -class PageMouseUpParams { - String button; - Integer clickCount; -} - -class PageMouseClickParams { - Double x; - Double y; - Double delay; - String button; - Integer clickCount; -} - -class PageMouseWheelParams { - Double deltaX; - Double deltaY; -} - -class PageTouchscreenTapParams { - Double x; - Double y; -} - -class PageClearPageErrorsParams { -} - -class PagePageErrorsParams { - String filter; -} - -class PagePageErrorsResult { - List errors; -} - -class PagePdfParams { - Double scale; - Boolean displayHeaderFooter; - String headerTemplate; - String footerTemplate; - Boolean printBackground; - Boolean landscape; - String pageRanges; - String format; - String width; - String height; - Boolean preferCSSPageSize; - PagePdfParamsMargin margin; - Boolean tagged; - Boolean outline; - - static class PagePdfParamsMargin { - String top; - String bottom; - String left; - String right; - } -} - -class PagePdfResult { - byte[] pdf; -} - -class PageRequestsParams { -} - -class PageRequestsResult { - List requests; -} - -class PageStartJSCoverageParams { - Boolean resetOnNavigation; - Boolean reportAnonymousScripts; -} - -class PageStopJSCoverageParams { -} - -class PageStopJSCoverageResult { - List entries; - - static class PageStopJSCoverageResultEntries { - String url; - String scriptId; - String source; - List functions; - - static class PageStopJSCoverageResultEntriesFunctions { - String functionName; - Boolean isBlockCoverage; - List ranges; - - static class PageStopJSCoverageResultEntriesFunctionsRanges { - Integer startOffset; - Integer endOffset; - Integer count; - } - } - } -} - -class PageStartCSSCoverageParams { - Boolean resetOnNavigation; -} - -class PageStopCSSCoverageParams { -} - -class PageStopCSSCoverageResult { - List entries; - - static class PageStopCSSCoverageResultEntries { - String url; - String text; - List ranges; - - static class PageStopCSSCoverageResultEntriesRanges { - Integer start; - Integer end; - } - } -} - -class PageBringToFrontParams { -} - -class PagePickLocatorParams { -} - -class PagePickLocatorResult { - String selector; -} - -class PageCancelPickLocatorParams { -} - -class PageHideHighlightParams { -} - -class PageScreencastShowOverlayParams { - String html; - Double duration; -} - -class PageScreencastShowOverlayResult { - String id; -} - -class PageScreencastRemoveOverlayParams { - String id; -} - -class PageScreencastChapterParams { - String title; - String description; - Double duration; -} - -class PageScreencastSetOverlayVisibleParams { - Boolean visible; -} - -class PageScreencastShowActionsParams { - Double duration; - String position; - Integer fontSize; - String cursor; - PageScreencastShowActionsParamsStyle style; - - static class PageScreencastShowActionsParamsStyle { - String point; - String highlight; - String title; - } -} - -class PageScreencastHideActionsParams { -} - -class PageScreencastStartParams { - PageScreencastStartParamsSize size; - Integer quality; - Integer fps; - Boolean sendFrames; - Boolean record; - - static class PageScreencastStartParamsSize { - Integer width; - Integer height; - } -} - -class PageScreencastStartResult { - ArtifactImpl artifact; -} - -class PageScreencastFrameAckParams { - Integer frameId; -} - -class PageScreencastStopParams { -} - -class PageUpdateSubscriptionParams { - String event; - Boolean enabled; -} - -class PageSetDockTileParams { - byte[] image; -} - -class PageWebStorageItemsParams { - String kind; -} - -class PageWebStorageItemsResult { - List items; -} - -class PageWebStorageGetItemParams { - String kind; - String name; -} - -class PageWebStorageGetItemResult { - String value; -} - -class PageWebStorageSetItemParams { - String kind; - String name; - String value; -} - -class PageWebStorageRemoveItemParams { - String kind; - String name; -} - -class PageWebStorageClearParams { - String kind; -} - -class PageBindingCallEvent { - BindingCall binding; -} - -class PageCloseEvent { -} - -class PageCrashEvent { -} - -class PageDownloadEvent { - String url; - String suggestedFilename; - ArtifactImpl artifact; -} - -class PageViewportSizeChangedEvent { - PageViewportSizeChangedEventViewportSize viewportSize; - - static class PageViewportSizeChangedEventViewportSize { - Integer width; - Integer height; - } -} - -class PageFileChooserEvent { - ElementHandleImpl element; - Boolean isMultiple; -} - -class PageFrameAttachedEvent { - FrameImpl frame; -} - -class PageFrameDetachedEvent { - FrameImpl frame; -} - -class PageLocatorHandlerTriggeredEvent { - Integer uid; -} - -class PageRouteEvent { - RouteImpl route; -} - -class PageScreencastFrameEvent { - Integer frameId; - byte[] data; - Double timestamp; - Integer viewportWidth; - Integer viewportHeight; -} - -class PageWebSocketRouteEvent { - WebSocketRouteImpl webSocketRoute; -} - -class PageWebSocketEvent { - WebSocketImpl webSocket; -} - -class PageWorkerEvent { - WorkerImpl worker; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index 73dae53a4..ae532e651 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -1056,7 +1057,7 @@ public void clearPageErrors() { public List pageErrors() { PagePageErrorsResult json = channel.pageErrors(new PagePageErrorsParams(), NO_TIMEOUT); List result = new ArrayList<>(); - for (com.microsoft.playwright.impl.SerializedError item : json.errors) { + for (SerializedError item : json.errors) { String errorStr = ""; if (item.error != null) { errorStr = item.error.name + ": " + item.error.message; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java deleted file mode 100644 index 36cd31c13..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightChannel.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class PlaywrightChannel { - private final ChannelOwner owner; - - PlaywrightChannel(ChannelOwner owner) { - this.owner = owner; - } - - PlaywrightNewRequestResult newRequest(PlaywrightNewRequestParams params, Double timeout) { - return owner.sendMessage("newRequest", params, PlaywrightNewRequestResult.class, timeout); - } -} - -class PlaywrightInitializer { - BrowserTypeImpl chromium; - BrowserTypeImpl firefox; - BrowserTypeImpl webkit; - LocalUtils utils; - BrowserImpl preLaunchedBrowser; -} - -class PlaywrightNewRequestParams { - String baseURL; - String userAgent; - Boolean ignoreHTTPSErrors; - List extraHTTPHeaders; - Boolean failOnStatusCode; - List clientCertificates; - Integer maxRedirects; - List httpCredentials; - PlaywrightNewRequestParamsProxy proxy; - PlaywrightNewRequestParamsStorageState storageState; - String tracesDir; - - static class PlaywrightNewRequestParamsClientCertificates { - String origin; - byte[] cert; - byte[] key; - String passphrase; - byte[] pfx; - } - - static class PlaywrightNewRequestParamsProxy { - String server; - String bypass; - String username; - String password; - } - - static class PlaywrightNewRequestParamsStorageState { - List cookies; - List origins; - } -} - -class PlaywrightNewRequestResult { - APIRequestContextImpl request; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java index f6eaab61f..070e754ea 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/PlaywrightImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.microsoft.playwright.APIRequest; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java index ac4f56d60..835db2a2a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import java.util.List; class FrameExpectOptions { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java deleted file mode 100644 index 9712044dc..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolBrowserChannel.java +++ /dev/null @@ -1,362 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class ProtocolBrowserChannel { - private final ChannelOwner owner; - - ProtocolBrowserChannel(ChannelOwner owner) { - this.owner = owner; - } - - BrowserStartServerResult startServer(BrowserStartServerParams params, Double timeout) { - return owner.sendMessage("startServer", params, BrowserStartServerResult.class, timeout); - } - - void stopServer(BrowserStopServerParams params, Double timeout) { - owner.sendMessage("stopServer", params, timeout); - } - - void stopServer(Double timeout) { - stopServer(new BrowserStopServerParams(), timeout); - } - - void close(BrowserCloseParams params, Double timeout) { - owner.sendMessage("close", params, timeout); - } - - void killForTests(BrowserKillForTestsParams params, Double timeout) { - owner.sendMessage("killForTests", params, timeout); - } - - void killForTests(Double timeout) { - killForTests(new BrowserKillForTestsParams(), timeout); - } - - BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(BrowserDefaultUserAgentForTestParams params, Double timeout) { - return owner.sendMessage("defaultUserAgentForTest", params, BrowserDefaultUserAgentForTestResult.class, timeout); - } - - BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(Double timeout) { - return defaultUserAgentForTest(new BrowserDefaultUserAgentForTestParams(), timeout); - } - - BrowserNewContextResult newContext(BrowserNewContextParams params, Double timeout) { - return owner.sendMessage("newContext", params, BrowserNewContextResult.class, timeout); - } - - BrowserNewContextForReuseResult newContextForReuse(BrowserNewContextForReuseParams params, Double timeout) { - return owner.sendMessage("newContextForReuse", params, BrowserNewContextForReuseResult.class, timeout); - } - - void disconnectFromReusedContext(BrowserDisconnectFromReusedContextParams params, Double timeout) { - owner.sendMessage("disconnectFromReusedContext", params, timeout); - } - - BrowserNewBrowserCDPSessionResult newBrowserCDPSession(BrowserNewBrowserCDPSessionParams params, Double timeout) { - return owner.sendMessage("newBrowserCDPSession", params, BrowserNewBrowserCDPSessionResult.class, timeout); - } - - BrowserNewBrowserCDPSessionResult newBrowserCDPSession(Double timeout) { - return newBrowserCDPSession(new BrowserNewBrowserCDPSessionParams(), timeout); - } - - void startTracing(BrowserStartTracingParams params, Double timeout) { - owner.sendMessage("startTracing", params, timeout); - } - - BrowserStopTracingResult stopTracing(BrowserStopTracingParams params, Double timeout) { - return owner.sendMessage("stopTracing", params, BrowserStopTracingResult.class, timeout); - } - - BrowserStopTracingResult stopTracing(Double timeout) { - return stopTracing(new BrowserStopTracingParams(), timeout); - } -} - -class BrowserInitializer { - String version; - String name; - String browserName; -} - -class BrowserStartServerParams { - String title; - String workspaceDir; - JsonElement metadata; - String host; - Integer port; -} - -class BrowserStartServerResult { - String endpoint; -} - -class BrowserStopServerParams { -} - -class BrowserCloseParams { - String reason; -} - -class BrowserKillForTestsParams { -} - -class BrowserDefaultUserAgentForTestParams { -} - -class BrowserDefaultUserAgentForTestResult { - String userAgent; -} - -class BrowserNewContextParams { - Boolean noDefaultViewport; - BrowserNewContextParamsViewport viewport; - BrowserNewContextParamsScreen screen; - Boolean ignoreHTTPSErrors; - List clientCertificates; - Boolean javaScriptEnabled; - Boolean bypassCSP; - String userAgent; - String locale; - String timezoneId; - BrowserNewContextParamsGeolocation geolocation; - List permissions; - List extraHTTPHeaders; - Boolean offline; - List httpCredentials; - Double deviceScaleFactor; - Boolean isMobile; - Boolean hasTouch; - String colorScheme; - String reducedMotion; - String forcedColors; - String acceptDownloads; - String contrast; - String baseURL; - BrowserNewContextParamsRecordVideo recordVideo; - Boolean strictSelectors; - String serviceWorkers; - List selectorEngines; - String testIdAttributeName; - BrowserNewContextParamsProxy proxy; - BrowserNewContextParamsStorageState storageState; - - static class BrowserNewContextParamsViewport { - Integer width; - Integer height; - } - - static class BrowserNewContextParamsScreen { - Integer width; - Integer height; - } - - static class BrowserNewContextParamsClientCertificates { - String origin; - byte[] cert; - byte[] key; - String passphrase; - byte[] pfx; - } - - static class BrowserNewContextParamsGeolocation { - Double longitude; - Double latitude; - Double accuracy; - } - - static class BrowserNewContextParamsRecordVideo { - String dir; - BrowserNewContextParamsRecordVideoSize size; - Integer fps; - BrowserNewContextParamsRecordVideoShowActions showActions; - - static class BrowserNewContextParamsRecordVideoSize { - Integer width; - Integer height; - } - - static class BrowserNewContextParamsRecordVideoShowActions { - Double duration; - String position; - Integer fontSize; - String cursor; - BrowserNewContextParamsRecordVideoShowActionsStyle style; - - static class BrowserNewContextParamsRecordVideoShowActionsStyle { - String point; - String highlight; - String title; - } - } - } - - static class BrowserNewContextParamsProxy { - String server; - String bypass; - String username; - String password; - } - - static class BrowserNewContextParamsStorageState { - List cookies; - List origins; - List credentials; - } -} - -class BrowserNewContextResult { - BrowserContextImpl context; -} - -class BrowserNewContextForReuseParams { - Boolean noDefaultViewport; - BrowserNewContextForReuseParamsViewport viewport; - BrowserNewContextForReuseParamsScreen screen; - Boolean ignoreHTTPSErrors; - List clientCertificates; - Boolean javaScriptEnabled; - Boolean bypassCSP; - String userAgent; - String locale; - String timezoneId; - BrowserNewContextForReuseParamsGeolocation geolocation; - List permissions; - List extraHTTPHeaders; - Boolean offline; - List httpCredentials; - Double deviceScaleFactor; - Boolean isMobile; - Boolean hasTouch; - String colorScheme; - String reducedMotion; - String forcedColors; - String acceptDownloads; - String contrast; - String baseURL; - BrowserNewContextForReuseParamsRecordVideo recordVideo; - Boolean strictSelectors; - String serviceWorkers; - List selectorEngines; - String testIdAttributeName; - BrowserNewContextForReuseParamsProxy proxy; - BrowserNewContextForReuseParamsStorageState storageState; - - static class BrowserNewContextForReuseParamsViewport { - Integer width; - Integer height; - } - - static class BrowserNewContextForReuseParamsScreen { - Integer width; - Integer height; - } - - static class BrowserNewContextForReuseParamsClientCertificates { - String origin; - byte[] cert; - byte[] key; - String passphrase; - byte[] pfx; - } - - static class BrowserNewContextForReuseParamsGeolocation { - Double longitude; - Double latitude; - Double accuracy; - } - - static class BrowserNewContextForReuseParamsRecordVideo { - String dir; - BrowserNewContextForReuseParamsRecordVideoSize size; - Integer fps; - BrowserNewContextForReuseParamsRecordVideoShowActions showActions; - - static class BrowserNewContextForReuseParamsRecordVideoSize { - Integer width; - Integer height; - } - - static class BrowserNewContextForReuseParamsRecordVideoShowActions { - Double duration; - String position; - Integer fontSize; - String cursor; - BrowserNewContextForReuseParamsRecordVideoShowActionsStyle style; - - static class BrowserNewContextForReuseParamsRecordVideoShowActionsStyle { - String point; - String highlight; - String title; - } - } - } - - static class BrowserNewContextForReuseParamsProxy { - String server; - String bypass; - String username; - String password; - } - - static class BrowserNewContextForReuseParamsStorageState { - List cookies; - List origins; - List credentials; - } -} - -class BrowserNewContextForReuseResult { - BrowserContextImpl context; -} - -class BrowserDisconnectFromReusedContextParams { - String reason; -} - -class BrowserNewBrowserCDPSessionParams { -} - -class BrowserNewBrowserCDPSessionResult { - CDPSessionImpl session; -} - -class BrowserStartTracingParams { - PageImpl page; - Boolean screenshots; - List categories; -} - -class BrowserStopTracingParams { -} - -class BrowserStopTracingResult { - ArtifactImpl artifact; -} - -class BrowserContextEvent { - BrowserContextImpl context; -} - -class BrowserCloseEvent { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java b/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java deleted file mode 100644 index e09f05af9..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ProtocolStructs.java +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import com.google.gson.JsonElement; -import java.util.List; - -class AndroidWebView { - Integer pid; - String pkg; - String socketName; -} - -class AndroidSelector { - Boolean checkable; - Boolean checked; - String clazz; - Boolean clickable; - Integer depth; - String desc; - Boolean enabled; - Boolean focusable; - Boolean focused; - AndroidSelectorHasChild hasChild; - AndroidSelectorHasDescendant hasDescendant; - Boolean longClickable; - String pkg; - String res; - Boolean scrollable; - Boolean selected; - String text; - - static class AndroidSelectorHasChild { - } - - static class AndroidSelectorHasDescendant { - Integer maxDepth; - } -} - -class AndroidElementInfo { - String clazz; - String desc; - String res; - String pkg; - String text; - Rect bounds; - Boolean checkable; - Boolean checked; - Boolean clickable; - Boolean enabled; - Boolean focusable; - Boolean focused; - Boolean longClickable; - Boolean scrollable; - Boolean selected; -} - -class ProtocolAPIResponse { - String fetchUid; - String url; - Integer status; - String statusText; - List headers; - ProtocolSecurityDetails securityDetails; - RemoteAddr serverAddr; - ResourceTiming timing; - Double responseEndTiming; -} - -class Metadata { - MetadataLocation location; - String title; - Boolean internal; - Double timeout; - - static class MetadataLocation { - String file; - Integer line; - Integer column; - } -} - -class ClientSideCallMetadata { - String id; - List stack; -} - -class SDKLanguage { - static final String JAVASCRIPT = "javascript"; - static final String PYTHON = "python"; - static final String JAVA = "java"; - static final String CSHARP = "csharp"; -} - -class WaitInfo { - String waitId; - String phase; - String event; - String message; - String error; -} - -class ProtocolHttpCredentials { - String username; - String password; - String origin; - String send; -} - -class SetNetworkCookie { - String name; - String value; - String url; - String domain; - String path; - Double expires; - Boolean httpOnly; - Boolean secure; - String sameSite; - String partitionKey; - Boolean _crHasCrossSiteAncestor; -} - -class NetworkCookie { - String name; - String value; - String domain; - String path; - Double expires; - Boolean httpOnly; - Boolean secure; - String sameSite; - String partitionKey; - Boolean _crHasCrossSiteAncestor; -} - -class ResourceTiming { - Double startTime; - Double domainLookupStart; - Double domainLookupEnd; - Double connectStart; - Double secureConnectionStart; - Double connectEnd; - Double requestStart; - Double responseStart; -} - -class ProtocolSecurityDetails { - String issuer; - String protocol; - String subjectName; - Double validFrom; - Double validTo; -} - -class RequestSizes { - Integer requestBodySize; - Integer requestHeadersSize; - Integer responseBodySize; - Integer responseHeadersSize; -} - -class RemoteAddr { - String ipAddress; - Integer port; -} - -class ExpectedTextValue { - String string; - String regexSource; - String regexFlags; - Boolean matchSubstring; - Boolean ignoreCase; - Boolean normalizeWhiteSpace; -} - -class SelectorEngine { - String name; - String source; - Boolean contentScript; -} - -class FormField { - String name; - String value; - FormFieldFile file; - - static class FormFieldFile { - String name; - String mimeType; - byte[] buffer; - } -} - -class LifecycleEvent { - static final String LOAD = "load"; - static final String DOMCONTENTLOADED = "domcontentloaded"; - static final String NETWORKIDLE = "networkidle"; - static final String COMMIT = "commit"; -} - -class ProtocolConsoleMessagesFilter { - static final String ALL = "all"; - static final String SINCE_NAVIGATION = "since-navigation"; -} - -class RecorderSource { - Boolean isRecorded; - String id; - String label; - String text; - String language; - List highlight; - Integer revealLine; - String group; - - static class RecorderSourceHighlight { - Integer line; - String type; - } -} - -class IndexedDBDatabase { - String name; - Integer version; - List stores; - - static class IndexedDBDatabaseStores { - String name; - Boolean autoIncrement; - String keyPath; - List keyPathArray; - List records; - List indexes; - - static class IndexedDBDatabaseStoresRecords { - JsonElement key; - JsonElement keyEncoded; - JsonElement value; - JsonElement valueEncoded; - } - - static class IndexedDBDatabaseStoresIndexes { - String name; - String keyPath; - List keyPathArray; - Boolean multiEntry; - Boolean unique; - } - } -} - -class OPFSEntry { - String path; - String type; - String base64; -} - -class SetOriginStorage { - String origin; - List localStorage; - List indexedDB; - List opfs; -} - -class OriginStorage { - String origin; - List localStorage; - List indexedDB; - List opfs; -} - -class RecordHarOptions { - String content; - String mode; - String urlGlob; - String urlRegexSource; - String urlRegexFlags; - String harPath; - String resourcesDir; -} - -class SerializedValue { - Double n; - Boolean b; - String s; - String v; - String d; - String u; - String bi; - SerializedValueTa ta; - SerializedValueE e; - SerializedValueR r; - List a; - List o; - Integer h; - String fn; - Integer id; - Integer ref; - - static class SerializedValueTa { - byte[] b; - String k; - } - - static class SerializedValueE { - String m; - String n; - String s; - } - - static class SerializedValueR { - String p; - String f; - } - - static class SerializedValueO { - String k; - SerializedValue v; - } -} - -class SerializedArgument { - SerializedValue value; - List handles; -} - -class SerializedError { - SerializedErrorError error; - SerializedValue value; - - static class SerializedErrorError { - String message; - String name; - String stack; - String code; - } -} - -class StackFrame { - String file; - Integer line; - Integer column; - String function; -} - -class ProtocolVirtualCredential { - String id; - String rpId; - String userHandle; - String privateKey; - String publicKey; - Integer signCount; -} - -class SetVirtualCredential { - String id; - String rpId; - String userHandle; - String privateKey; - String publicKey; - Integer signCount; -} - -class Point { - Double x; - Double y; -} - -class Rect { - Double x; - Double y; - Double width; - Double height; -} - -class URLPattern { - String hash; - String hostname; - String password; - String pathname; - String port; - String protocol; - String search; - String username; -} - -class NameValue { - String name; - String value; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java index 837a90263..4576d556d 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java deleted file mode 100644 index 7de880044..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseChannel.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class ResponseChannel { - private final ChannelOwner owner; - - ResponseChannel(ChannelOwner owner) { - this.owner = owner; - } - - ResponseBodyResult body(ResponseBodyParams params, Double timeout) { - return owner.sendMessage("body", params, ResponseBodyResult.class, timeout); - } - - ResponseBodyResult body(Double timeout) { - return body(new ResponseBodyParams(), timeout); - } - - ResponseSecurityDetailsResult securityDetails(ResponseSecurityDetailsParams params, Double timeout) { - return owner.sendMessage("securityDetails", params, ResponseSecurityDetailsResult.class, timeout); - } - - ResponseSecurityDetailsResult securityDetails(Double timeout) { - return securityDetails(new ResponseSecurityDetailsParams(), timeout); - } - - ResponseServerAddrResult serverAddr(ResponseServerAddrParams params, Double timeout) { - return owner.sendMessage("serverAddr", params, ResponseServerAddrResult.class, timeout); - } - - ResponseServerAddrResult serverAddr(Double timeout) { - return serverAddr(new ResponseServerAddrParams(), timeout); - } - - ResponseRawResponseHeadersResult rawResponseHeaders(ResponseRawResponseHeadersParams params, Double timeout) { - return owner.sendMessage("rawResponseHeaders", params, ResponseRawResponseHeadersResult.class, timeout); - } - - ResponseRawResponseHeadersResult rawResponseHeaders(Double timeout) { - return rawResponseHeaders(new ResponseRawResponseHeadersParams(), timeout); - } - - ResponseHttpVersionResult httpVersion(ResponseHttpVersionParams params, Double timeout) { - return owner.sendMessage("httpVersion", params, ResponseHttpVersionResult.class, timeout); - } - - ResponseHttpVersionResult httpVersion(Double timeout) { - return httpVersion(new ResponseHttpVersionParams(), timeout); - } - - ResponseSizesResult sizes(ResponseSizesParams params, Double timeout) { - return owner.sendMessage("sizes", params, ResponseSizesResult.class, timeout); - } - - ResponseSizesResult sizes(Double timeout) { - return sizes(new ResponseSizesParams(), timeout); - } -} - -class ResponseInitializer { - RequestImpl request; - String url; - Integer status; - String statusText; - List headers; - ResourceTiming timing; - Boolean fromServiceWorker; -} - -class ResponseBodyParams { -} - -class ResponseBodyResult { - byte[] binary; -} - -class ResponseSecurityDetailsParams { -} - -class ResponseSecurityDetailsResult { - ProtocolSecurityDetails value; -} - -class ResponseServerAddrParams { -} - -class ResponseServerAddrResult { - RemoteAddr value; -} - -class ResponseRawResponseHeadersParams { -} - -class ResponseRawResponseHeadersResult { - List headers; -} - -class ResponseHttpVersionParams { -} - -class ResponseHttpVersionResult { - String value; -} - -class ResponseSizesParams { -} - -class ResponseSizesResult { - RequestSizes sizes; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java index 3c985448f..ec554b2b5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ResponseImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.Frame; import com.microsoft.playwright.Response; @@ -126,7 +127,7 @@ public RequestImpl request() { @Override public SecurityDetails securityDetails() { - ProtocolSecurityDetails value = channel.securityDetails(NO_TIMEOUT).value; + com.microsoft.playwright.impl.protocol.SecurityDetails value = channel.securityDetails(NO_TIMEOUT).value; if (value == null) { return null; } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java index 38e8eec12..38846d6e4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/RouteImpl.java @@ -16,8 +16,10 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.*; +import com.microsoft.playwright.APIResponse; import com.microsoft.playwright.options.RequestOptions; import java.io.IOException; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java index 2f49dc8d5..7dd0adba1 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/ScreencastImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Screencast; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java index 0d6fd9141..cbf8ff602 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/SelectorsImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Selectors; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java index 53c327166..deffadc5a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Serialization.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.*; import com.google.gson.reflect.TypeToken; import com.google.gson.stream.JsonReader; @@ -23,6 +24,8 @@ import com.microsoft.playwright.ElementHandle; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.options.*; +import com.microsoft.playwright.options.BrowserChannel; +import com.microsoft.playwright.options.ConsoleMessagesFilter; import java.io.*; import java.lang.reflect.Type; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java index ea2416719..e6939a88f 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import java.io.IOException; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java index fcde7a8bf..71e9c1cc0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Touchscreen; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java deleted file mode 100644 index 2250e11ef..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TracingChannel.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class TracingChannel { - private final ChannelOwner owner; - - TracingChannel(ChannelOwner owner) { - this.owner = owner; - } - - void tracingStart(TracingTracingStartParams params, Double timeout) { - owner.sendMessage("tracingStart", params, timeout); - } - - TracingTracingStartChunkResult tracingStartChunk(TracingTracingStartChunkParams params, Double timeout) { - return owner.sendMessage("tracingStartChunk", params, TracingTracingStartChunkResult.class, timeout); - } - - void tracingGroup(TracingTracingGroupParams params, Double timeout) { - owner.sendMessage("tracingGroup", params, timeout); - } - - void tracingGroupEnd(TracingTracingGroupEndParams params, Double timeout) { - owner.sendMessage("tracingGroupEnd", params, timeout); - } - - void tracingGroupEnd(Double timeout) { - tracingGroupEnd(new TracingTracingGroupEndParams(), timeout); - } - - TracingTracingStopChunkResult tracingStopChunk(TracingTracingStopChunkParams params, Double timeout) { - return owner.sendMessage("tracingStopChunk", params, TracingTracingStopChunkResult.class, timeout); - } - - void tracingStop(TracingTracingStopParams params, Double timeout) { - owner.sendMessage("tracingStop", params, timeout); - } - - void tracingStop(Double timeout) { - tracingStop(new TracingTracingStopParams(), timeout); - } - - TracingHarStartResult harStart(TracingHarStartParams params, Double timeout) { - return owner.sendMessage("harStart", params, TracingHarStartResult.class, timeout); - } - - TracingHarExportResult harExport(TracingHarExportParams params, Double timeout) { - return owner.sendMessage("harExport", params, TracingHarExportResult.class, timeout); - } -} - -class TracingInitializer { -} - -class TracingTracingStartParams { - String name; - Boolean snapshotDom; - Boolean snapshotAria; - Boolean snapshotScreen; - Boolean screencast; - Boolean coverage; - Boolean live; -} - -class TracingTracingStartChunkParams { - String name; - String title; -} - -class TracingTracingStartChunkResult { - String traceName; -} - -class TracingTracingGroupParams { - String name; - TracingTracingGroupParamsLocation location; - - static class TracingTracingGroupParamsLocation { - String file; - Integer line; - Integer column; - } -} - -class TracingTracingGroupEndParams { -} - -class TracingTracingStopChunkParams { - String mode; -} - -class TracingTracingStopChunkResult { - ArtifactImpl artifact; - List entries; -} - -class TracingTracingStopParams { -} - -class TracingHarStartParams { - PageImpl page; - RecordHarOptions options; -} - -class TracingHarStartResult { - String harId; -} - -class TracingHarExportParams { - String harId; - String mode; -} - -class TracingHarExportResult { - ArtifactImpl artifact; - List entries; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java index 43330d172..3ee126d9b 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Tracing; @@ -34,7 +35,7 @@ import static com.microsoft.playwright.impl.Utils.toProtocol; -class TracingImpl extends ChannelOwner implements Tracing { +public class TracingImpl extends ChannelOwner implements Tracing { private boolean includeSources; private Path tracesDir; private boolean isTracing; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index f17c16e5e..e39c0d2c7 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java index df37a5724..639ca4cee 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebMCPImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.WebMCP; import com.microsoft.playwright.options.WebMCPTool; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java index 000daee5d..4edc44fa5 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.WebSocket; @@ -26,7 +27,7 @@ import java.util.function.Consumer; import java.util.function.Predicate; -class WebSocketImpl extends ChannelOwner implements WebSocket { +public class WebSocketImpl extends ChannelOwner implements WebSocket { private final ListenerCollection listeners = new ListenerCollection<>(); private final PageImpl page; private boolean isClosed; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java deleted file mode 100644 index d95b378b4..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteChannel.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class WebSocketRouteChannel { - private final ChannelOwner owner; - - WebSocketRouteChannel(ChannelOwner owner) { - this.owner = owner; - } - - void connect(WebSocketRouteConnectParams params, Double timeout) { - owner.sendMessage("connect", params, timeout); - } - - void connect(Double timeout) { - connect(new WebSocketRouteConnectParams(), timeout); - } - - void ensureOpened(WebSocketRouteEnsureOpenedParams params, Double timeout) { - owner.sendMessage("ensureOpened", params, timeout); - } - - void ensureOpened(Double timeout) { - ensureOpened(new WebSocketRouteEnsureOpenedParams(), timeout); - } - - void sendToPage(WebSocketRouteSendToPageParams params, Double timeout) { - owner.sendMessage("sendToPage", params, timeout); - } - - void sendToServer(WebSocketRouteSendToServerParams params, Double timeout) { - owner.sendMessage("sendToServer", params, timeout); - } - - void closePage(WebSocketRouteClosePageParams params, Double timeout) { - owner.sendMessage("closePage", params, timeout); - } - - void closeServer(WebSocketRouteCloseServerParams params, Double timeout) { - owner.sendMessage("closeServer", params, timeout); - } -} - -class WebSocketRouteInitializer { - String url; - List protocols; -} - -class WebSocketRouteConnectParams { -} - -class WebSocketRouteEnsureOpenedParams { -} - -class WebSocketRouteSendToPageParams { - String message; - Boolean isBase64; -} - -class WebSocketRouteSendToServerParams { - String message; - Boolean isBase64; -} - -class WebSocketRouteClosePageParams { - Integer code; - String reason; - Boolean wasClean; -} - -class WebSocketRouteCloseServerParams { - Integer code; - String reason; - Boolean wasClean; -} - -class WebSocketRouteMessageFromPageEvent { - String message; - Boolean isBase64; -} - -class WebSocketRouteMessageFromServerEvent { - String message; - Boolean isBase64; -} - -class WebSocketRouteClosePageEvent { - Integer code; - String reason; - Boolean wasClean; -} - -class WebSocketRouteCloseServerEvent { - Integer code; - String reason; - Boolean wasClean; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java index b1a6e66ee..1003f0a61 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketRouteImpl.java @@ -1,5 +1,6 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; @@ -14,7 +15,7 @@ import static com.microsoft.playwright.impl.Utils.toProtocol; -class WebSocketRouteImpl extends ChannelOwner implements WebSocketRoute { +public class WebSocketRouteImpl extends ChannelOwner implements WebSocketRoute { private Consumer onPageMessage; private BiConsumer onPageClose; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java index 48bc58425..19461c1f1 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WebStorageImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.WebStorage; import com.microsoft.playwright.options.WebStorageItem; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java deleted file mode 100644 index a3f47eb21..000000000 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerChannel.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// This file is generated by scripts/generate_java_channels.js, do not edit manually. - -package com.microsoft.playwright.impl; - -import java.util.List; - -class WorkerChannel { - private final ChannelOwner owner; - - WorkerChannel(ChannelOwner owner) { - this.owner = owner; - } - - void disconnect(WorkerDisconnectParams params, Double timeout) { - owner.sendMessage("disconnect", params, timeout); - } - - WorkerEvaluateExpressionResult evaluateExpression(WorkerEvaluateExpressionParams params, Double timeout) { - return owner.sendMessage("evaluateExpression", params, WorkerEvaluateExpressionResult.class, timeout); - } - - WorkerEvaluateExpressionHandleResult evaluateExpressionHandle(WorkerEvaluateExpressionHandleParams params, Double timeout) { - return owner.sendMessage("evaluateExpressionHandle", params, WorkerEvaluateExpressionHandleResult.class, timeout); - } - - void updateSubscription(WorkerUpdateSubscriptionParams params, Double timeout) { - owner.sendMessage("updateSubscription", params, timeout); - } -} - -class WorkerInitializer { - String url; -} - -class WorkerDisconnectParams { - String reason; -} - -class WorkerEvaluateExpressionParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class WorkerEvaluateExpressionResult { - SerializedValue value; -} - -class WorkerEvaluateExpressionHandleParams { - String expression; - Boolean isFunction; - SerializedArgument arg; -} - -class WorkerEvaluateExpressionHandleResult { - JSHandleImpl handle; -} - -class WorkerUpdateSubscriptionParams { - String event; - Boolean enabled; -} - -class WorkerConsoleEvent { - String type; - String text; - List args; - WorkerConsoleEventLocation location; - Double timestamp; - - static class WorkerConsoleEventLocation { - String url; - Integer lineNumber; - Integer columnNumber; - } -} - -class WorkerCloseEvent { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java index cf543254b..4004f45b0 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WorkerImpl.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.microsoft.playwright.ConsoleMessage; @@ -30,7 +31,7 @@ import static com.microsoft.playwright.impl.Serialization.*; -class WorkerImpl extends ChannelOwner implements Worker { +public class WorkerImpl extends ChannelOwner implements Worker { final ListenerCollection listeners = new ListenerCollection<>(); PageImpl page; diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java index f4d5d8fe6..de274de73 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/WritableStream.java @@ -16,6 +16,7 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import java.io.IOException; @@ -24,7 +25,7 @@ import java.nio.charset.StandardCharsets; import java.util.Arrays; -class WritableStream extends ChannelOwner { +public class WritableStream extends ChannelOwner { final WritableStreamChannel channel = new WritableStreamChannel(this); WritableStream(ChannelOwner parent, String type, String guid, JsonObject initializer) { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextAddCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextAddCookiesParams.java new file mode 100644 index 000000000..8c3960613 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextAddCookiesParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextAddCookiesParams { + public List cookies; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextChannel.java new file mode 100644 index 000000000..00b4e28a8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextChannel.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public APIRequestContextChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public APIRequestContextFetchResult fetch(APIRequestContextFetchParams params, Double timeout) { + return owner.sendMessage("fetch", params, APIRequestContextFetchResult.class, timeout); + } + + public APIRequestContextFetchResponseBodyResult fetchResponseBody(APIRequestContextFetchResponseBodyParams params, Double timeout) { + return owner.sendMessage("fetchResponseBody", params, APIRequestContextFetchResponseBodyResult.class, timeout); + } + + public APIRequestContextFetchLogResult fetchLog(APIRequestContextFetchLogParams params, Double timeout) { + return owner.sendMessage("fetchLog", params, APIRequestContextFetchLogResult.class, timeout); + } + + public void addCookies(APIRequestContextAddCookiesParams params, Double timeout) { + owner.sendMessage("addCookies", params, timeout); + } + + public void clearCookies(APIRequestContextClearCookiesParams params, Double timeout) { + owner.sendMessage("clearCookies", params, timeout); + } + + public APIRequestContextCookiesResult cookies(APIRequestContextCookiesParams params, Double timeout) { + return owner.sendMessage("cookies", params, APIRequestContextCookiesResult.class, timeout); + } + + public APIRequestContextStorageStateResult storageState(APIRequestContextStorageStateParams params, Double timeout) { + return owner.sendMessage("storageState", params, APIRequestContextStorageStateResult.class, timeout); + } + + public void disposeAPIResponse(APIRequestContextDisposeAPIResponseParams params, Double timeout) { + owner.sendMessage("disposeAPIResponse", params, timeout); + } + + public void dispose(APIRequestContextDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextClearCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextClearCookiesParams.java new file mode 100644 index 000000000..7a1ec60bc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextClearCookiesParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextClearCookiesParams { + public String name; + public String nameRegexSource; + public String nameRegexFlags; + public String domain; + public String domainRegexSource; + public String domainRegexFlags; + public String path; + public String pathRegexSource; + public String pathRegexFlags; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesParams.java new file mode 100644 index 000000000..dbdfc0c17 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextCookiesParams { + public List urls; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesResult.java new file mode 100644 index 000000000..4cd2240e6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextCookiesResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextCookiesResult { + public List cookies; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeAPIResponseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeAPIResponseParams.java new file mode 100644 index 000000000..4668c4114 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeAPIResponseParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextDisposeAPIResponseParams { + public String fetchUid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeParams.java new file mode 100644 index 000000000..312f7fcd1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextDisposeParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextDisposeParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogParams.java new file mode 100644 index 000000000..b6588966f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextFetchLogParams { + public String fetchUid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogResult.java new file mode 100644 index 000000000..39ece887f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchLogResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextFetchLogResult { + public List log; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchParams.java new file mode 100644 index 000000000..e6373a13f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchParams.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextFetchParams { + public String url; + public String encodedParams; + public List params; + public String method; + public List headers; + public byte[] postData; + public String jsonData; + public List formData; + public List multipartData; + public Boolean failOnStatusCode; + public Boolean ignoreHTTPSErrors; + public Integer maxRedirects; + public Integer maxRetries; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyParams.java new file mode 100644 index 000000000..2fd937ba2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextFetchResponseBodyParams { + public String fetchUid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyResult.java new file mode 100644 index 000000000..c8e4f3760 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResponseBodyResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextFetchResponseBodyResult { + public byte[] binary; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResult.java new file mode 100644 index 000000000..0e163695d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextFetchResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextFetchResult { + public APIResponse response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextInitializer.java new file mode 100644 index 000000000..8dca25cbf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextInitializer { + public com.microsoft.playwright.impl.TracingImpl tracing; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateParams.java new file mode 100644 index 000000000..432dac9de --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class APIRequestContextStorageStateParams { + public Boolean indexedDB; + public Boolean opfs; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateResult.java new file mode 100644 index 000000000..259379e40 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIRequestContextStorageStateResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIRequestContextStorageStateResult { + public List cookies; + public List origins; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIResponse.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIResponse.java new file mode 100644 index 000000000..a3182c64c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/APIResponse.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class APIResponse { + public String fetchUid; + public String url; + public Integer status; + public String statusText; + public List headers; + public SecurityDetails securityDetails; + public RemoteAddr serverAddr; + public ResourceTiming timing; + public Double responseEndTiming; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidElementInfo.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidElementInfo.java new file mode 100644 index 000000000..a5fcf528d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidElementInfo.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class AndroidElementInfo { + public String clazz; + public String desc; + public String res; + public String pkg; + public String text; + public Rect bounds; + public Boolean checkable; + public Boolean checked; + public Boolean clickable; + public Boolean enabled; + public Boolean focusable; + public Boolean focused; + public Boolean longClickable; + public Boolean scrollable; + public Boolean selected; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidSelector.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidSelector.java new file mode 100644 index 000000000..4c8019c28 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidSelector.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class AndroidSelector { + public Boolean checkable; + public Boolean checked; + public String clazz; + public Boolean clickable; + public Integer depth; + public String desc; + public Boolean enabled; + public Boolean focusable; + public Boolean focused; + public AndroidSelectorHasChild hasChild; + public AndroidSelectorHasDescendant hasDescendant; + public Boolean longClickable; + public String pkg; + public String res; + public Boolean scrollable; + public Boolean selected; + public String text; + + public static class AndroidSelectorHasChild { + } + + public static class AndroidSelectorHasDescendant { + public Integer maxDepth; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidWebView.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidWebView.java new file mode 100644 index 000000000..9c92b9383 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/AndroidWebView.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class AndroidWebView { + public Integer pid; + public String pkg; + public String socketName; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactCancelParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactCancelParams.java new file mode 100644 index 000000000..a8aa02c26 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactCancelParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactCancelParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactChannel.java similarity index 53% rename from playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactChannel.java index abd7c4eed..95e0a9f4a 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactChannel.java @@ -16,106 +16,64 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class ArtifactChannel { - private final ChannelOwner owner; +public class ArtifactChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - ArtifactChannel(ChannelOwner owner) { + public ArtifactChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - ArtifactPathAfterFinishedResult pathAfterFinished(ArtifactPathAfterFinishedParams params, Double timeout) { + public ArtifactPathAfterFinishedResult pathAfterFinished(ArtifactPathAfterFinishedParams params, Double timeout) { return owner.sendMessage("pathAfterFinished", params, ArtifactPathAfterFinishedResult.class, timeout); } - ArtifactPathAfterFinishedResult pathAfterFinished(Double timeout) { + public ArtifactPathAfterFinishedResult pathAfterFinished(Double timeout) { return pathAfterFinished(new ArtifactPathAfterFinishedParams(), timeout); } - void saveAs(ArtifactSaveAsParams params, Double timeout) { + public void saveAs(ArtifactSaveAsParams params, Double timeout) { owner.sendMessage("saveAs", params, timeout); } - ArtifactSaveAsStreamResult saveAsStream(ArtifactSaveAsStreamParams params, Double timeout) { + public ArtifactSaveAsStreamResult saveAsStream(ArtifactSaveAsStreamParams params, Double timeout) { return owner.sendMessage("saveAsStream", params, ArtifactSaveAsStreamResult.class, timeout); } - ArtifactSaveAsStreamResult saveAsStream(Double timeout) { + public ArtifactSaveAsStreamResult saveAsStream(Double timeout) { return saveAsStream(new ArtifactSaveAsStreamParams(), timeout); } - ArtifactFailureResult failure(ArtifactFailureParams params, Double timeout) { + public ArtifactFailureResult failure(ArtifactFailureParams params, Double timeout) { return owner.sendMessage("failure", params, ArtifactFailureResult.class, timeout); } - ArtifactFailureResult failure(Double timeout) { + public ArtifactFailureResult failure(Double timeout) { return failure(new ArtifactFailureParams(), timeout); } - ArtifactStreamResult stream(ArtifactStreamParams params, Double timeout) { + public ArtifactStreamResult stream(ArtifactStreamParams params, Double timeout) { return owner.sendMessage("stream", params, ArtifactStreamResult.class, timeout); } - ArtifactStreamResult stream(Double timeout) { + public ArtifactStreamResult stream(Double timeout) { return stream(new ArtifactStreamParams(), timeout); } - void cancel(ArtifactCancelParams params, Double timeout) { + public void cancel(ArtifactCancelParams params, Double timeout) { owner.sendMessage("cancel", params, timeout); } - void cancel(Double timeout) { + public void cancel(Double timeout) { cancel(new ArtifactCancelParams(), timeout); } - void delete(ArtifactDeleteParams params, Double timeout) { + public void delete(ArtifactDeleteParams params, Double timeout) { owner.sendMessage("delete", params, timeout); } - void delete(Double timeout) { + public void delete(Double timeout) { delete(new ArtifactDeleteParams(), timeout); } } - -class ArtifactInitializer { - String absolutePath; -} - -class ArtifactPathAfterFinishedParams { -} - -class ArtifactPathAfterFinishedResult { - String value; -} - -class ArtifactSaveAsParams { - String path; -} - -class ArtifactSaveAsStreamParams { -} - -class ArtifactSaveAsStreamResult { - Stream stream; -} - -class ArtifactFailureParams { -} - -class ArtifactFailureResult { - String error; -} - -class ArtifactStreamParams { -} - -class ArtifactStreamResult { - Stream stream; -} - -class ArtifactCancelParams { -} - -class ArtifactDeleteParams { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactDeleteParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactDeleteParams.java new file mode 100644 index 000000000..9413c366c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactDeleteParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactDeleteParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureParams.java new file mode 100644 index 000000000..7c97d53a0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactFailureParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureResult.java new file mode 100644 index 000000000..a3bfc4983 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactFailureResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactFailureResult { + public String error; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactInitializer.java new file mode 100644 index 000000000..55ddfc431 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactInitializer { + public String absolutePath; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedParams.java new file mode 100644 index 000000000..08c403761 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactPathAfterFinishedParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedResult.java new file mode 100644 index 000000000..0f2fc159c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactPathAfterFinishedResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactPathAfterFinishedResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsParams.java new file mode 100644 index 000000000..2793e88ac --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactSaveAsParams { + public String path; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamParams.java new file mode 100644 index 000000000..754d2d951 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactSaveAsStreamParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamResult.java new file mode 100644 index 000000000..19d22aef2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactSaveAsStreamResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactSaveAsStreamResult { + public com.microsoft.playwright.impl.Stream stream; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamParams.java new file mode 100644 index 000000000..5d974ae28 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactStreamParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamResult.java new file mode 100644 index 000000000..13688c780 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactStreamResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ArtifactStreamResult { + public com.microsoft.playwright.impl.Stream stream; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallChannel.java similarity index 61% rename from playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallChannel.java index 66bb530e6..cc1cbecce 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/BindingCallChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallChannel.java @@ -16,36 +16,20 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -import java.util.List; +public class BindingCallChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; -class BindingCallChannel { - private final ChannelOwner owner; - - BindingCallChannel(ChannelOwner owner) { + public BindingCallChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void reject(BindingCallRejectParams params, Double timeout) { + public void reject(BindingCallRejectParams params, Double timeout) { owner.sendMessage("reject", params, timeout); } - void resolve(BindingCallResolveParams params, Double timeout) { + public void resolve(BindingCallResolveParams params, Double timeout) { owner.sendMessage("resolve", params, timeout); } } - -class BindingCallInitializer { - FrameImpl frame; - String name; - List args; -} - -class BindingCallRejectParams { - SerializedError error; -} - -class BindingCallResolveParams { - SerializedArgument result; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallInitializer.java new file mode 100644 index 000000000..7a285447c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallInitializer.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BindingCallInitializer { + public com.microsoft.playwright.impl.FrameImpl frame; + public String name; + public List args; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallRejectParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallRejectParams.java new file mode 100644 index 000000000..90315723f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallRejectParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BindingCallRejectParams { + public SerializedError error; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallResolveParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallResolveParams.java new file mode 100644 index 000000000..1b99eafdc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallResolveParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BindingCallResolveParams { + public SerializedArgument result; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserChannel.java new file mode 100644 index 000000000..2b1a0e038 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserChannel.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public BrowserChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public BrowserStartServerResult startServer(BrowserStartServerParams params, Double timeout) { + return owner.sendMessage("startServer", params, BrowserStartServerResult.class, timeout); + } + + public void stopServer(BrowserStopServerParams params, Double timeout) { + owner.sendMessage("stopServer", params, timeout); + } + + public void stopServer(Double timeout) { + stopServer(new BrowserStopServerParams(), timeout); + } + + public void close(BrowserCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public void killForTests(BrowserKillForTestsParams params, Double timeout) { + owner.sendMessage("killForTests", params, timeout); + } + + public void killForTests(Double timeout) { + killForTests(new BrowserKillForTestsParams(), timeout); + } + + public BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(BrowserDefaultUserAgentForTestParams params, Double timeout) { + return owner.sendMessage("defaultUserAgentForTest", params, BrowserDefaultUserAgentForTestResult.class, timeout); + } + + public BrowserDefaultUserAgentForTestResult defaultUserAgentForTest(Double timeout) { + return defaultUserAgentForTest(new BrowserDefaultUserAgentForTestParams(), timeout); + } + + public BrowserNewContextResult newContext(BrowserNewContextParams params, Double timeout) { + return owner.sendMessage("newContext", params, BrowserNewContextResult.class, timeout); + } + + public BrowserNewContextForReuseResult newContextForReuse(BrowserNewContextForReuseParams params, Double timeout) { + return owner.sendMessage("newContextForReuse", params, BrowserNewContextForReuseResult.class, timeout); + } + + public void disconnectFromReusedContext(BrowserDisconnectFromReusedContextParams params, Double timeout) { + owner.sendMessage("disconnectFromReusedContext", params, timeout); + } + + public BrowserNewBrowserCDPSessionResult newBrowserCDPSession(BrowserNewBrowserCDPSessionParams params, Double timeout) { + return owner.sendMessage("newBrowserCDPSession", params, BrowserNewBrowserCDPSessionResult.class, timeout); + } + + public BrowserNewBrowserCDPSessionResult newBrowserCDPSession(Double timeout) { + return newBrowserCDPSession(new BrowserNewBrowserCDPSessionParams(), timeout); + } + + public void startTracing(BrowserStartTracingParams params, Double timeout) { + owner.sendMessage("startTracing", params, timeout); + } + + public BrowserStopTracingResult stopTracing(BrowserStopTracingParams params, Double timeout) { + return owner.sendMessage("stopTracing", params, BrowserStopTracingResult.class, timeout); + } + + public BrowserStopTracingResult stopTracing(Double timeout) { + return stopTracing(new BrowserStopTracingParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseEvent.java new file mode 100644 index 000000000..fdba935c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseParams.java new file mode 100644 index 000000000..89e91d324 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserCloseParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserCloseParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddCookiesParams.java new file mode 100644 index 000000000..e9d0d0276 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddCookiesParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextAddCookiesParams { + public List cookies; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptParams.java new file mode 100644 index 000000000..249b29825 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextAddInitScriptParams { + public String source; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptResult.java new file mode 100644 index 000000000..a98f53463 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextAddInitScriptResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextAddInitScriptResult { + public com.microsoft.playwright.impl.DisposableObject disposable; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextBindingCallEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextBindingCallEvent.java new file mode 100644 index 000000000..3d7cdada9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextBindingCallEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextBindingCallEvent { + public com.microsoft.playwright.impl.BindingCall binding; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextChannel.java new file mode 100644 index 000000000..b64e070ff --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextChannel.java @@ -0,0 +1,207 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public BrowserContextChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void addCookies(BrowserContextAddCookiesParams params, Double timeout) { + owner.sendMessage("addCookies", params, timeout); + } + + public BrowserContextAddInitScriptResult addInitScript(BrowserContextAddInitScriptParams params, Double timeout) { + return owner.sendMessage("addInitScript", params, BrowserContextAddInitScriptResult.class, timeout); + } + + public void clearCookies(BrowserContextClearCookiesParams params, Double timeout) { + owner.sendMessage("clearCookies", params, timeout); + } + + public void clearPermissions(BrowserContextClearPermissionsParams params, Double timeout) { + owner.sendMessage("clearPermissions", params, timeout); + } + + public void clearPermissions(Double timeout) { + clearPermissions(new BrowserContextClearPermissionsParams(), timeout); + } + + public void close(BrowserContextCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public BrowserContextCookiesResult cookies(BrowserContextCookiesParams params, Double timeout) { + return owner.sendMessage("cookies", params, BrowserContextCookiesResult.class, timeout); + } + + public BrowserContextExposeBindingResult exposeBinding(BrowserContextExposeBindingParams params, Double timeout) { + return owner.sendMessage("exposeBinding", params, BrowserContextExposeBindingResult.class, timeout); + } + + public void grantPermissions(BrowserContextGrantPermissionsParams params, Double timeout) { + owner.sendMessage("grantPermissions", params, timeout); + } + + public BrowserContextNewPageResult newPage(BrowserContextNewPageParams params, Double timeout) { + return owner.sendMessage("newPage", params, BrowserContextNewPageResult.class, timeout); + } + + public BrowserContextNewPageResult newPage(Double timeout) { + return newPage(new BrowserContextNewPageParams(), timeout); + } + + public void registerSelectorEngine(BrowserContextRegisterSelectorEngineParams params, Double timeout) { + owner.sendMessage("registerSelectorEngine", params, timeout); + } + + public void setTestIdAttributeName(BrowserContextSetTestIdAttributeNameParams params, Double timeout) { + owner.sendMessage("setTestIdAttributeName", params, timeout); + } + + public void setExtraHTTPHeaders(BrowserContextSetExtraHTTPHeadersParams params, Double timeout) { + owner.sendMessage("setExtraHTTPHeaders", params, timeout); + } + + public void setGeolocation(BrowserContextSetGeolocationParams params, Double timeout) { + owner.sendMessage("setGeolocation", params, timeout); + } + + public void setHTTPCredentials(BrowserContextSetHTTPCredentialsParams params, Double timeout) { + owner.sendMessage("setHTTPCredentials", params, timeout); + } + + public void setNetworkInterceptionPatterns(BrowserContextSetNetworkInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); + } + + public void setWebSocketInterceptionPatterns(BrowserContextSetWebSocketInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); + } + + public void setOffline(BrowserContextSetOfflineParams params, Double timeout) { + owner.sendMessage("setOffline", params, timeout); + } + + public BrowserContextStorageStateResult storageState(BrowserContextStorageStateParams params, Double timeout) { + return owner.sendMessage("storageState", params, BrowserContextStorageStateResult.class, timeout); + } + + public void setStorageState(BrowserContextSetStorageStateParams params, Double timeout) { + owner.sendMessage("setStorageState", params, timeout); + } + + public void pause(BrowserContextPauseParams params, Double timeout) { + owner.sendMessage("pause", params, timeout); + } + + public void pause(Double timeout) { + pause(new BrowserContextPauseParams(), timeout); + } + + public void showRecorder(BrowserContextShowRecorderParams params, Double timeout) { + owner.sendMessage("showRecorder", params, timeout); + } + + public void startRecording(BrowserContextStartRecordingParams params, Double timeout) { + owner.sendMessage("startRecording", params, timeout); + } + + public void stopRecording(BrowserContextStopRecordingParams params, Double timeout) { + owner.sendMessage("stopRecording", params, timeout); + } + + public void stopRecording(Double timeout) { + stopRecording(new BrowserContextStopRecordingParams(), timeout); + } + + public void exposeConsoleApi(BrowserContextExposeConsoleApiParams params, Double timeout) { + owner.sendMessage("exposeConsoleApi", params, timeout); + } + + public void exposeConsoleApi(Double timeout) { + exposeConsoleApi(new BrowserContextExposeConsoleApiParams(), timeout); + } + + public BrowserContextNewCDPSessionResult newCDPSession(BrowserContextNewCDPSessionParams params, Double timeout) { + return owner.sendMessage("newCDPSession", params, BrowserContextNewCDPSessionResult.class, timeout); + } + + public BrowserContextCreateTempFilesResult createTempFiles(BrowserContextCreateTempFilesParams params, Double timeout) { + return owner.sendMessage("createTempFiles", params, BrowserContextCreateTempFilesResult.class, timeout); + } + + public void updateSubscription(BrowserContextUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } + + public void clockFastForward(BrowserContextClockFastForwardParams params, Double timeout) { + owner.sendMessage("clockFastForward", params, timeout); + } + + public void clockInstall(BrowserContextClockInstallParams params, Double timeout) { + owner.sendMessage("clockInstall", params, timeout); + } + + public void clockPauseAt(BrowserContextClockPauseAtParams params, Double timeout) { + owner.sendMessage("clockPauseAt", params, timeout); + } + + public void clockResume(BrowserContextClockResumeParams params, Double timeout) { + owner.sendMessage("clockResume", params, timeout); + } + + public void clockResume(Double timeout) { + clockResume(new BrowserContextClockResumeParams(), timeout); + } + + public void clockRunFor(BrowserContextClockRunForParams params, Double timeout) { + owner.sendMessage("clockRunFor", params, timeout); + } + + public void clockSetFixedTime(BrowserContextClockSetFixedTimeParams params, Double timeout) { + owner.sendMessage("clockSetFixedTime", params, timeout); + } + + public void clockSetSystemTime(BrowserContextClockSetSystemTimeParams params, Double timeout) { + owner.sendMessage("clockSetSystemTime", params, timeout); + } + + public void credentialsInstall(BrowserContextCredentialsInstallParams params, Double timeout) { + owner.sendMessage("credentialsInstall", params, timeout); + } + + public void credentialsInstall(Double timeout) { + credentialsInstall(new BrowserContextCredentialsInstallParams(), timeout); + } + + public BrowserContextCredentialsCreateResult credentialsCreate(BrowserContextCredentialsCreateParams params, Double timeout) { + return owner.sendMessage("credentialsCreate", params, BrowserContextCredentialsCreateResult.class, timeout); + } + + public BrowserContextCredentialsGetResult credentialsGet(BrowserContextCredentialsGetParams params, Double timeout) { + return owner.sendMessage("credentialsGet", params, BrowserContextCredentialsGetResult.class, timeout); + } + + public void credentialsDelete(BrowserContextCredentialsDeleteParams params, Double timeout) { + owner.sendMessage("credentialsDelete", params, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearCookiesParams.java new file mode 100644 index 000000000..9645a209a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearCookiesParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClearCookiesParams { + public String name; + public String nameRegexSource; + public String nameRegexFlags; + public String domain; + public String domainRegexSource; + public String domainRegexFlags; + public String path; + public String pathRegexSource; + public String pathRegexFlags; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearPermissionsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearPermissionsParams.java new file mode 100644 index 000000000..57f1469f5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClearPermissionsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClearPermissionsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockFastForwardParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockFastForwardParams.java new file mode 100644 index 000000000..47d70a601 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockFastForwardParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockFastForwardParams { + public Double ticksNumber; + public String ticksString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockInstallParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockInstallParams.java new file mode 100644 index 000000000..e0fb6d212 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockInstallParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockInstallParams { + public Double timeNumber; + public String timeString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockPauseAtParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockPauseAtParams.java new file mode 100644 index 000000000..1f6366a60 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockPauseAtParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockPauseAtParams { + public Double timeNumber; + public String timeString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockResumeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockResumeParams.java new file mode 100644 index 000000000..9166f136e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockResumeParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockResumeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockRunForParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockRunForParams.java new file mode 100644 index 000000000..920b4c930 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockRunForParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockRunForParams { + public Double ticksNumber; + public String ticksString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetFixedTimeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetFixedTimeParams.java new file mode 100644 index 000000000..8cad97b40 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetFixedTimeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockSetFixedTimeParams { + public Double timeNumber; + public String timeString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetSystemTimeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetSystemTimeParams.java new file mode 100644 index 000000000..480d2e72a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextClockSetSystemTimeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextClockSetSystemTimeParams { + public Double timeNumber; + public String timeString; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseEvent.java new file mode 100644 index 000000000..1b40815ce --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseParams.java new file mode 100644 index 000000000..120081af7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCloseParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCloseParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextConsoleEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextConsoleEvent.java new file mode 100644 index 000000000..4fd340acf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextConsoleEvent.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextConsoleEvent { + public String type; + public String text; + public List args; + public BrowserContextConsoleEventLocation location; + public Double timestamp; + public com.microsoft.playwright.impl.PageImpl page; + public com.microsoft.playwright.impl.WorkerImpl worker; + + public static class BrowserContextConsoleEventLocation { + public String url; + public Integer lineNumber; + public Integer columnNumber; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesParams.java new file mode 100644 index 000000000..b09bb1358 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextCookiesParams { + public List urls; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesResult.java new file mode 100644 index 000000000..e478d4d0a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCookiesResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextCookiesResult { + public List cookies; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesParams.java new file mode 100644 index 000000000..703d870fb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextCreateTempFilesParams { + public String rootDirName; + public List items; + + public static class BrowserContextCreateTempFilesParamsItems { + public String name; + public Double lastModifiedMs; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesResult.java new file mode 100644 index 000000000..8a030f48a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCreateTempFilesResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextCreateTempFilesResult { + public com.microsoft.playwright.impl.WritableStream rootDir; + public List writableStreams; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateParams.java new file mode 100644 index 000000000..3ac6c7e3b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateParams.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCredentialsCreateParams { + public String rpId; + public String id; + public String userHandle; + public String privateKey; + public String publicKey; + public Integer signCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateResult.java new file mode 100644 index 000000000..cdfaf7c16 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsCreateResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCredentialsCreateResult { + public VirtualCredential credential; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsDeleteParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsDeleteParams.java new file mode 100644 index 000000000..3d9c013a9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsDeleteParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCredentialsDeleteParams { + public String id; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetParams.java new file mode 100644 index 000000000..f2b5e079b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCredentialsGetParams { + public String rpId; + public String id; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetResult.java new file mode 100644 index 000000000..97be65f4b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsGetResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextCredentialsGetResult { + public List credentials; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsInstallParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsInstallParams.java new file mode 100644 index 000000000..d91cdc349 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextCredentialsInstallParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextCredentialsInstallParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogClosedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogClosedEvent.java new file mode 100644 index 000000000..13a370f49 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogClosedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextDialogClosedEvent { + public com.microsoft.playwright.impl.DialogImpl dialog; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogEvent.java new file mode 100644 index 000000000..8d759470f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextDialogEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextDialogEvent { + public com.microsoft.playwright.impl.DialogImpl dialog; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextEvent.java new file mode 100644 index 000000000..69d72aecd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextEvent { + public com.microsoft.playwright.impl.BrowserContextImpl context; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingParams.java new file mode 100644 index 000000000..5af095512 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextExposeBindingParams { + public String name; + public Boolean noGlobal; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingResult.java new file mode 100644 index 000000000..14de8f168 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeBindingResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextExposeBindingResult { + public com.microsoft.playwright.impl.DisposableObject disposable; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeConsoleApiParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeConsoleApiParams.java new file mode 100644 index 000000000..ae284ce68 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextExposeConsoleApiParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextExposeConsoleApiParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextGrantPermissionsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextGrantPermissionsParams.java new file mode 100644 index 000000000..612c20305 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextGrantPermissionsParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextGrantPermissionsParams { + public List permissions; + public String origin; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextInitializer.java new file mode 100644 index 000000000..bce6dc840 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextInitializer.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextInitializer { + public com.microsoft.playwright.impl.DebuggerImpl debugger; + public com.microsoft.playwright.impl.APIRequestContextImpl requestContext; + public com.microsoft.playwright.impl.TracingImpl tracing; + public BrowserContextInitializerOptions options; + + public static class BrowserContextInitializerOptions { + public Boolean noDefaultViewport; + public BrowserContextInitializerOptionsViewport viewport; + public BrowserContextInitializerOptionsScreen screen; + public Boolean ignoreHTTPSErrors; + public List clientCertificates; + public Boolean javaScriptEnabled; + public Boolean bypassCSP; + public String userAgent; + public String locale; + public String timezoneId; + public BrowserContextInitializerOptionsGeolocation geolocation; + public List permissions; + public List extraHTTPHeaders; + public Boolean offline; + public List httpCredentials; + public Double deviceScaleFactor; + public Boolean isMobile; + public Boolean hasTouch; + public String colorScheme; + public String reducedMotion; + public String forcedColors; + public String acceptDownloads; + public String contrast; + public String baseURL; + public BrowserContextInitializerOptionsRecordVideo recordVideo; + public Boolean strictSelectors; + public String serviceWorkers; + public List selectorEngines; + public String testIdAttributeName; + + public static class BrowserContextInitializerOptionsViewport { + public Integer width; + public Integer height; + } + + public static class BrowserContextInitializerOptionsScreen { + public Integer width; + public Integer height; + } + + public static class BrowserContextInitializerOptionsClientCertificates { + public String origin; + public byte[] cert; + public byte[] key; + public String passphrase; + public byte[] pfx; + } + + public static class BrowserContextInitializerOptionsGeolocation { + public Double longitude; + public Double latitude; + public Double accuracy; + } + + public static class BrowserContextInitializerOptionsRecordVideo { + public String dir; + public BrowserContextInitializerOptionsRecordVideoSize size; + public Integer fps; + public BrowserContextInitializerOptionsRecordVideoShowActions showActions; + + public static class BrowserContextInitializerOptionsRecordVideoSize { + public Integer width; + public Integer height; + } + + public static class BrowserContextInitializerOptionsRecordVideoShowActions { + public Double duration; + public String position; + public Integer fontSize; + public String cursor; + public BrowserContextInitializerOptionsRecordVideoShowActionsStyle style; + + public static class BrowserContextInitializerOptionsRecordVideoShowActionsStyle { + public String point; + public String highlight; + public String title; + } + } + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionParams.java new file mode 100644 index 000000000..b97e1c9af --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextNewCDPSessionParams { + public com.microsoft.playwright.impl.PageImpl page; + public com.microsoft.playwright.impl.FrameImpl frame; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionResult.java new file mode 100644 index 000000000..aa704013b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewCDPSessionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextNewCDPSessionResult { + public com.microsoft.playwright.impl.CDPSessionImpl session; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageParams.java new file mode 100644 index 000000000..1965dbd2c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextNewPageParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageResult.java new file mode 100644 index 000000000..a066eaea9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextNewPageResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextNewPageResult { + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageErrorEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageErrorEvent.java new file mode 100644 index 000000000..ab38fde04 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageErrorEvent.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextPageErrorEvent { + public SerializedError error; + public com.microsoft.playwright.impl.PageImpl page; + public BrowserContextPageErrorEventLocation location; + + public static class BrowserContextPageErrorEventLocation { + public String url; + public Integer line; + public Integer column; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageEvent.java new file mode 100644 index 000000000..318138982 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPageEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextPageEvent { + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPauseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPauseParams.java new file mode 100644 index 000000000..d2abeb557 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextPauseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextPauseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRecorderEventEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRecorderEventEvent.java new file mode 100644 index 000000000..e7a063aea --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRecorderEventEvent.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class BrowserContextRecorderEventEvent { + public String event; + public JsonElement data; + public com.microsoft.playwright.impl.PageImpl page; + public String code; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRegisterSelectorEngineParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRegisterSelectorEngineParams.java new file mode 100644 index 000000000..bbf8d7656 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRegisterSelectorEngineParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextRegisterSelectorEngineParams { + public SelectorEngine selectorEngine; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestEvent.java new file mode 100644 index 000000000..488b7a547 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextRequestEvent { + public com.microsoft.playwright.impl.RequestImpl request; + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFailedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFailedEvent.java new file mode 100644 index 000000000..baf2d9ffd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFailedEvent.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextRequestFailedEvent { + public com.microsoft.playwright.impl.RequestImpl request; + public String failureText; + public Double responseEndTiming; + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFinishedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFinishedEvent.java new file mode 100644 index 000000000..5570d7a35 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRequestFinishedEvent.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextRequestFinishedEvent { + public com.microsoft.playwright.impl.RequestImpl request; + public com.microsoft.playwright.impl.ResponseImpl response; + public Double responseEndTiming; + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextResponseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextResponseEvent.java new file mode 100644 index 000000000..7282e5bb9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextResponseEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextResponseEvent { + public com.microsoft.playwright.impl.ResponseImpl response; + public com.microsoft.playwright.impl.PageImpl page; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRouteEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRouteEvent.java new file mode 100644 index 000000000..d3a814f6a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextRouteEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextRouteEvent { + public com.microsoft.playwright.impl.RouteImpl route; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextServiceWorkerEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextServiceWorkerEvent.java new file mode 100644 index 000000000..c72023371 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextServiceWorkerEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextServiceWorkerEvent { + public com.microsoft.playwright.impl.WorkerImpl worker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetExtraHTTPHeadersParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetExtraHTTPHeadersParams.java new file mode 100644 index 000000000..06a48da23 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetExtraHTTPHeadersParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextSetExtraHTTPHeadersParams { + public List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetGeolocationParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetGeolocationParams.java new file mode 100644 index 000000000..8aa7b3073 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetGeolocationParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextSetGeolocationParams { + public BrowserContextSetGeolocationParamsGeolocation geolocation; + + public static class BrowserContextSetGeolocationParamsGeolocation { + public Double longitude; + public Double latitude; + public Double accuracy; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetHTTPCredentialsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetHTTPCredentialsParams.java new file mode 100644 index 000000000..990c7bffc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetHTTPCredentialsParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextSetHTTPCredentialsParams { + public List httpCredentials; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetNetworkInterceptionPatternsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetNetworkInterceptionPatternsParams.java new file mode 100644 index 000000000..822498a18 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetNetworkInterceptionPatternsParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextSetNetworkInterceptionPatternsParams { + public List patterns; + + public static class BrowserContextSetNetworkInterceptionPatternsParamsPatterns { + public String glob; + public String regexSource; + public String regexFlags; + public URLPattern urlPattern; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetOfflineParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetOfflineParams.java new file mode 100644 index 000000000..337f944d2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetOfflineParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextSetOfflineParams { + public Boolean offline; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetStorageStateParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetStorageStateParams.java new file mode 100644 index 000000000..a676088b6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetStorageStateParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextSetStorageStateParams { + public BrowserContextSetStorageStateParamsStorageState storageState; + + public static class BrowserContextSetStorageStateParamsStorageState { + public List cookies; + public List origins; + public List credentials; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetTestIdAttributeNameParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetTestIdAttributeNameParams.java new file mode 100644 index 000000000..b956260bb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetTestIdAttributeNameParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextSetTestIdAttributeNameParams { + public String testIdAttributeName; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetWebSocketInterceptionPatternsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetWebSocketInterceptionPatternsParams.java new file mode 100644 index 000000000..d93d65859 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextSetWebSocketInterceptionPatternsParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextSetWebSocketInterceptionPatternsParams { + public List patterns; + + public static class BrowserContextSetWebSocketInterceptionPatternsParamsPatterns { + public String glob; + public String regexSource; + public String regexFlags; + public URLPattern urlPattern; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextShowRecorderParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextShowRecorderParams.java new file mode 100644 index 000000000..f7b378332 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextShowRecorderParams.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class BrowserContextShowRecorderParams { + public String language; + public String mode; + public Boolean pauseOnNextStatement; + public String testIdAttributeName; + public JsonElement launchOptions; + public JsonElement contextOptions; + public String device; + public String saveStorage; + public String outputFile; + public Boolean handleSIGINT; + public Boolean omitCallTracking; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStartRecordingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStartRecordingParams.java new file mode 100644 index 000000000..fcb954a7f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStartRecordingParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextStartRecordingParams { + public String language; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStopRecordingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStopRecordingParams.java new file mode 100644 index 000000000..5514c63e2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStopRecordingParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextStopRecordingParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateParams.java new file mode 100644 index 000000000..547350f62 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextStorageStateParams { + public Boolean indexedDB; + public Boolean opfs; + public Boolean credentials; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateResult.java new file mode 100644 index 000000000..af9bc011f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextStorageStateResult.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserContextStorageStateResult { + public List cookies; + public List origins; + public List credentials; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextUpdateSubscriptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextUpdateSubscriptionParams.java new file mode 100644 index 000000000..0b1f40a6e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextUpdateSubscriptionParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextUpdateSubscriptionParams { + public String event; + public Boolean enabled; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextWebSocketRouteEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextWebSocketRouteEvent.java new file mode 100644 index 000000000..f0dde4329 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserContextWebSocketRouteEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserContextWebSocketRouteEvent { + public com.microsoft.playwright.impl.WebSocketRouteImpl webSocketRoute; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestParams.java new file mode 100644 index 000000000..4c4b9501a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserDefaultUserAgentForTestParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestResult.java new file mode 100644 index 000000000..55e5acc01 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDefaultUserAgentForTestResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserDefaultUserAgentForTestResult { + public String userAgent; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDisconnectFromReusedContextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDisconnectFromReusedContextParams.java new file mode 100644 index 000000000..ee647c06d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserDisconnectFromReusedContextParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserDisconnectFromReusedContextParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserInitializer.java new file mode 100644 index 000000000..3cb914b91 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserInitializer.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserInitializer { + public String version; + public String name; + public String browserName; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserKillForTestsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserKillForTestsParams.java new file mode 100644 index 000000000..3f30bf2d6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserKillForTestsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserKillForTestsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionParams.java new file mode 100644 index 000000000..8594ece9b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserNewBrowserCDPSessionParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionResult.java new file mode 100644 index 000000000..00e5693ec --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewBrowserCDPSessionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserNewBrowserCDPSessionResult { + public com.microsoft.playwright.impl.CDPSessionImpl session; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseParams.java new file mode 100644 index 000000000..601978918 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseParams.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserNewContextForReuseParams { + public Boolean noDefaultViewport; + public BrowserNewContextForReuseParamsViewport viewport; + public BrowserNewContextForReuseParamsScreen screen; + public Boolean ignoreHTTPSErrors; + public List clientCertificates; + public Boolean javaScriptEnabled; + public Boolean bypassCSP; + public String userAgent; + public String locale; + public String timezoneId; + public BrowserNewContextForReuseParamsGeolocation geolocation; + public List permissions; + public List extraHTTPHeaders; + public Boolean offline; + public List httpCredentials; + public Double deviceScaleFactor; + public Boolean isMobile; + public Boolean hasTouch; + public String colorScheme; + public String reducedMotion; + public String forcedColors; + public String acceptDownloads; + public String contrast; + public String baseURL; + public BrowserNewContextForReuseParamsRecordVideo recordVideo; + public Boolean strictSelectors; + public String serviceWorkers; + public List selectorEngines; + public String testIdAttributeName; + public BrowserNewContextForReuseParamsProxy proxy; + public BrowserNewContextForReuseParamsStorageState storageState; + + public static class BrowserNewContextForReuseParamsViewport { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextForReuseParamsScreen { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextForReuseParamsClientCertificates { + public String origin; + public byte[] cert; + public byte[] key; + public String passphrase; + public byte[] pfx; + } + + public static class BrowserNewContextForReuseParamsGeolocation { + public Double longitude; + public Double latitude; + public Double accuracy; + } + + public static class BrowserNewContextForReuseParamsRecordVideo { + public String dir; + public BrowserNewContextForReuseParamsRecordVideoSize size; + public Integer fps; + public BrowserNewContextForReuseParamsRecordVideoShowActions showActions; + + public static class BrowserNewContextForReuseParamsRecordVideoSize { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextForReuseParamsRecordVideoShowActions { + public Double duration; + public String position; + public Integer fontSize; + public String cursor; + public BrowserNewContextForReuseParamsRecordVideoShowActionsStyle style; + + public static class BrowserNewContextForReuseParamsRecordVideoShowActionsStyle { + public String point; + public String highlight; + public String title; + } + } + } + + public static class BrowserNewContextForReuseParamsProxy { + public String server; + public String bypass; + public String username; + public String password; + } + + public static class BrowserNewContextForReuseParamsStorageState { + public List cookies; + public List origins; + public List credentials; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseResult.java new file mode 100644 index 000000000..76e34c2d6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextForReuseResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserNewContextForReuseResult { + public com.microsoft.playwright.impl.BrowserContextImpl context; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextParams.java new file mode 100644 index 000000000..5e6f0842e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextParams.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserNewContextParams { + public Boolean noDefaultViewport; + public BrowserNewContextParamsViewport viewport; + public BrowserNewContextParamsScreen screen; + public Boolean ignoreHTTPSErrors; + public List clientCertificates; + public Boolean javaScriptEnabled; + public Boolean bypassCSP; + public String userAgent; + public String locale; + public String timezoneId; + public BrowserNewContextParamsGeolocation geolocation; + public List permissions; + public List extraHTTPHeaders; + public Boolean offline; + public List httpCredentials; + public Double deviceScaleFactor; + public Boolean isMobile; + public Boolean hasTouch; + public String colorScheme; + public String reducedMotion; + public String forcedColors; + public String acceptDownloads; + public String contrast; + public String baseURL; + public BrowserNewContextParamsRecordVideo recordVideo; + public Boolean strictSelectors; + public String serviceWorkers; + public List selectorEngines; + public String testIdAttributeName; + public BrowserNewContextParamsProxy proxy; + public BrowserNewContextParamsStorageState storageState; + + public static class BrowserNewContextParamsViewport { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextParamsScreen { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextParamsClientCertificates { + public String origin; + public byte[] cert; + public byte[] key; + public String passphrase; + public byte[] pfx; + } + + public static class BrowserNewContextParamsGeolocation { + public Double longitude; + public Double latitude; + public Double accuracy; + } + + public static class BrowserNewContextParamsRecordVideo { + public String dir; + public BrowserNewContextParamsRecordVideoSize size; + public Integer fps; + public BrowserNewContextParamsRecordVideoShowActions showActions; + + public static class BrowserNewContextParamsRecordVideoSize { + public Integer width; + public Integer height; + } + + public static class BrowserNewContextParamsRecordVideoShowActions { + public Double duration; + public String position; + public Integer fontSize; + public String cursor; + public BrowserNewContextParamsRecordVideoShowActionsStyle style; + + public static class BrowserNewContextParamsRecordVideoShowActionsStyle { + public String point; + public String highlight; + public String title; + } + } + } + + public static class BrowserNewContextParamsProxy { + public String server; + public String bypass; + public String username; + public String password; + } + + public static class BrowserNewContextParamsStorageState { + public List cookies; + public List origins; + public List credentials; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextResult.java new file mode 100644 index 000000000..23c2812b6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserNewContextResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserNewContextResult { + public com.microsoft.playwright.impl.BrowserContextImpl context; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerParams.java new file mode 100644 index 000000000..d942d8998 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class BrowserStartServerParams { + public String title; + public String workspaceDir; + public JsonElement metadata; + public String host; + public Integer port; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerResult.java new file mode 100644 index 000000000..2baeb509b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartServerResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserStartServerResult { + public String endpoint; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartTracingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartTracingParams.java new file mode 100644 index 000000000..4d55651a9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStartTracingParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserStartTracingParams { + public com.microsoft.playwright.impl.PageImpl page; + public Boolean screenshots; + public List categories; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopServerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopServerParams.java new file mode 100644 index 000000000..0ae507f35 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopServerParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserStopServerParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingParams.java new file mode 100644 index 000000000..a23607bfc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserStopTracingParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingResult.java new file mode 100644 index 000000000..a2b6b649b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserStopTracingResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserStopTracingResult { + public com.microsoft.playwright.impl.ArtifactImpl artifact; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeChannel.java new file mode 100644 index 000000000..c0d9f0ecb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeChannel.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public BrowserTypeChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public BrowserTypeLaunchResult launch(BrowserTypeLaunchParams params, Double timeout) { + return owner.sendMessage("launch", params, BrowserTypeLaunchResult.class, timeout); + } + + public BrowserTypeLaunchPersistentContextResult launchPersistentContext(BrowserTypeLaunchPersistentContextParams params, Double timeout) { + return owner.sendMessage("launchPersistentContext", params, BrowserTypeLaunchPersistentContextResult.class, timeout); + } + + public BrowserTypeConnectOverCDPResult connectOverCDP(BrowserTypeConnectOverCDPParams params, Double timeout) { + return owner.sendMessage("connectOverCDP", params, BrowserTypeConnectOverCDPResult.class, timeout); + } + + public BrowserTypeConnectToWorkerResult connectToWorker(BrowserTypeConnectToWorkerParams params, Double timeout) { + return owner.sendMessage("connectToWorker", params, BrowserTypeConnectToWorkerResult.class, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPParams.java new file mode 100644 index 000000000..9832565a9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class BrowserTypeConnectOverCDPParams { + public String endpointURL; + public List headers; + public Double slowMo; + public Boolean isLocal; + public Boolean noDefaults; + public Boolean isWebView; + public String artifactsDir; + public byte[] transport; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPResult.java new file mode 100644 index 000000000..a2f0801c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectOverCDPResult.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeConnectOverCDPResult { + public com.microsoft.playwright.impl.BrowserImpl browser; + public com.microsoft.playwright.impl.BrowserContextImpl defaultContext; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerParams.java new file mode 100644 index 000000000..7a59e2d93 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeConnectToWorkerParams { + public String endpoint; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerResult.java new file mode 100644 index 000000000..508ca9bd2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeConnectToWorkerResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeConnectToWorkerResult { + public com.microsoft.playwright.impl.WorkerImpl worker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeInitializer.java new file mode 100644 index 000000000..6101985e7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeInitializer.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeInitializer { + public String executablePath; + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchParams.java new file mode 100644 index 000000000..3abec27e9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchParams.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; +import java.util.List; + +public class BrowserTypeLaunchParams { + public String channel; + public String executablePath; + public List args; + public Boolean ignoreAllDefaultArgs; + public List ignoreDefaultArgs; + public Boolean handleSIGINT; + public Boolean handleSIGTERM; + public Boolean handleSIGHUP; + public List env; + public Boolean headless; + public BrowserTypeLaunchParamsProxy proxy; + public String downloadsPath; + public String tracesDir; + public String artifactsDir; + public Boolean chromiumSandbox; + public JsonElement firefoxUserPrefs; + public Integer cdpPort; + public Double slowMo; + + public static class BrowserTypeLaunchParamsProxy { + public String server; + public String bypass; + public String username; + public String password; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextParams.java new file mode 100644 index 000000000..664eac38e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextParams.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; +import java.util.List; + +public class BrowserTypeLaunchPersistentContextParams { + public String channel; + public String executablePath; + public List args; + public Boolean ignoreAllDefaultArgs; + public List ignoreDefaultArgs; + public Boolean handleSIGINT; + public Boolean handleSIGTERM; + public Boolean handleSIGHUP; + public List env; + public Boolean headless; + public BrowserTypeLaunchPersistentContextParamsProxy proxy; + public String downloadsPath; + public String tracesDir; + public String artifactsDir; + public Boolean chromiumSandbox; + public JsonElement firefoxUserPrefs; + public Integer cdpPort; + public Boolean noDefaultViewport; + public BrowserTypeLaunchPersistentContextParamsViewport viewport; + public BrowserTypeLaunchPersistentContextParamsScreen screen; + public Boolean ignoreHTTPSErrors; + public List clientCertificates; + public Boolean javaScriptEnabled; + public Boolean bypassCSP; + public String userAgent; + public String locale; + public String timezoneId; + public BrowserTypeLaunchPersistentContextParamsGeolocation geolocation; + public List permissions; + public List extraHTTPHeaders; + public Boolean offline; + public List httpCredentials; + public Double deviceScaleFactor; + public Boolean isMobile; + public Boolean hasTouch; + public String colorScheme; + public String reducedMotion; + public String forcedColors; + public String acceptDownloads; + public String contrast; + public String baseURL; + public BrowserTypeLaunchPersistentContextParamsRecordVideo recordVideo; + public Boolean strictSelectors; + public String serviceWorkers; + public List selectorEngines; + public String testIdAttributeName; + public String userDataDir; + public Double slowMo; + + public static class BrowserTypeLaunchPersistentContextParamsProxy { + public String server; + public String bypass; + public String username; + public String password; + } + + public static class BrowserTypeLaunchPersistentContextParamsViewport { + public Integer width; + public Integer height; + } + + public static class BrowserTypeLaunchPersistentContextParamsScreen { + public Integer width; + public Integer height; + } + + public static class BrowserTypeLaunchPersistentContextParamsClientCertificates { + public String origin; + public byte[] cert; + public byte[] key; + public String passphrase; + public byte[] pfx; + } + + public static class BrowserTypeLaunchPersistentContextParamsGeolocation { + public Double longitude; + public Double latitude; + public Double accuracy; + } + + public static class BrowserTypeLaunchPersistentContextParamsRecordVideo { + public String dir; + public BrowserTypeLaunchPersistentContextParamsRecordVideoSize size; + public Integer fps; + public BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions showActions; + + public static class BrowserTypeLaunchPersistentContextParamsRecordVideoSize { + public Integer width; + public Integer height; + } + + public static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActions { + public Double duration; + public String position; + public Integer fontSize; + public String cursor; + public BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle style; + + public static class BrowserTypeLaunchPersistentContextParamsRecordVideoShowActionsStyle { + public String point; + public String highlight; + public String title; + } + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextResult.java new file mode 100644 index 000000000..f46907c27 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchPersistentContextResult.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeLaunchPersistentContextResult { + public com.microsoft.playwright.impl.BrowserImpl browser; + public com.microsoft.playwright.impl.BrowserContextImpl context; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchResult.java new file mode 100644 index 000000000..bc73edb43 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BrowserTypeLaunchResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class BrowserTypeLaunchResult { + public com.microsoft.playwright.impl.BrowserImpl browser; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionChannel.java similarity index 58% rename from playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionChannel.java index d67203a60..7de7e8a33 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionChannel.java @@ -16,49 +16,24 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -import com.google.gson.JsonElement; +public class CDPSessionChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; -class CDPSessionChannel { - private final ChannelOwner owner; - - CDPSessionChannel(ChannelOwner owner) { + public CDPSessionChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - CDPSessionSendResult send(CDPSessionSendParams params, Double timeout) { + public CDPSessionSendResult send(CDPSessionSendParams params, Double timeout) { return owner.sendMessage("send", params, CDPSessionSendResult.class, timeout); } - void detach(CDPSessionDetachParams params, Double timeout) { + public void detach(CDPSessionDetachParams params, Double timeout) { owner.sendMessage("detach", params, timeout); } - void detach(Double timeout) { + public void detach(Double timeout) { detach(new CDPSessionDetachParams(), timeout); } } - -class CDPSessionInitializer { -} - -class CDPSessionSendParams { - String method; - JsonElement params; -} - -class CDPSessionSendResult { - JsonElement result; -} - -class CDPSessionDetachParams { -} - -class CDPSessionEventEvent { - String method; - JsonElement params; -} - -class CDPSessionCloseEvent { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionCloseEvent.java new file mode 100644 index 000000000..37e308300 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class CDPSessionCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionDetachParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionDetachParams.java new file mode 100644 index 000000000..41b6ad746 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionDetachParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class CDPSessionDetachParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionEventEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionEventEvent.java new file mode 100644 index 000000000..2d864521d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionEventEvent.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class CDPSessionEventEvent { + public String method; + public JsonElement params; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionInitializer.java new file mode 100644 index 000000000..5fe025a1c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class CDPSessionInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendParams.java new file mode 100644 index 000000000..d4ecdb1f9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class CDPSessionSendParams { + public String method; + public JsonElement params; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendResult.java new file mode 100644 index 000000000..15b50cdd0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionSendResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class CDPSessionSendResult { + public JsonElement result; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ClientSideCallMetadata.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ClientSideCallMetadata.java new file mode 100644 index 000000000..4b382147d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ClientSideCallMetadata.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ClientSideCallMetadata { + public String id; + public List stack; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ConsoleMessagesFilter.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ConsoleMessagesFilter.java new file mode 100644 index 000000000..e971e1767 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ConsoleMessagesFilter.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ConsoleMessagesFilter { + public static final String ALL = "all"; + public static final String SINCE_NAVIGATION = "since-navigation"; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerChannel.java new file mode 100644 index 000000000..3338d9321 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerChannel.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public DebugControllerChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void initialize(DebugControllerInitializeParams params, Double timeout) { + owner.sendMessage("initialize", params, timeout); + } + + public void setReportStateChanged(DebugControllerSetReportStateChangedParams params, Double timeout) { + owner.sendMessage("setReportStateChanged", params, timeout); + } + + public void setRecorderMode(DebugControllerSetRecorderModeParams params, Double timeout) { + owner.sendMessage("setRecorderMode", params, timeout); + } + + public void highlight(DebugControllerHighlightParams params, Double timeout) { + owner.sendMessage("highlight", params, timeout); + } + + public void hideHighlight(DebugControllerHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + public void hideHighlight(Double timeout) { + hideHighlight(new DebugControllerHideHighlightParams(), timeout); + } + + public void resume(DebugControllerResumeParams params, Double timeout) { + owner.sendMessage("resume", params, timeout); + } + + public void resume(Double timeout) { + resume(new DebugControllerResumeParams(), timeout); + } + + public void kill(DebugControllerKillParams params, Double timeout) { + owner.sendMessage("kill", params, timeout); + } + + public void kill(Double timeout) { + kill(new DebugControllerKillParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHideHighlightParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHideHighlightParams.java new file mode 100644 index 000000000..52d21783e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHideHighlightParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerHideHighlightParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHighlightParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHighlightParams.java new file mode 100644 index 000000000..ca3189c62 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerHighlightParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerHighlightParams { + public String selector; + public String ariaTemplate; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializeParams.java new file mode 100644 index 000000000..bc03b2956 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerInitializeParams { + public String codegenId; + public String sdkLanguage; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializer.java new file mode 100644 index 000000000..70d866fdf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInspectRequestedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInspectRequestedEvent.java new file mode 100644 index 000000000..b39cbaaab --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerInspectRequestedEvent.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerInspectRequestedEvent { + public String selector; + public String locator; + public String ariaSnapshot; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerKillParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerKillParams.java new file mode 100644 index 000000000..3803dad94 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerKillParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerKillParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerPausedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerPausedEvent.java new file mode 100644 index 000000000..98bec2b2a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerPausedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerPausedEvent { + public Boolean paused; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerResumeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerResumeParams.java new file mode 100644 index 000000000..d12b1076f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerResumeParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerResumeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetModeRequestedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetModeRequestedEvent.java new file mode 100644 index 000000000..63c1e297c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetModeRequestedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerSetModeRequestedEvent { + public String mode; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetRecorderModeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetRecorderModeParams.java new file mode 100644 index 000000000..9658882cb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetRecorderModeParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerSetRecorderModeParams { + public String mode; + public String testIdAttributeName; + public Boolean generateAutoExpect; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetReportStateChangedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetReportStateChangedParams.java new file mode 100644 index 000000000..3d4db33ce --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSetReportStateChangedParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerSetReportStateChangedParams { + public Boolean enabled; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSourceChangedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSourceChangedEvent.java new file mode 100644 index 000000000..b828278be --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerSourceChangedEvent.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class DebugControllerSourceChangedEvent { + public String text; + public String header; + public String footer; + public List actions; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerStateChangedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerStateChangedEvent.java new file mode 100644 index 000000000..54cb850d1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebugControllerStateChangedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebugControllerStateChangedEvent { + public Integer pageCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerApiCallsUpdatedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerApiCallsUpdatedEvent.java new file mode 100644 index 000000000..c1f44fff2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerApiCallsUpdatedEvent.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class DebuggerApiCallsUpdatedEvent { + public List apiCalls; + + public static class DebuggerApiCallsUpdatedEventApiCalls { + public String id; + public String title; + public DebuggerApiCallsUpdatedEventApiCallsLocation location; + public List newLogEntries; + public Point actionPoint; + public String status; + public String error; + + public static class DebuggerApiCallsUpdatedEventApiCallsLocation { + public String file; + public Integer line; + public Integer column; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerChannel.java new file mode 100644 index 000000000..9ac864b0a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerChannel.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public DebuggerChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void requestPause(DebuggerRequestPauseParams params, Double timeout) { + owner.sendMessage("requestPause", params, timeout); + } + + public void requestPause(Double timeout) { + requestPause(new DebuggerRequestPauseParams(), timeout); + } + + public void resume(DebuggerResumeParams params, Double timeout) { + owner.sendMessage("resume", params, timeout); + } + + public void resume(Double timeout) { + resume(new DebuggerResumeParams(), timeout); + } + + public void next(DebuggerNextParams params, Double timeout) { + owner.sendMessage("next", params, timeout); + } + + public void next(Double timeout) { + next(new DebuggerNextParams(), timeout); + } + + public void runTo(DebuggerRunToParams params, Double timeout) { + owner.sendMessage("runTo", params, timeout); + } + + public void enable(DebuggerEnableParams params, Double timeout) { + owner.sendMessage("enable", params, timeout); + } + + public void enable(Double timeout) { + enable(new DebuggerEnableParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerEnableParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerEnableParams.java new file mode 100644 index 000000000..e960a2d65 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerEnableParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerEnableParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerInitializer.java new file mode 100644 index 000000000..fe86a5942 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerNextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerNextParams.java new file mode 100644 index 000000000..0e2bcc955 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerNextParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerNextParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerPausedStateChangedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerPausedStateChangedEvent.java new file mode 100644 index 000000000..fea20825e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerPausedStateChangedEvent.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerPausedStateChangedEvent { + public DebuggerPausedStateChangedEventPausedDetails pausedDetails; + + public static class DebuggerPausedStateChangedEventPausedDetails { + public DebuggerPausedStateChangedEventPausedDetailsLocation location; + public String title; + public String stack; + + public static class DebuggerPausedStateChangedEventPausedDetailsLocation { + public String file; + public Integer line; + public Integer column; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRequestPauseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRequestPauseParams.java new file mode 100644 index 000000000..8f32db39d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRequestPauseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerRequestPauseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerResumeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerResumeParams.java new file mode 100644 index 000000000..e7fb91564 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerResumeParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerResumeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRunToParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRunToParams.java new file mode 100644 index 000000000..1f44c1ba8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DebuggerRunToParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DebuggerRunToParams { + public DebuggerRunToParamsLocation location; + + public static class DebuggerRunToParamsLocation { + public String file; + public Integer line; + public Integer column; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogAcceptParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogAcceptParams.java new file mode 100644 index 000000000..96f72fc11 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogAcceptParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DialogAcceptParams { + public String promptText; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogChannel.java similarity index 65% rename from playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogChannel.java index 6fc8176fb..e5f7e82c4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DialogChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogChannel.java @@ -16,38 +16,24 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class DialogChannel { - private final ChannelOwner owner; +public class DialogChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - DialogChannel(ChannelOwner owner) { + public DialogChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void accept(DialogAcceptParams params, Double timeout) { + public void accept(DialogAcceptParams params, Double timeout) { owner.sendMessage("accept", params, timeout); } - void dismiss(DialogDismissParams params, Double timeout) { + public void dismiss(DialogDismissParams params, Double timeout) { owner.sendMessage("dismiss", params, timeout); } - void dismiss(Double timeout) { + public void dismiss(Double timeout) { dismiss(new DialogDismissParams(), timeout); } } - -class DialogInitializer { - PageImpl page; - String type; - String message; - String defaultValue; -} - -class DialogAcceptParams { - String promptText; -} - -class DialogDismissParams { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogDismissParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogDismissParams.java new file mode 100644 index 000000000..7865fcb3f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogDismissParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DialogDismissParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogInitializer.java new file mode 100644 index 000000000..4a962e872 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogInitializer.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DialogInitializer { + public com.microsoft.playwright.impl.PageImpl page; + public String type; + public String message; + public String defaultValue; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableChannel.java similarity index 71% rename from playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableChannel.java index 34b3315db..4b792c3d4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/DisposableChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableChannel.java @@ -16,26 +16,20 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class DisposableChannel { - private final ChannelOwner owner; +public class DisposableChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - DisposableChannel(ChannelOwner owner) { + public DisposableChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void dispose(DisposableDisposeParams params, Double timeout) { + public void dispose(DisposableDisposeParams params, Double timeout) { owner.sendMessage("dispose", params, timeout); } - void dispose(Double timeout) { + public void dispose(Double timeout) { dispose(new DisposableDisposeParams(), timeout); } } - -class DisposableInitializer { -} - -class DisposableDisposeParams { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableDisposeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableDisposeParams.java new file mode 100644 index 000000000..27f968eaf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableDisposeParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DisposableDisposeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableInitializer.java new file mode 100644 index 000000000..772cf2e31 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class DisposableInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxParams.java new file mode 100644 index 000000000..48765ec06 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleBoundingBoxParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxResult.java new file mode 100644 index 000000000..c72bc9ea0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleBoundingBoxResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleBoundingBoxResult { + public Rect value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleChannel.java new file mode 100644 index 000000000..f77c75c6f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleChannel.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public ElementHandleChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public ElementHandleEvalOnSelectorResult evalOnSelector(ElementHandleEvalOnSelectorParams params, Double timeout) { + return owner.sendMessage("evalOnSelector", params, ElementHandleEvalOnSelectorResult.class, timeout); + } + + public ElementHandleEvalOnSelectorAllResult evalOnSelectorAll(ElementHandleEvalOnSelectorAllParams params, Double timeout) { + return owner.sendMessage("evalOnSelectorAll", params, ElementHandleEvalOnSelectorAllResult.class, timeout); + } + + public ElementHandleBoundingBoxResult boundingBox(ElementHandleBoundingBoxParams params, Double timeout) { + return owner.sendMessage("boundingBox", params, ElementHandleBoundingBoxResult.class, timeout); + } + + public ElementHandleBoundingBoxResult boundingBox(Double timeout) { + return boundingBox(new ElementHandleBoundingBoxParams(), timeout); + } + + public void check(ElementHandleCheckParams params, Double timeout) { + owner.sendMessage("check", params, timeout); + } + + public void click(ElementHandleClickParams params, Double timeout) { + owner.sendMessage("click", params, timeout); + } + + public ElementHandleContentFrameResult contentFrame(ElementHandleContentFrameParams params, Double timeout) { + return owner.sendMessage("contentFrame", params, ElementHandleContentFrameResult.class, timeout); + } + + public ElementHandleContentFrameResult contentFrame(Double timeout) { + return contentFrame(new ElementHandleContentFrameParams(), timeout); + } + + public void dblclick(ElementHandleDblclickParams params, Double timeout) { + owner.sendMessage("dblclick", params, timeout); + } + + public void dispatchEvent(ElementHandleDispatchEventParams params, Double timeout) { + owner.sendMessage("dispatchEvent", params, timeout); + } + + public void fill(ElementHandleFillParams params, Double timeout) { + owner.sendMessage("fill", params, timeout); + } + + public void focus(ElementHandleFocusParams params, Double timeout) { + owner.sendMessage("focus", params, timeout); + } + + public void focus(Double timeout) { + focus(new ElementHandleFocusParams(), timeout); + } + + public ElementHandleGetAttributeResult getAttribute(ElementHandleGetAttributeParams params, Double timeout) { + return owner.sendMessage("getAttribute", params, ElementHandleGetAttributeResult.class, timeout); + } + + public void hover(ElementHandleHoverParams params, Double timeout) { + owner.sendMessage("hover", params, timeout); + } + + public ElementHandleInnerHTMLResult innerHTML(ElementHandleInnerHTMLParams params, Double timeout) { + return owner.sendMessage("innerHTML", params, ElementHandleInnerHTMLResult.class, timeout); + } + + public ElementHandleInnerHTMLResult innerHTML(Double timeout) { + return innerHTML(new ElementHandleInnerHTMLParams(), timeout); + } + + public ElementHandleInnerTextResult innerText(ElementHandleInnerTextParams params, Double timeout) { + return owner.sendMessage("innerText", params, ElementHandleInnerTextResult.class, timeout); + } + + public ElementHandleInnerTextResult innerText(Double timeout) { + return innerText(new ElementHandleInnerTextParams(), timeout); + } + + public ElementHandleInputValueResult inputValue(ElementHandleInputValueParams params, Double timeout) { + return owner.sendMessage("inputValue", params, ElementHandleInputValueResult.class, timeout); + } + + public ElementHandleInputValueResult inputValue(Double timeout) { + return inputValue(new ElementHandleInputValueParams(), timeout); + } + + public ElementHandleIsCheckedResult isChecked(ElementHandleIsCheckedParams params, Double timeout) { + return owner.sendMessage("isChecked", params, ElementHandleIsCheckedResult.class, timeout); + } + + public ElementHandleIsCheckedResult isChecked(Double timeout) { + return isChecked(new ElementHandleIsCheckedParams(), timeout); + } + + public ElementHandleIsDisabledResult isDisabled(ElementHandleIsDisabledParams params, Double timeout) { + return owner.sendMessage("isDisabled", params, ElementHandleIsDisabledResult.class, timeout); + } + + public ElementHandleIsDisabledResult isDisabled(Double timeout) { + return isDisabled(new ElementHandleIsDisabledParams(), timeout); + } + + public ElementHandleIsEditableResult isEditable(ElementHandleIsEditableParams params, Double timeout) { + return owner.sendMessage("isEditable", params, ElementHandleIsEditableResult.class, timeout); + } + + public ElementHandleIsEditableResult isEditable(Double timeout) { + return isEditable(new ElementHandleIsEditableParams(), timeout); + } + + public ElementHandleIsEnabledResult isEnabled(ElementHandleIsEnabledParams params, Double timeout) { + return owner.sendMessage("isEnabled", params, ElementHandleIsEnabledResult.class, timeout); + } + + public ElementHandleIsEnabledResult isEnabled(Double timeout) { + return isEnabled(new ElementHandleIsEnabledParams(), timeout); + } + + public ElementHandleIsHiddenResult isHidden(ElementHandleIsHiddenParams params, Double timeout) { + return owner.sendMessage("isHidden", params, ElementHandleIsHiddenResult.class, timeout); + } + + public ElementHandleIsHiddenResult isHidden(Double timeout) { + return isHidden(new ElementHandleIsHiddenParams(), timeout); + } + + public ElementHandleIsVisibleResult isVisible(ElementHandleIsVisibleParams params, Double timeout) { + return owner.sendMessage("isVisible", params, ElementHandleIsVisibleResult.class, timeout); + } + + public ElementHandleIsVisibleResult isVisible(Double timeout) { + return isVisible(new ElementHandleIsVisibleParams(), timeout); + } + + public ElementHandleOwnerFrameResult ownerFrame(ElementHandleOwnerFrameParams params, Double timeout) { + return owner.sendMessage("ownerFrame", params, ElementHandleOwnerFrameResult.class, timeout); + } + + public ElementHandleOwnerFrameResult ownerFrame(Double timeout) { + return ownerFrame(new ElementHandleOwnerFrameParams(), timeout); + } + + public void press(ElementHandlePressParams params, Double timeout) { + owner.sendMessage("press", params, timeout); + } + + public ElementHandleQuerySelectorResult querySelector(ElementHandleQuerySelectorParams params, Double timeout) { + return owner.sendMessage("querySelector", params, ElementHandleQuerySelectorResult.class, timeout); + } + + public ElementHandleQuerySelectorAllResult querySelectorAll(ElementHandleQuerySelectorAllParams params, Double timeout) { + return owner.sendMessage("querySelectorAll", params, ElementHandleQuerySelectorAllResult.class, timeout); + } + + public ElementHandleScreenshotResult screenshot(ElementHandleScreenshotParams params, Double timeout) { + return owner.sendMessage("screenshot", params, ElementHandleScreenshotResult.class, timeout); + } + + public void scrollIntoViewIfNeeded(ElementHandleScrollIntoViewIfNeededParams params, Double timeout) { + owner.sendMessage("scrollIntoViewIfNeeded", params, timeout); + } + + public void scrollIntoViewIfNeeded(Double timeout) { + scrollIntoViewIfNeeded(new ElementHandleScrollIntoViewIfNeededParams(), timeout); + } + + public ElementHandleSelectOptionResult selectOption(ElementHandleSelectOptionParams params, Double timeout) { + return owner.sendMessage("selectOption", params, ElementHandleSelectOptionResult.class, timeout); + } + + public void selectText(ElementHandleSelectTextParams params, Double timeout) { + owner.sendMessage("selectText", params, timeout); + } + + public void setInputFiles(ElementHandleSetInputFilesParams params, Double timeout) { + owner.sendMessage("setInputFiles", params, timeout); + } + + public void tap(ElementHandleTapParams params, Double timeout) { + owner.sendMessage("tap", params, timeout); + } + + public ElementHandleTextContentResult textContent(ElementHandleTextContentParams params, Double timeout) { + return owner.sendMessage("textContent", params, ElementHandleTextContentResult.class, timeout); + } + + public ElementHandleTextContentResult textContent(Double timeout) { + return textContent(new ElementHandleTextContentParams(), timeout); + } + + public void type(ElementHandleTypeParams params, Double timeout) { + owner.sendMessage("type", params, timeout); + } + + public void uncheck(ElementHandleUncheckParams params, Double timeout) { + owner.sendMessage("uncheck", params, timeout); + } + + public void waitForElementState(ElementHandleWaitForElementStateParams params, Double timeout) { + owner.sendMessage("waitForElementState", params, timeout); + } + + public ElementHandleWaitForSelectorResult waitForSelector(ElementHandleWaitForSelectorParams params, Double timeout) { + return owner.sendMessage("waitForSelector", params, ElementHandleWaitForSelectorResult.class, timeout); + } + + public void dispose(JSHandleDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + public void dispose(Double timeout) { + dispose(new JSHandleDisposeParams(), timeout); + } + + public JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); + } + + public JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); + } + + public JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { + return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); + } + + public JSHandleGetPropertyListResult getPropertyList(Double timeout) { + return getPropertyList(new JSHandleGetPropertyListParams(), timeout); + } + + public JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { + return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); + } + + public JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { + return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); + } + + public JSHandleJsonValueResult jsonValue(Double timeout) { + return jsonValue(new JSHandleJsonValueParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleCheckParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleCheckParams.java new file mode 100644 index 000000000..8cd871d00 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleCheckParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleCheckParams { + public Boolean force; + public String scroll; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleClickParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleClickParams.java new file mode 100644 index 000000000..38e04a60c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleClickParams.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleClickParams { + public Boolean force; + public String scroll; + public Boolean noWaitAfter; + public List modifiers; + public Point position; + public Double delay; + public String button; + public Integer clickCount; + public Boolean trial; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameParams.java new file mode 100644 index 000000000..d0b476858 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleContentFrameParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameResult.java new file mode 100644 index 000000000..31ff58471 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleContentFrameResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleContentFrameResult { + public com.microsoft.playwright.impl.FrameImpl frame; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDblclickParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDblclickParams.java new file mode 100644 index 000000000..2065ee900 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDblclickParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleDblclickParams { + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Double delay; + public String button; + public Boolean trial; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDispatchEventParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDispatchEventParams.java new file mode 100644 index 000000000..cd6a0da1f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleDispatchEventParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleDispatchEventParams { + public String type; + public SerializedArgument eventInit; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllParams.java new file mode 100644 index 000000000..2a39ecb7f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleEvalOnSelectorAllParams { + public String selector; + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllResult.java new file mode 100644 index 000000000..08647a953 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorAllResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleEvalOnSelectorAllResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorParams.java new file mode 100644 index 000000000..80810988a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleEvalOnSelectorParams { + public String selector; + public Boolean strict; + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorResult.java new file mode 100644 index 000000000..bf2d4bd6e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleEvalOnSelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleEvalOnSelectorResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFillParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFillParams.java new file mode 100644 index 000000000..223907882 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFillParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleFillParams { + public String value; + public Boolean force; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFocusParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFocusParams.java new file mode 100644 index 000000000..9ba6fb8c7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleFocusParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleFocusParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeParams.java new file mode 100644 index 000000000..4a7b69c03 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleGetAttributeParams { + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeResult.java new file mode 100644 index 000000000..dd508d1a8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleGetAttributeResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleGetAttributeResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleHoverParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleHoverParams.java new file mode 100644 index 000000000..7cbca48d0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleHoverParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleHoverParams { + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInitializer.java new file mode 100644 index 000000000..acbc3d2b9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInitializer extends JSHandleInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLParams.java new file mode 100644 index 000000000..70aa23c8b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInnerHTMLParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLResult.java new file mode 100644 index 000000000..d4496013e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerHTMLResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInnerHTMLResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextParams.java new file mode 100644 index 000000000..85692620f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInnerTextParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextResult.java new file mode 100644 index 000000000..7ffb49e94 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInnerTextResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInnerTextResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueParams.java new file mode 100644 index 000000000..2a69083d5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInputValueParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueResult.java new file mode 100644 index 000000000..a70a3b1ee --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleInputValueResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleInputValueResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedParams.java new file mode 100644 index 000000000..cdfb18cf6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsCheckedParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedResult.java new file mode 100644 index 000000000..106fa1586 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsCheckedResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsCheckedResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledParams.java new file mode 100644 index 000000000..dd0e88e63 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsDisabledParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledResult.java new file mode 100644 index 000000000..a6a207785 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsDisabledResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsDisabledResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableParams.java new file mode 100644 index 000000000..5ed2a1452 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsEditableParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableResult.java new file mode 100644 index 000000000..e5eb42e73 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEditableResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsEditableResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledParams.java new file mode 100644 index 000000000..c137007f8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsEnabledParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledResult.java new file mode 100644 index 000000000..bb919c227 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsEnabledResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsEnabledResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenParams.java new file mode 100644 index 000000000..19e7bfb0a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsHiddenParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenResult.java new file mode 100644 index 000000000..0d54cf6f5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsHiddenResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsHiddenResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleParams.java new file mode 100644 index 000000000..39bff530c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsVisibleParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleResult.java new file mode 100644 index 000000000..a059a076d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleIsVisibleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleIsVisibleResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameParams.java new file mode 100644 index 000000000..e9600f8be --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleOwnerFrameParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameResult.java new file mode 100644 index 000000000..00a75db4c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleOwnerFrameResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleOwnerFrameResult { + public com.microsoft.playwright.impl.FrameImpl frame; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandlePressParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandlePressParams.java new file mode 100644 index 000000000..69604a90a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandlePressParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandlePressParams { + public String key; + public Double delay; + public Boolean noWaitAfter; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllParams.java new file mode 100644 index 000000000..29e794d40 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleQuerySelectorAllParams { + public String selector; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllResult.java new file mode 100644 index 000000000..38053224f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorAllResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleQuerySelectorAllResult { + public List elements; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorParams.java new file mode 100644 index 000000000..31ce856b1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleQuerySelectorParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorResult.java new file mode 100644 index 000000000..17f5e2974 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleQuerySelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleQuerySelectorResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotParams.java new file mode 100644 index 000000000..bafc60d21 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotParams.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleScreenshotParams { + public String type; + public Integer quality; + public Boolean omitBackground; + public String caret; + public String animations; + public String scale; + public List mask; + public String maskColor; + public String style; + + public static class ElementHandleScreenshotParamsMask { + public com.microsoft.playwright.impl.FrameImpl frame; + public String selector; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotResult.java new file mode 100644 index 000000000..54ba6af98 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScreenshotResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleScreenshotResult { + public byte[] binary; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScrollIntoViewIfNeededParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScrollIntoViewIfNeededParams.java new file mode 100644 index 000000000..5445633ff --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleScrollIntoViewIfNeededParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleScrollIntoViewIfNeededParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionParams.java new file mode 100644 index 000000000..5e5086c5a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionParams.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleSelectOptionParams { + public List elements; + public List options; + public Boolean force; + + public static class ElementHandleSelectOptionParamsOptions { + public String valueOrLabel; + public String value; + public String label; + public Integer index; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionResult.java new file mode 100644 index 000000000..0c28a969b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectOptionResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleSelectOptionResult { + public List values; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectTextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectTextParams.java new file mode 100644 index 000000000..4165f86f8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSelectTextParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleSelectTextParams { + public Boolean force; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSetInputFilesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSetInputFilesParams.java new file mode 100644 index 000000000..18b0b2b00 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleSetInputFilesParams.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleSetInputFilesParams { + public List payloads; + public String localDirectory; + public com.microsoft.playwright.impl.WritableStream directoryStream; + public List localPaths; + public List streams; + + public static class ElementHandleSetInputFilesParamsPayloads { + public String name; + public String mimeType; + public byte[] buffer; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTapParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTapParams.java new file mode 100644 index 000000000..9b9b1ce0e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTapParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ElementHandleTapParams { + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentParams.java new file mode 100644 index 000000000..7df2a445c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleTextContentParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentResult.java new file mode 100644 index 000000000..bec121f14 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTextContentResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleTextContentResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTypeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTypeParams.java new file mode 100644 index 000000000..db6ac1e2b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleTypeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleTypeParams { + public String text; + public Double delay; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleUncheckParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleUncheckParams.java new file mode 100644 index 000000000..0590f05f2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleUncheckParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleUncheckParams { + public Boolean force; + public String scroll; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForElementStateParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForElementStateParams.java new file mode 100644 index 000000000..c356d8a11 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForElementStateParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleWaitForElementStateParams { + public String state; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorParams.java new file mode 100644 index 000000000..130f2abe4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleWaitForSelectorParams { + public String selector; + public Boolean strict; + public String state; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorResult.java new file mode 100644 index 000000000..bd9aa8e8b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ElementHandleWaitForSelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ElementHandleWaitForSelectorResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ExpectedTextValue.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ExpectedTextValue.java new file mode 100644 index 000000000..36e5d6aca --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ExpectedTextValue.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ExpectedTextValue { + public String string; + public String regexSource; + public String regexFlags; + public Boolean matchSubstring; + public Boolean ignoreCase; + public Boolean normalizeWhiteSpace; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FormField.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FormField.java new file mode 100644 index 000000000..25f636743 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FormField.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FormField { + public String name; + public String value; + public FormFieldFile file; + + public static class FormFieldFile { + public String name; + public String mimeType; + public byte[] buffer; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagParams.java new file mode 100644 index 000000000..a4cde37e5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAddScriptTagParams { + public String url; + public String content; + public String type; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagResult.java new file mode 100644 index 000000000..8c8418133 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddScriptTagResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAddScriptTagResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagParams.java new file mode 100644 index 000000000..03ba8e9ff --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAddStyleTagParams { + public String url; + public String content; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagResult.java new file mode 100644 index 000000000..0d0de1922 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAddStyleTagResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAddStyleTagResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONParams.java new file mode 100644 index 000000000..e34f12c01 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAriaSnapshotJSONParams { + public String mode; + public String selector; + public Integer depth; + public Boolean boxes; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONResult.java new file mode 100644 index 000000000..c4120e91f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotJSONResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class FrameAriaSnapshotJSONResult { + public JsonElement snapshot; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotParams.java new file mode 100644 index 000000000..5550c7d4d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAriaSnapshotParams { + public String mode; + public String selector; + public Integer depth; + public Boolean boxes; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotResult.java new file mode 100644 index 000000000..2928fad46 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameAriaSnapshotResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameAriaSnapshotResult { + public String snapshot; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameBlurParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameBlurParams.java new file mode 100644 index 000000000..962a84ddb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameBlurParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameBlurParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameChannel.java new file mode 100644 index 000000000..05f4d038f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameChannel.java @@ -0,0 +1,247 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public FrameChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public FrameEvalOnSelectorResult evalOnSelector(FrameEvalOnSelectorParams params, Double timeout) { + return owner.sendMessage("evalOnSelector", params, FrameEvalOnSelectorResult.class, timeout); + } + + public FrameEvalOnSelectorAllResult evalOnSelectorAll(FrameEvalOnSelectorAllParams params, Double timeout) { + return owner.sendMessage("evalOnSelectorAll", params, FrameEvalOnSelectorAllResult.class, timeout); + } + + public FrameAddScriptTagResult addScriptTag(FrameAddScriptTagParams params, Double timeout) { + return owner.sendMessage("addScriptTag", params, FrameAddScriptTagResult.class, timeout); + } + + public FrameAddStyleTagResult addStyleTag(FrameAddStyleTagParams params, Double timeout) { + return owner.sendMessage("addStyleTag", params, FrameAddStyleTagResult.class, timeout); + } + + public FrameAriaSnapshotResult ariaSnapshot(FrameAriaSnapshotParams params, Double timeout) { + return owner.sendMessage("ariaSnapshot", params, FrameAriaSnapshotResult.class, timeout); + } + + public FrameAriaSnapshotJSONResult ariaSnapshotJSON(FrameAriaSnapshotJSONParams params, Double timeout) { + return owner.sendMessage("ariaSnapshotJSON", params, FrameAriaSnapshotJSONResult.class, timeout); + } + + public void blur(FrameBlurParams params, Double timeout) { + owner.sendMessage("blur", params, timeout); + } + + public void check(FrameCheckParams params, Double timeout) { + owner.sendMessage("check", params, timeout); + } + + public void click(FrameClickParams params, Double timeout) { + owner.sendMessage("click", params, timeout); + } + + public FrameContentResult content(FrameContentParams params, Double timeout) { + return owner.sendMessage("content", params, FrameContentResult.class, timeout); + } + + public void dragAndDrop(FrameDragAndDropParams params, Double timeout) { + owner.sendMessage("dragAndDrop", params, timeout); + } + + public void drop(FrameDropParams params, Double timeout) { + owner.sendMessage("drop", params, timeout); + } + + public void dblclick(FrameDblclickParams params, Double timeout) { + owner.sendMessage("dblclick", params, timeout); + } + + public void dispatchEvent(FrameDispatchEventParams params, Double timeout) { + owner.sendMessage("dispatchEvent", params, timeout); + } + + public FrameEvaluateExpressionResult evaluateExpression(FrameEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, FrameEvaluateExpressionResult.class, timeout); + } + + public FrameEvaluateExpressionHandleResult evaluateExpressionHandle(FrameEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, FrameEvaluateExpressionHandleResult.class, timeout); + } + + public void fill(FrameFillParams params, Double timeout) { + owner.sendMessage("fill", params, timeout); + } + + public void focus(FrameFocusParams params, Double timeout) { + owner.sendMessage("focus", params, timeout); + } + + public FrameFrameElementResult frameElement(FrameFrameElementParams params, Double timeout) { + return owner.sendMessage("frameElement", params, FrameFrameElementResult.class, timeout); + } + + public FrameFrameElementResult frameElement(Double timeout) { + return frameElement(new FrameFrameElementParams(), timeout); + } + + public FrameResolveSelectorResult resolveSelector(FrameResolveSelectorParams params, Double timeout) { + return owner.sendMessage("resolveSelector", params, FrameResolveSelectorResult.class, timeout); + } + + public void highlight(FrameHighlightParams params, Double timeout) { + owner.sendMessage("highlight", params, timeout); + } + + public void hideHighlight(FrameHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + public FrameGetAttributeResult getAttribute(FrameGetAttributeParams params, Double timeout) { + return owner.sendMessage("getAttribute", params, FrameGetAttributeResult.class, timeout); + } + + public FrameGotoResult goto_(FrameGotoParams params, Double timeout) { + return owner.sendMessage("goto", params, FrameGotoResult.class, timeout); + } + + public void hover(FrameHoverParams params, Double timeout) { + owner.sendMessage("hover", params, timeout); + } + + public FrameInnerHTMLResult innerHTML(FrameInnerHTMLParams params, Double timeout) { + return owner.sendMessage("innerHTML", params, FrameInnerHTMLResult.class, timeout); + } + + public FrameInnerTextResult innerText(FrameInnerTextParams params, Double timeout) { + return owner.sendMessage("innerText", params, FrameInnerTextResult.class, timeout); + } + + public FrameInputValueResult inputValue(FrameInputValueParams params, Double timeout) { + return owner.sendMessage("inputValue", params, FrameInputValueResult.class, timeout); + } + + public FrameIsCheckedResult isChecked(FrameIsCheckedParams params, Double timeout) { + return owner.sendMessage("isChecked", params, FrameIsCheckedResult.class, timeout); + } + + public FrameIsDisabledResult isDisabled(FrameIsDisabledParams params, Double timeout) { + return owner.sendMessage("isDisabled", params, FrameIsDisabledResult.class, timeout); + } + + public FrameIsEnabledResult isEnabled(FrameIsEnabledParams params, Double timeout) { + return owner.sendMessage("isEnabled", params, FrameIsEnabledResult.class, timeout); + } + + public FrameIsHiddenResult isHidden(FrameIsHiddenParams params, Double timeout) { + return owner.sendMessage("isHidden", params, FrameIsHiddenResult.class, timeout); + } + + public FrameIsVisibleResult isVisible(FrameIsVisibleParams params, Double timeout) { + return owner.sendMessage("isVisible", params, FrameIsVisibleResult.class, timeout); + } + + public FrameIsEditableResult isEditable(FrameIsEditableParams params, Double timeout) { + return owner.sendMessage("isEditable", params, FrameIsEditableResult.class, timeout); + } + + public void press(FramePressParams params, Double timeout) { + owner.sendMessage("press", params, timeout); + } + + public FrameQuerySelectorResult querySelector(FrameQuerySelectorParams params, Double timeout) { + return owner.sendMessage("querySelector", params, FrameQuerySelectorResult.class, timeout); + } + + public FrameQuerySelectorAllResult querySelectorAll(FrameQuerySelectorAllParams params, Double timeout) { + return owner.sendMessage("querySelectorAll", params, FrameQuerySelectorAllResult.class, timeout); + } + + public FrameQueryCountResult queryCount(FrameQueryCountParams params, Double timeout) { + return owner.sendMessage("queryCount", params, FrameQueryCountResult.class, timeout); + } + + public FrameSelectOptionResult selectOption(FrameSelectOptionParams params, Double timeout) { + return owner.sendMessage("selectOption", params, FrameSelectOptionResult.class, timeout); + } + + public void setContent(FrameSetContentParams params, Double timeout) { + owner.sendMessage("setContent", params, timeout); + } + + public void setInputFiles(FrameSetInputFilesParams params, Double timeout) { + owner.sendMessage("setInputFiles", params, timeout); + } + + public void tap(FrameTapParams params, Double timeout) { + owner.sendMessage("tap", params, timeout); + } + + public FrameTextContentResult textContent(FrameTextContentParams params, Double timeout) { + return owner.sendMessage("textContent", params, FrameTextContentResult.class, timeout); + } + + public FrameTitleResult title(FrameTitleParams params, Double timeout) { + return owner.sendMessage("title", params, FrameTitleResult.class, timeout); + } + + public FrameTitleResult title(Double timeout) { + return title(new FrameTitleParams(), timeout); + } + + public void type(FrameTypeParams params, Double timeout) { + owner.sendMessage("type", params, timeout); + } + + public void uncheck(FrameUncheckParams params, Double timeout) { + owner.sendMessage("uncheck", params, timeout); + } + + public void waitForTimeout(FrameWaitForTimeoutParams params, Double timeout) { + owner.sendMessage("waitForTimeout", params, timeout); + } + + public FrameWaitForFunctionResult waitForFunction(FrameWaitForFunctionParams params, Double timeout) { + return owner.sendMessage("waitForFunction", params, FrameWaitForFunctionResult.class, timeout); + } + + public FrameWaitForSelectorResult waitForSelector(FrameWaitForSelectorParams params, Double timeout) { + return owner.sendMessage("waitForSelector", params, FrameWaitForSelectorResult.class, timeout); + } + + public void expect(FrameExpectParams params, Double timeout) { + owner.sendMessage("expect", params, timeout); + } + + public FrameWebmcpToolsResult webmcpTools(FrameWebmcpToolsParams params, Double timeout) { + return owner.sendMessage("webmcpTools", params, FrameWebmcpToolsResult.class, timeout); + } + + public FrameWebmcpToolsResult webmcpTools(Double timeout) { + return webmcpTools(new FrameWebmcpToolsParams(), timeout); + } + + public FrameWebmcpCallToolResult webmcpCallTool(FrameWebmcpCallToolParams params, Double timeout) { + return owner.sendMessage("webmcpCallTool", params, FrameWebmcpCallToolResult.class, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameCheckParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameCheckParams.java new file mode 100644 index 000000000..cb982f71b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameCheckParams.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameCheckParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameClickParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameClickParams.java new file mode 100644 index 000000000..c32f2225d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameClickParams.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameClickParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public Boolean noWaitAfter; + public List modifiers; + public Point position; + public Double delay; + public String button; + public Integer clickCount; + public Boolean trial; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentParams.java new file mode 100644 index 000000000..985fa61a7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameContentParams { + public Boolean includeShadow; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentResult.java new file mode 100644 index 000000000..0f234774a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameContentResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameContentResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDblclickParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDblclickParams.java new file mode 100644 index 000000000..d86327188 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDblclickParams.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameDblclickParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Double delay; + public String button; + public Boolean trial; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDispatchEventParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDispatchEventParams.java new file mode 100644 index 000000000..1a7e98a40 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDispatchEventParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameDispatchEventParams { + public String selector; + public Boolean strict; + public String type; + public SerializedArgument eventInit; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDragAndDropParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDragAndDropParams.java new file mode 100644 index 000000000..89432a294 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDragAndDropParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameDragAndDropParams { + public String source; + public String target; + public Boolean force; + public String scroll; + public Boolean trial; + public Point sourcePosition; + public Point targetPosition; + public Boolean strict; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDropParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDropParams.java new file mode 100644 index 000000000..384a63dde --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameDropParams.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameDropParams { + public String selector; + public Boolean strict; + public Point position; + public List payloads; + public List localPaths; + public List streams; + public List data; + + public static class FrameDropParamsPayloads { + public String name; + public String mimeType; + public byte[] buffer; + } + + public static class FrameDropParamsData { + public String mimeType; + public String value; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllParams.java new file mode 100644 index 000000000..f39be1b90 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvalOnSelectorAllParams { + public String selector; + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllResult.java new file mode 100644 index 000000000..9a6ba80c5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorAllResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvalOnSelectorAllResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorParams.java new file mode 100644 index 000000000..76f40f962 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvalOnSelectorParams { + public String selector; + public Boolean strict; + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorResult.java new file mode 100644 index 000000000..17637bcc4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvalOnSelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvalOnSelectorResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleParams.java new file mode 100644 index 000000000..a40431783 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvaluateExpressionHandleParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleResult.java new file mode 100644 index 000000000..da323c040 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionHandleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvaluateExpressionHandleResult { + public com.microsoft.playwright.impl.JSHandleImpl handle; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionParams.java new file mode 100644 index 000000000..3b036dded --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvaluateExpressionParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionResult.java new file mode 100644 index 000000000..72bb80962 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameEvaluateExpressionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameEvaluateExpressionResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectErrorDetails.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectErrorDetails.java new file mode 100644 index 000000000..c631fa7c9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectErrorDetails.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameExpectErrorDetails { + public FrameExpectErrorDetailsReceived received; + public Boolean timedOut; + public String customErrorMessage; + + public static class FrameExpectErrorDetailsReceived { + public SerializedValue value; + public String ariaSnapshot; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectParams.java new file mode 100644 index 000000000..8fef9af3c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameExpectParams.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; +import java.util.List; + +public class FrameExpectParams { + public String selector; + public String expression; + public JsonElement expressionArg; + public String pseudo; + public List expectedText; + public Double expectedNumber; + public SerializedArgument expectedValue; + public Boolean useInnerText; + public Boolean isNot; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFillParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFillParams.java new file mode 100644 index 000000000..3149ebd0c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFillParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameFillParams { + public String selector; + public Boolean strict; + public String value; + public Boolean force; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFocusParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFocusParams.java new file mode 100644 index 000000000..dbf30f532 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFocusParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameFocusParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementParams.java new file mode 100644 index 000000000..a641063fe --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameFrameElementParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementResult.java new file mode 100644 index 000000000..1b2ac1f58 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameFrameElementResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameFrameElementResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeParams.java new file mode 100644 index 000000000..c6cfbd6ac --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameGetAttributeParams { + public String selector; + public Boolean strict; + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeResult.java new file mode 100644 index 000000000..95331a693 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGetAttributeResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameGetAttributeResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoParams.java new file mode 100644 index 000000000..09658d3f7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameGotoParams { + public String url; + public String waitUntil; + public String referer; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoResult.java new file mode 100644 index 000000000..629fd7052 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameGotoResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameGotoResult { + public com.microsoft.playwright.impl.ResponseImpl response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHideHighlightParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHideHighlightParams.java new file mode 100644 index 000000000..70b9b0fbd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHideHighlightParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameHideHighlightParams { + public String selector; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHighlightParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHighlightParams.java new file mode 100644 index 000000000..f304986c4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHighlightParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameHighlightParams { + public String selector; + public String style; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHoverParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHoverParams.java new file mode 100644 index 000000000..2afffe2a9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameHoverParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameHoverParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInitializer.java new file mode 100644 index 000000000..bc83cb551 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInitializer.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameInitializer { + public String url; + public String name; + public com.microsoft.playwright.impl.FrameImpl parentFrame; + public List loadStates; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLParams.java new file mode 100644 index 000000000..a783b6be8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInnerHTMLParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLResult.java new file mode 100644 index 000000000..9caa5a6c3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerHTMLResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInnerHTMLResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextParams.java new file mode 100644 index 000000000..4488ad96f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInnerTextParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextResult.java new file mode 100644 index 000000000..0aa943f86 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInnerTextResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInnerTextResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueParams.java new file mode 100644 index 000000000..ba090a302 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInputValueParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueResult.java new file mode 100644 index 000000000..fab8366a7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameInputValueResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameInputValueResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedParams.java new file mode 100644 index 000000000..aa65dd569 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsCheckedParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedResult.java new file mode 100644 index 000000000..6230102c4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsCheckedResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsCheckedResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledParams.java new file mode 100644 index 000000000..9c90b3c88 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsDisabledParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledResult.java new file mode 100644 index 000000000..a93ed3531 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsDisabledResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsDisabledResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableParams.java new file mode 100644 index 000000000..9f915810d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsEditableParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableResult.java new file mode 100644 index 000000000..88d8db643 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEditableResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsEditableResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledParams.java new file mode 100644 index 000000000..9c9a1df53 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsEnabledParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledResult.java new file mode 100644 index 000000000..44d98dda6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsEnabledResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsEnabledResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenParams.java new file mode 100644 index 000000000..cb5dbdeb7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsHiddenParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenResult.java new file mode 100644 index 000000000..ecd72cc6f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsHiddenResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsHiddenResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleParams.java new file mode 100644 index 000000000..7a9d31400 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsVisibleParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleResult.java new file mode 100644 index 000000000..ff4ebc871 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameIsVisibleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameIsVisibleResult { + public Boolean value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameLoadstateEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameLoadstateEvent.java new file mode 100644 index 000000000..c720b00d3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameLoadstateEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameLoadstateEvent { + public String add; + public String remove; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameNavigatedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameNavigatedEvent.java new file mode 100644 index 000000000..b702eab16 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameNavigatedEvent.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameNavigatedEvent { + public String url; + public String name; + public FrameNavigatedEventNewDocument newDocument; + public String error; + + public static class FrameNavigatedEventNewDocument { + public com.microsoft.playwright.impl.RequestImpl request; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FramePressParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FramePressParams.java new file mode 100644 index 000000000..a69d5327d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FramePressParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FramePressParams { + public String selector; + public Boolean strict; + public String key; + public Double delay; + public Boolean noWaitAfter; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountParams.java new file mode 100644 index 000000000..aa9c39898 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameQueryCountParams { + public String selector; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountResult.java new file mode 100644 index 000000000..98b88b5cf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQueryCountResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameQueryCountResult { + public Integer value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllParams.java new file mode 100644 index 000000000..166745d31 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameQuerySelectorAllParams { + public String selector; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllResult.java new file mode 100644 index 000000000..1cd0c9d89 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorAllResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameQuerySelectorAllResult { + public List elements; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorParams.java new file mode 100644 index 000000000..14922dd04 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameQuerySelectorParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorResult.java new file mode 100644 index 000000000..d84eb8872 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameQuerySelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameQuerySelectorResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorParams.java new file mode 100644 index 000000000..1264eaed2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameResolveSelectorParams { + public String selector; + public String sdkLanguage; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorResult.java new file mode 100644 index 000000000..41f5f12af --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameResolveSelectorResult.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameResolveSelectorResult { + public String resolvedSelector; + public String locatorCode; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionParams.java new file mode 100644 index 000000000..2e17b7b38 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionParams.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameSelectOptionParams { + public String selector; + public Boolean strict; + public List elements; + public List options; + public Boolean force; + + public static class FrameSelectOptionParamsOptions { + public String valueOrLabel; + public String value; + public String label; + public Integer index; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionResult.java new file mode 100644 index 000000000..60eec74f3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSelectOptionResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameSelectOptionResult { + public List values; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetContentParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetContentParams.java new file mode 100644 index 000000000..87e2bfead --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetContentParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameSetContentParams { + public String html; + public String waitUntil; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetInputFilesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetInputFilesParams.java new file mode 100644 index 000000000..28935d305 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameSetInputFilesParams.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameSetInputFilesParams { + public String selector; + public Boolean strict; + public List payloads; + public String localDirectory; + public com.microsoft.playwright.impl.WritableStream directoryStream; + public List localPaths; + public List streams; + + public static class FrameSetInputFilesParamsPayloads { + public String name; + public String mimeType; + public byte[] buffer; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTapParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTapParams.java new file mode 100644 index 000000000..a592fb943 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTapParams.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class FrameTapParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public List modifiers; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentParams.java new file mode 100644 index 000000000..9942dbe26 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameTextContentParams { + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentResult.java new file mode 100644 index 000000000..cca29294c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTextContentResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameTextContentResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleParams.java new file mode 100644 index 000000000..2fe5a1885 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameTitleParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleResult.java new file mode 100644 index 000000000..641999958 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTitleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameTitleResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTypeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTypeParams.java new file mode 100644 index 000000000..76c612fcf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameTypeParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameTypeParams { + public String selector; + public Boolean strict; + public String text; + public Double delay; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameUncheckParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameUncheckParams.java new file mode 100644 index 000000000..f7619973e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameUncheckParams.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameUncheckParams { + public String selector; + public Boolean strict; + public Boolean force; + public String scroll; + public Point position; + public Boolean trial; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionParams.java new file mode 100644 index 000000000..ebb0a8521 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionParams.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWaitForFunctionParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; + public Double pollingInterval; + public String selector; + public Boolean strict; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionResult.java new file mode 100644 index 000000000..70b806e26 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForFunctionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWaitForFunctionResult { + public com.microsoft.playwright.impl.JSHandleImpl handle; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorParams.java new file mode 100644 index 000000000..d073c8b90 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorParams.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWaitForSelectorParams { + public String selector; + public Boolean strict; + public String state; + public Boolean omitReturnValue; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorResult.java new file mode 100644 index 000000000..bfc33747a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForSelectorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWaitForSelectorResult { + public com.microsoft.playwright.impl.ElementHandleImpl element; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForTimeoutParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForTimeoutParams.java new file mode 100644 index 000000000..a18686f2c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWaitForTimeoutParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWaitForTimeoutParams { + public Double waitTimeout; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolParams.java new file mode 100644 index 000000000..c84c1779f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWebmcpCallToolParams { + public String name; + public SerializedArgument input; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolResult.java new file mode 100644 index 000000000..dbc7fc291 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpCallToolResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWebmcpCallToolResult { + public SerializedValue result; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsParams.java new file mode 100644 index 000000000..dc0ed1277 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class FrameWebmcpToolsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsResult.java new file mode 100644 index 000000000..00cad5e0c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/FrameWebmcpToolsResult.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; +import java.util.List; + +public class FrameWebmcpToolsResult { + public List tools; + + public static class FrameWebmcpToolsResultTools { + public String name; + public String description; + public JsonElement inputSchema; + public FrameWebmcpToolsResultToolsAnnotations annotations; + + public static class FrameWebmcpToolsResultToolsAnnotations { + public Boolean readOnly; + public Boolean untrustedContent; + public Boolean consequential; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/HttpCredentials.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/HttpCredentials.java new file mode 100644 index 000000000..d4669f721 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/HttpCredentials.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class HttpCredentials { + public String username; + public String password; + public String origin; + public String send; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/IndexedDBDatabase.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/IndexedDBDatabase.java new file mode 100644 index 000000000..a828a4589 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/IndexedDBDatabase.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; +import java.util.List; + +public class IndexedDBDatabase { + public String name; + public Integer version; + public List stores; + + public static class IndexedDBDatabaseStores { + public String name; + public Boolean autoIncrement; + public String keyPath; + public List keyPathArray; + public List records; + public List indexes; + + public static class IndexedDBDatabaseStoresRecords { + public JsonElement key; + public JsonElement keyEncoded; + public JsonElement value; + public JsonElement valueEncoded; + } + + public static class IndexedDBDatabaseStoresIndexes { + public String name; + public String keyPath; + public List keyPathArray; + public Boolean multiEntry; + public Boolean unique; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleChannel.java new file mode 100644 index 000000000..0d7c875a0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleChannel.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public JSHandleChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void dispose(JSHandleDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + public void dispose(Double timeout) { + dispose(new JSHandleDisposeParams(), timeout); + } + + public JSHandleEvaluateExpressionResult evaluateExpression(JSHandleEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, JSHandleEvaluateExpressionResult.class, timeout); + } + + public JSHandleEvaluateExpressionHandleResult evaluateExpressionHandle(JSHandleEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, JSHandleEvaluateExpressionHandleResult.class, timeout); + } + + public JSHandleGetPropertyListResult getPropertyList(JSHandleGetPropertyListParams params, Double timeout) { + return owner.sendMessage("getPropertyList", params, JSHandleGetPropertyListResult.class, timeout); + } + + public JSHandleGetPropertyListResult getPropertyList(Double timeout) { + return getPropertyList(new JSHandleGetPropertyListParams(), timeout); + } + + public JSHandleGetPropertyResult getProperty(JSHandleGetPropertyParams params, Double timeout) { + return owner.sendMessage("getProperty", params, JSHandleGetPropertyResult.class, timeout); + } + + public JSHandleJsonValueResult jsonValue(JSHandleJsonValueParams params, Double timeout) { + return owner.sendMessage("jsonValue", params, JSHandleJsonValueResult.class, timeout); + } + + public JSHandleJsonValueResult jsonValue(Double timeout) { + return jsonValue(new JSHandleJsonValueParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleDisposeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleDisposeParams.java new file mode 100644 index 000000000..0afcfc580 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleDisposeParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleDisposeParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleParams.java new file mode 100644 index 000000000..da2d753e6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleEvaluateExpressionHandleParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleResult.java new file mode 100644 index 000000000..f22f2fc89 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionHandleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleEvaluateExpressionHandleResult { + public com.microsoft.playwright.impl.JSHandleImpl handle; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionParams.java new file mode 100644 index 000000000..9cc3561d7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleEvaluateExpressionParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionResult.java new file mode 100644 index 000000000..34b2b48ba --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleEvaluateExpressionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleEvaluateExpressionResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListParams.java new file mode 100644 index 000000000..f6de464b3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleGetPropertyListParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListResult.java new file mode 100644 index 000000000..016a74a45 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyListResult.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class JSHandleGetPropertyListResult { + public List properties; + + public static class JSHandleGetPropertyListResultProperties { + public String name; + public com.microsoft.playwright.impl.JSHandleImpl value; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyParams.java new file mode 100644 index 000000000..ec0cf48db --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleGetPropertyParams { + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyResult.java new file mode 100644 index 000000000..7c2f4c794 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleGetPropertyResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleGetPropertyResult { + public com.microsoft.playwright.impl.JSHandleImpl handle; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleInitializer.java new file mode 100644 index 000000000..de9893c19 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleInitializer { + public String preview; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueParams.java new file mode 100644 index 000000000..4658c334d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleJsonValueParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueResult.java new file mode 100644 index 000000000..8c4f98c32 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandleJsonValueResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandleJsonValueResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandlePreviewUpdatedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandlePreviewUpdatedEvent.java new file mode 100644 index 000000000..089114bd9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JSHandlePreviewUpdatedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JSHandlePreviewUpdatedEvent { + public String preview; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeChannel.java similarity index 61% rename from playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeChannel.java index 5cad7bf75..dfb9e2361 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/JsonPipeChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeChannel.java @@ -16,44 +16,24 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -import com.google.gson.JsonElement; +public class JsonPipeChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; -class JsonPipeChannel { - private final ChannelOwner owner; - - JsonPipeChannel(ChannelOwner owner) { + public JsonPipeChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void send(JsonPipeSendParams params, Double timeout) { + public void send(JsonPipeSendParams params, Double timeout) { owner.sendMessage("send", params, timeout); } - void close(JsonPipeCloseParams params, Double timeout) { + public void close(JsonPipeCloseParams params, Double timeout) { owner.sendMessage("close", params, timeout); } - void close(Double timeout) { + public void close(Double timeout) { close(new JsonPipeCloseParams(), timeout); } } - -class JsonPipeInitializer { -} - -class JsonPipeSendParams { - JsonElement message; -} - -class JsonPipeCloseParams { -} - -class JsonPipeMessageEvent { - JsonElement message; -} - -class JsonPipeClosedEvent { - String reason; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeCloseParams.java new file mode 100644 index 000000000..a2f073429 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeCloseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JsonPipeCloseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeClosedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeClosedEvent.java new file mode 100644 index 000000000..d6d3c1afa --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeClosedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JsonPipeClosedEvent { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeInitializer.java new file mode 100644 index 000000000..b63a2e534 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class JsonPipeInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeMessageEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeMessageEvent.java new file mode 100644 index 000000000..8738c8578 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeMessageEvent.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class JsonPipeMessageEvent { + public JsonElement message; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeSendParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeSendParams.java new file mode 100644 index 000000000..aef5343cb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeSendParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class JsonPipeSendParams { + public JsonElement message; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LifecycleEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LifecycleEvent.java new file mode 100644 index 000000000..e023b633e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LifecycleEvent.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LifecycleEvent { + public static final String LOAD = "load"; + public static final String DOMCONTENTLOADED = "domcontentloaded"; + public static final String NETWORKIDLE = "networkidle"; + public static final String COMMIT = "commit"; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAddStackToTracingNoReplyParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAddStackToTracingNoReplyParams.java new file mode 100644 index 000000000..42e4290a6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAddStackToTracingNoReplyParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsAddStackToTracingNoReplyParams { + public ClientSideCallMetadata callData; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionParams.java new file mode 100644 index 000000000..f3bd4abc9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsAsLocatorDescriptionParams { + public String selector; + public String sdkLanguage; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionResult.java new file mode 100644 index 000000000..4df0cc58b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsAsLocatorDescriptionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsAsLocatorDescriptionResult { + public String description; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsChannel.java new file mode 100644 index 000000000..a3c099bcd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsChannel.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public LocalUtilsChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void zip(LocalUtilsZipParams params, Double timeout) { + owner.sendMessage("zip", params, timeout); + } + + public LocalUtilsHarOpenResult harOpen(LocalUtilsHarOpenParams params, Double timeout) { + return owner.sendMessage("harOpen", params, LocalUtilsHarOpenResult.class, timeout); + } + + public LocalUtilsHarLookupResult harLookup(LocalUtilsHarLookupParams params, Double timeout) { + return owner.sendMessage("harLookup", params, LocalUtilsHarLookupResult.class, timeout); + } + + public void harClose(LocalUtilsHarCloseParams params, Double timeout) { + owner.sendMessage("harClose", params, timeout); + } + + public void harUnzip(LocalUtilsHarUnzipParams params, Double timeout) { + owner.sendMessage("harUnzip", params, timeout); + } + + public LocalUtilsConnectResult connect(LocalUtilsConnectParams params, Double timeout) { + return owner.sendMessage("connect", params, LocalUtilsConnectResult.class, timeout); + } + + public LocalUtilsTracingStartedResult tracingStarted(LocalUtilsTracingStartedParams params, Double timeout) { + return owner.sendMessage("tracingStarted", params, LocalUtilsTracingStartedResult.class, timeout); + } + + public void addStackToTracingNoReply(LocalUtilsAddStackToTracingNoReplyParams params, Double timeout) { + owner.sendMessage("addStackToTracingNoReply", params, timeout); + } + + public void traceDiscarded(LocalUtilsTraceDiscardedParams params, Double timeout) { + owner.sendMessage("traceDiscarded", params, timeout); + } + + public LocalUtilsGlobToRegexResult globToRegex(LocalUtilsGlobToRegexParams params, Double timeout) { + return owner.sendMessage("globToRegex", params, LocalUtilsGlobToRegexResult.class, timeout); + } + + public LocalUtilsAsLocatorDescriptionResult asLocatorDescription(LocalUtilsAsLocatorDescriptionParams params, Double timeout) { + return owner.sendMessage("asLocatorDescription", params, LocalUtilsAsLocatorDescriptionResult.class, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectParams.java new file mode 100644 index 000000000..d2408373c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import com.google.gson.JsonElement; + +public class LocalUtilsConnectParams { + public String endpoint; + public JsonElement headers; + public String exposeNetwork; + public Double slowMo; + public Integer socksProxyRedirectPortForTest; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectResult.java new file mode 100644 index 000000000..147371913 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsConnectResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class LocalUtilsConnectResult { + public com.microsoft.playwright.impl.JsonPipe pipe; + public List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexParams.java new file mode 100644 index 000000000..2fa1d4ecf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsGlobToRegexParams { + public String glob; + public String baseURL; + public Boolean webSocketUrl; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexResult.java new file mode 100644 index 000000000..177f3c7c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsGlobToRegexResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsGlobToRegexResult { + public String regex; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarCloseParams.java new file mode 100644 index 000000000..1bd2a1a24 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarCloseParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsHarCloseParams { + public String harId; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupParams.java new file mode 100644 index 000000000..114ec4c34 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupParams.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class LocalUtilsHarLookupParams { + public String harId; + public String url; + public String method; + public List headers; + public byte[] postData; + public Boolean isNavigationRequest; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupResult.java new file mode 100644 index 000000000..6adc13787 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarLookupResult.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class LocalUtilsHarLookupResult { + public String action; + public String message; + public String redirectURL; + public Integer status; + public List headers; + public byte[] body; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenParams.java new file mode 100644 index 000000000..4dabec83c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsHarOpenParams { + public String file; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenResult.java new file mode 100644 index 000000000..96168a67b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarOpenResult.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsHarOpenResult { + public String harId; + public String error; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarUnzipParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarUnzipParams.java new file mode 100644 index 000000000..e2fee7a2e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsHarUnzipParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsHarUnzipParams { + public String zipFile; + public String harFile; + public String resourcesDir; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsInitializer.java new file mode 100644 index 000000000..39eb2b47d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsInitializer.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class LocalUtilsInitializer { + public List deviceDescriptors; + + public static class LocalUtilsInitializerDeviceDescriptors { + public String name; + public LocalUtilsInitializerDeviceDescriptorsDescriptor descriptor; + + public static class LocalUtilsInitializerDeviceDescriptorsDescriptor { + public String userAgent; + public LocalUtilsInitializerDeviceDescriptorsDescriptorViewport viewport; + public LocalUtilsInitializerDeviceDescriptorsDescriptorScreen screen; + public Double deviceScaleFactor; + public Boolean isMobile; + public Boolean hasTouch; + public String defaultBrowserType; + + public static class LocalUtilsInitializerDeviceDescriptorsDescriptorViewport { + public Integer width; + public Integer height; + } + + public static class LocalUtilsInitializerDeviceDescriptorsDescriptorScreen { + public Integer width; + public Integer height; + } + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTraceDiscardedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTraceDiscardedParams.java new file mode 100644 index 000000000..2a8b654ff --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTraceDiscardedParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsTraceDiscardedParams { + public String stacksId; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedParams.java new file mode 100644 index 000000000..92b4d4ca3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsTracingStartedParams { + public String tracesDir; + public String traceName; + public Boolean live; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedResult.java new file mode 100644 index 000000000..8e553b889 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsTracingStartedResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class LocalUtilsTracingStartedResult { + public String stacksId; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsZipParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsZipParams.java new file mode 100644 index 000000000..ec9f07ab7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/LocalUtilsZipParams.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class LocalUtilsZipParams { + public String zipFile; + public List entries; + public String stacksId; + public String mode; + public Boolean includeSources; + public List additionalSources; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Metadata.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Metadata.java new file mode 100644 index 000000000..32c0107ad --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Metadata.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class Metadata { + public MetadataLocation location; + public String title; + public Boolean internal; + public Double timeout; + + public static class MetadataLocation { + public String file; + public Integer line; + public Integer column; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NameValue.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NameValue.java new file mode 100644 index 000000000..331d7690d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NameValue.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class NameValue { + public String name; + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NetworkCookie.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NetworkCookie.java new file mode 100644 index 000000000..8fd4c81ab --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/NetworkCookie.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class NetworkCookie { + public String name; + public String value; + public String domain; + public String path; + public Double expires; + public Boolean httpOnly; + public Boolean secure; + public String sameSite; + public String partitionKey; + public Boolean _crHasCrossSiteAncestor; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OPFSEntry.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OPFSEntry.java new file mode 100644 index 000000000..3d71cdd7b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OPFSEntry.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class OPFSEntry { + public String path; + public String type; + public String base64; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OriginStorage.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OriginStorage.java new file mode 100644 index 000000000..f49754450 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/OriginStorage.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class OriginStorage { + public String origin; + public List localStorage; + public List indexedDB; + public List opfs; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptParams.java new file mode 100644 index 000000000..210b5cd35 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageAddInitScriptParams { + public String source; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptResult.java new file mode 100644 index 000000000..589f25832 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageAddInitScriptResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageAddInitScriptResult { + public com.microsoft.playwright.impl.DisposableObject disposable; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBindingCallEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBindingCallEvent.java new file mode 100644 index 000000000..642b2edd7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBindingCallEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageBindingCallEvent { + public com.microsoft.playwright.impl.BindingCall binding; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBringToFrontParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBringToFrontParams.java new file mode 100644 index 000000000..e24599e9c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageBringToFrontParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageBringToFrontParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCancelPickLocatorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCancelPickLocatorParams.java new file mode 100644 index 000000000..5dd0d324c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCancelPickLocatorParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageCancelPickLocatorParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageChannel.java new file mode 100644 index 000000000..63d0e42fa --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageChannel.java @@ -0,0 +1,315 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public PageChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public PageAddInitScriptResult addInitScript(PageAddInitScriptParams params, Double timeout) { + return owner.sendMessage("addInitScript", params, PageAddInitScriptResult.class, timeout); + } + + public void close(PageCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public void runBeforeUnload(PageRunBeforeUnloadParams params, Double timeout) { + owner.sendMessage("runBeforeUnload", params, timeout); + } + + public void runBeforeUnload(Double timeout) { + runBeforeUnload(new PageRunBeforeUnloadParams(), timeout); + } + + public void clearConsoleMessages(PageClearConsoleMessagesParams params, Double timeout) { + owner.sendMessage("clearConsoleMessages", params, timeout); + } + + public void clearConsoleMessages(Double timeout) { + clearConsoleMessages(new PageClearConsoleMessagesParams(), timeout); + } + + public PageConsoleMessagesResult consoleMessages(PageConsoleMessagesParams params, Double timeout) { + return owner.sendMessage("consoleMessages", params, PageConsoleMessagesResult.class, timeout); + } + + public void emulateMedia(PageEmulateMediaParams params, Double timeout) { + owner.sendMessage("emulateMedia", params, timeout); + } + + public PageExposeBindingResult exposeBinding(PageExposeBindingParams params, Double timeout) { + return owner.sendMessage("exposeBinding", params, PageExposeBindingResult.class, timeout); + } + + public PageGoBackResult goBack(PageGoBackParams params, Double timeout) { + return owner.sendMessage("goBack", params, PageGoBackResult.class, timeout); + } + + public PageGoForwardResult goForward(PageGoForwardParams params, Double timeout) { + return owner.sendMessage("goForward", params, PageGoForwardResult.class, timeout); + } + + public void requestGC(PageRequestGCParams params, Double timeout) { + owner.sendMessage("requestGC", params, timeout); + } + + public void requestGC(Double timeout) { + requestGC(new PageRequestGCParams(), timeout); + } + + public PageRegisterLocatorHandlerResult registerLocatorHandler(PageRegisterLocatorHandlerParams params, Double timeout) { + return owner.sendMessage("registerLocatorHandler", params, PageRegisterLocatorHandlerResult.class, timeout); + } + + public void resolveLocatorHandlerNoReply(PageResolveLocatorHandlerNoReplyParams params, Double timeout) { + owner.sendMessage("resolveLocatorHandlerNoReply", params, timeout); + } + + public void unregisterLocatorHandler(PageUnregisterLocatorHandlerParams params, Double timeout) { + owner.sendMessage("unregisterLocatorHandler", params, timeout); + } + + public PageReloadResult reload(PageReloadParams params, Double timeout) { + return owner.sendMessage("reload", params, PageReloadResult.class, timeout); + } + + public PageExpectScreenshotResult expectScreenshot(PageExpectScreenshotParams params, Double timeout) { + return owner.sendMessage("expectScreenshot", params, PageExpectScreenshotResult.class, timeout); + } + + public PageScreenshotResult screenshot(PageScreenshotParams params, Double timeout) { + return owner.sendMessage("screenshot", params, PageScreenshotResult.class, timeout); + } + + public void setExtraHTTPHeaders(PageSetExtraHTTPHeadersParams params, Double timeout) { + owner.sendMessage("setExtraHTTPHeaders", params, timeout); + } + + public void setNetworkInterceptionPatterns(PageSetNetworkInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setNetworkInterceptionPatterns", params, timeout); + } + + public void setWebSocketInterceptionPatterns(PageSetWebSocketInterceptionPatternsParams params, Double timeout) { + owner.sendMessage("setWebSocketInterceptionPatterns", params, timeout); + } + + public void setViewportSize(PageSetViewportSizeParams params, Double timeout) { + owner.sendMessage("setViewportSize", params, timeout); + } + + public void keyboardDown(PageKeyboardDownParams params, Double timeout) { + owner.sendMessage("keyboardDown", params, timeout); + } + + public void keyboardUp(PageKeyboardUpParams params, Double timeout) { + owner.sendMessage("keyboardUp", params, timeout); + } + + public void keyboardInsertText(PageKeyboardInsertTextParams params, Double timeout) { + owner.sendMessage("keyboardInsertText", params, timeout); + } + + public void keyboardType(PageKeyboardTypeParams params, Double timeout) { + owner.sendMessage("keyboardType", params, timeout); + } + + public void keyboardPress(PageKeyboardPressParams params, Double timeout) { + owner.sendMessage("keyboardPress", params, timeout); + } + + public void mouseMove(PageMouseMoveParams params, Double timeout) { + owner.sendMessage("mouseMove", params, timeout); + } + + public void mouseDown(PageMouseDownParams params, Double timeout) { + owner.sendMessage("mouseDown", params, timeout); + } + + public void mouseUp(PageMouseUpParams params, Double timeout) { + owner.sendMessage("mouseUp", params, timeout); + } + + public void mouseClick(PageMouseClickParams params, Double timeout) { + owner.sendMessage("mouseClick", params, timeout); + } + + public void mouseWheel(PageMouseWheelParams params, Double timeout) { + owner.sendMessage("mouseWheel", params, timeout); + } + + public void touchscreenTap(PageTouchscreenTapParams params, Double timeout) { + owner.sendMessage("touchscreenTap", params, timeout); + } + + public void clearPageErrors(PageClearPageErrorsParams params, Double timeout) { + owner.sendMessage("clearPageErrors", params, timeout); + } + + public void clearPageErrors(Double timeout) { + clearPageErrors(new PageClearPageErrorsParams(), timeout); + } + + public PagePageErrorsResult pageErrors(PagePageErrorsParams params, Double timeout) { + return owner.sendMessage("pageErrors", params, PagePageErrorsResult.class, timeout); + } + + public PagePdfResult pdf(PagePdfParams params, Double timeout) { + return owner.sendMessage("pdf", params, PagePdfResult.class, timeout); + } + + public PageRequestsResult requests(PageRequestsParams params, Double timeout) { + return owner.sendMessage("requests", params, PageRequestsResult.class, timeout); + } + + public PageRequestsResult requests(Double timeout) { + return requests(new PageRequestsParams(), timeout); + } + + public void startJSCoverage(PageStartJSCoverageParams params, Double timeout) { + owner.sendMessage("startJSCoverage", params, timeout); + } + + public PageStopJSCoverageResult stopJSCoverage(PageStopJSCoverageParams params, Double timeout) { + return owner.sendMessage("stopJSCoverage", params, PageStopJSCoverageResult.class, timeout); + } + + public PageStopJSCoverageResult stopJSCoverage(Double timeout) { + return stopJSCoverage(new PageStopJSCoverageParams(), timeout); + } + + public void startCSSCoverage(PageStartCSSCoverageParams params, Double timeout) { + owner.sendMessage("startCSSCoverage", params, timeout); + } + + public PageStopCSSCoverageResult stopCSSCoverage(PageStopCSSCoverageParams params, Double timeout) { + return owner.sendMessage("stopCSSCoverage", params, PageStopCSSCoverageResult.class, timeout); + } + + public PageStopCSSCoverageResult stopCSSCoverage(Double timeout) { + return stopCSSCoverage(new PageStopCSSCoverageParams(), timeout); + } + + public void bringToFront(PageBringToFrontParams params, Double timeout) { + owner.sendMessage("bringToFront", params, timeout); + } + + public void bringToFront(Double timeout) { + bringToFront(new PageBringToFrontParams(), timeout); + } + + public PagePickLocatorResult pickLocator(PagePickLocatorParams params, Double timeout) { + return owner.sendMessage("pickLocator", params, PagePickLocatorResult.class, timeout); + } + + public PagePickLocatorResult pickLocator(Double timeout) { + return pickLocator(new PagePickLocatorParams(), timeout); + } + + public void cancelPickLocator(PageCancelPickLocatorParams params, Double timeout) { + owner.sendMessage("cancelPickLocator", params, timeout); + } + + public void cancelPickLocator(Double timeout) { + cancelPickLocator(new PageCancelPickLocatorParams(), timeout); + } + + public void hideHighlight(PageHideHighlightParams params, Double timeout) { + owner.sendMessage("hideHighlight", params, timeout); + } + + public void hideHighlight(Double timeout) { + hideHighlight(new PageHideHighlightParams(), timeout); + } + + public PageScreencastShowOverlayResult screencastShowOverlay(PageScreencastShowOverlayParams params, Double timeout) { + return owner.sendMessage("screencastShowOverlay", params, PageScreencastShowOverlayResult.class, timeout); + } + + public void screencastRemoveOverlay(PageScreencastRemoveOverlayParams params, Double timeout) { + owner.sendMessage("screencastRemoveOverlay", params, timeout); + } + + public void screencastChapter(PageScreencastChapterParams params, Double timeout) { + owner.sendMessage("screencastChapter", params, timeout); + } + + public void screencastSetOverlayVisible(PageScreencastSetOverlayVisibleParams params, Double timeout) { + owner.sendMessage("screencastSetOverlayVisible", params, timeout); + } + + public void screencastShowActions(PageScreencastShowActionsParams params, Double timeout) { + owner.sendMessage("screencastShowActions", params, timeout); + } + + public void screencastHideActions(PageScreencastHideActionsParams params, Double timeout) { + owner.sendMessage("screencastHideActions", params, timeout); + } + + public void screencastHideActions(Double timeout) { + screencastHideActions(new PageScreencastHideActionsParams(), timeout); + } + + public PageScreencastStartResult screencastStart(PageScreencastStartParams params, Double timeout) { + return owner.sendMessage("screencastStart", params, PageScreencastStartResult.class, timeout); + } + + public void screencastFrameAck(PageScreencastFrameAckParams params, Double timeout) { + owner.sendMessage("screencastFrameAck", params, timeout); + } + + public void screencastStop(PageScreencastStopParams params, Double timeout) { + owner.sendMessage("screencastStop", params, timeout); + } + + public void screencastStop(Double timeout) { + screencastStop(new PageScreencastStopParams(), timeout); + } + + public void updateSubscription(PageUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } + + public void setDockTile(PageSetDockTileParams params, Double timeout) { + owner.sendMessage("setDockTile", params, timeout); + } + + public PageWebStorageItemsResult webStorageItems(PageWebStorageItemsParams params, Double timeout) { + return owner.sendMessage("webStorageItems", params, PageWebStorageItemsResult.class, timeout); + } + + public PageWebStorageGetItemResult webStorageGetItem(PageWebStorageGetItemParams params, Double timeout) { + return owner.sendMessage("webStorageGetItem", params, PageWebStorageGetItemResult.class, timeout); + } + + public void webStorageSetItem(PageWebStorageSetItemParams params, Double timeout) { + owner.sendMessage("webStorageSetItem", params, timeout); + } + + public void webStorageRemoveItem(PageWebStorageRemoveItemParams params, Double timeout) { + owner.sendMessage("webStorageRemoveItem", params, timeout); + } + + public void webStorageClear(PageWebStorageClearParams params, Double timeout) { + owner.sendMessage("webStorageClear", params, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearConsoleMessagesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearConsoleMessagesParams.java new file mode 100644 index 000000000..88cfa1a33 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearConsoleMessagesParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageClearConsoleMessagesParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearPageErrorsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearPageErrorsParams.java new file mode 100644 index 000000000..d225ae475 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageClearPageErrorsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageClearPageErrorsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseEvent.java new file mode 100644 index 000000000..7bd7a1edd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseParams.java new file mode 100644 index 000000000..54ae0f810 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCloseParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageCloseParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesParams.java new file mode 100644 index 000000000..eeea0937f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageConsoleMessagesParams { + public String filter; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesResult.java new file mode 100644 index 000000000..cc7b5931f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageConsoleMessagesResult.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageConsoleMessagesResult { + public List messages; + + public static class PageConsoleMessagesResultMessages { + public String type; + public String text; + public List args; + public PageConsoleMessagesResultMessagesLocation location; + public Double timestamp; + + public static class PageConsoleMessagesResultMessagesLocation { + public String url; + public Integer lineNumber; + public Integer columnNumber; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCrashEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCrashEvent.java new file mode 100644 index 000000000..2833ec782 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageCrashEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageCrashEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageDownloadEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageDownloadEvent.java new file mode 100644 index 000000000..343a4d161 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageDownloadEvent.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageDownloadEvent { + public String url; + public String suggestedFilename; + public com.microsoft.playwright.impl.ArtifactImpl artifact; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageEmulateMediaParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageEmulateMediaParams.java new file mode 100644 index 000000000..99da4b877 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageEmulateMediaParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageEmulateMediaParams { + public String media; + public String colorScheme; + public String reducedMotion; + public String forcedColors; + public String contrast; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotErrorDetails.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotErrorDetails.java new file mode 100644 index 000000000..39d641d3c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotErrorDetails.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageExpectScreenshotErrorDetails { + public byte[] diff; + public String customErrorMessage; + public byte[] actual; + public byte[] previous; + public Boolean timedOut; + public List log; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotParams.java new file mode 100644 index 000000000..dbfa313ec --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotParams.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageExpectScreenshotParams { + public byte[] expected; + public Boolean isNot; + public PageExpectScreenshotParamsLocator locator; + public String comparator; + public Integer maxDiffPixels; + public Double maxDiffPixelRatio; + public Double threshold; + public Boolean fullPage; + public Rect clip; + public String type; + public Boolean omitBackground; + public String caret; + public String animations; + public String scale; + public List mask; + public String maskColor; + public String style; + + public static class PageExpectScreenshotParamsLocator { + public com.microsoft.playwright.impl.FrameImpl frame; + public String selector; + } + + public static class PageExpectScreenshotParamsMask { + public com.microsoft.playwright.impl.FrameImpl frame; + public String selector; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotResult.java new file mode 100644 index 000000000..207d3b420 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExpectScreenshotResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageExpectScreenshotResult { + public byte[] actual; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingParams.java new file mode 100644 index 000000000..ba597a343 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageExposeBindingParams { + public String name; + public Boolean noGlobal; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingResult.java new file mode 100644 index 000000000..e28fae0b8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageExposeBindingResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageExposeBindingResult { + public com.microsoft.playwright.impl.DisposableObject disposable; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFileChooserEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFileChooserEvent.java new file mode 100644 index 000000000..8245875b6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFileChooserEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageFileChooserEvent { + public com.microsoft.playwright.impl.ElementHandleImpl element; + public Boolean isMultiple; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameAttachedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameAttachedEvent.java new file mode 100644 index 000000000..0571b2344 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameAttachedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageFrameAttachedEvent { + public com.microsoft.playwright.impl.FrameImpl frame; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameDetachedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameDetachedEvent.java new file mode 100644 index 000000000..6fbc2a3ca --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageFrameDetachedEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageFrameDetachedEvent { + public com.microsoft.playwright.impl.FrameImpl frame; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackParams.java new file mode 100644 index 000000000..3de078fc7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageGoBackParams { + public String waitUntil; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackResult.java new file mode 100644 index 000000000..0a686bba5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoBackResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageGoBackResult { + public com.microsoft.playwright.impl.ResponseImpl response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardParams.java new file mode 100644 index 000000000..09bb31356 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageGoForwardParams { + public String waitUntil; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardResult.java new file mode 100644 index 000000000..132083468 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageGoForwardResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageGoForwardResult { + public com.microsoft.playwright.impl.ResponseImpl response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageHideHighlightParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageHideHighlightParams.java new file mode 100644 index 000000000..7314d59c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageHideHighlightParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageHideHighlightParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageInitializer.java new file mode 100644 index 000000000..91eed59be --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageInitializer.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageInitializer { + public com.microsoft.playwright.impl.FrameImpl mainFrame; + public PageInitializerViewportSize viewportSize; + public Boolean isClosed; + public com.microsoft.playwright.impl.PageImpl opener; + public com.microsoft.playwright.impl.ArtifactImpl video; + + public static class PageInitializerViewportSize { + public Integer width; + public Integer height; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardDownParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardDownParams.java new file mode 100644 index 000000000..99a36cc23 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardDownParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageKeyboardDownParams { + public String key; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardInsertTextParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardInsertTextParams.java new file mode 100644 index 000000000..cb220ece3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardInsertTextParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageKeyboardInsertTextParams { + public String text; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardPressParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardPressParams.java new file mode 100644 index 000000000..622f06c6b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardPressParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageKeyboardPressParams { + public String key; + public Double delay; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardTypeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardTypeParams.java new file mode 100644 index 000000000..c3d524b19 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardTypeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageKeyboardTypeParams { + public String text; + public Double delay; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardUpParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardUpParams.java new file mode 100644 index 000000000..be583b3c3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageKeyboardUpParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageKeyboardUpParams { + public String key; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageLocatorHandlerTriggeredEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageLocatorHandlerTriggeredEvent.java new file mode 100644 index 000000000..f901dde2a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageLocatorHandlerTriggeredEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageLocatorHandlerTriggeredEvent { + public Integer uid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseClickParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseClickParams.java new file mode 100644 index 000000000..63763e503 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseClickParams.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageMouseClickParams { + public Double x; + public Double y; + public Double delay; + public String button; + public Integer clickCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseDownParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseDownParams.java new file mode 100644 index 000000000..f0ddbb6f1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseDownParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageMouseDownParams { + public String button; + public Integer clickCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseMoveParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseMoveParams.java new file mode 100644 index 000000000..1408a0ab7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseMoveParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageMouseMoveParams { + public Double x; + public Double y; + public Integer steps; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseUpParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseUpParams.java new file mode 100644 index 000000000..313229267 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseUpParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageMouseUpParams { + public String button; + public Integer clickCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseWheelParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseWheelParams.java new file mode 100644 index 000000000..e65669439 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageMouseWheelParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageMouseWheelParams { + public Double deltaX; + public Double deltaY; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsParams.java new file mode 100644 index 000000000..17e647222 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PagePageErrorsParams { + public String filter; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsResult.java new file mode 100644 index 000000000..2806ec83f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePageErrorsResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PagePageErrorsResult { + public List errors; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfParams.java new file mode 100644 index 000000000..78efa72d6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfParams.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PagePdfParams { + public Double scale; + public Boolean displayHeaderFooter; + public String headerTemplate; + public String footerTemplate; + public Boolean printBackground; + public Boolean landscape; + public String pageRanges; + public String format; + public String width; + public String height; + public Boolean preferCSSPageSize; + public PagePdfParamsMargin margin; + public Boolean tagged; + public Boolean outline; + + public static class PagePdfParamsMargin { + public String top; + public String bottom; + public String left; + public String right; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfResult.java new file mode 100644 index 000000000..d4dfdce61 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePdfResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PagePdfResult { + public byte[] pdf; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorParams.java new file mode 100644 index 000000000..18559bcd5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PagePickLocatorParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorResult.java new file mode 100644 index 000000000..7796dd615 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PagePickLocatorResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PagePickLocatorResult { + public String selector; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerParams.java new file mode 100644 index 000000000..40923a4ba --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRegisterLocatorHandlerParams { + public String selector; + public Boolean noWaitAfter; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerResult.java new file mode 100644 index 000000000..0062da925 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRegisterLocatorHandlerResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRegisterLocatorHandlerResult { + public Integer uid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadParams.java new file mode 100644 index 000000000..58b23283d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageReloadParams { + public String waitUntil; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadResult.java new file mode 100644 index 000000000..15309c99c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageReloadResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageReloadResult { + public com.microsoft.playwright.impl.ResponseImpl response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestGCParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestGCParams.java new file mode 100644 index 000000000..9c9a52a5c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestGCParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRequestGCParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsParams.java new file mode 100644 index 000000000..4310e0ca2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRequestsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsResult.java new file mode 100644 index 000000000..6ead10df4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRequestsResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageRequestsResult { + public List requests; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageResolveLocatorHandlerNoReplyParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageResolveLocatorHandlerNoReplyParams.java new file mode 100644 index 000000000..8cbf12632 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageResolveLocatorHandlerNoReplyParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageResolveLocatorHandlerNoReplyParams { + public Integer uid; + public Boolean remove; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRouteEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRouteEvent.java new file mode 100644 index 000000000..690e3356e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRouteEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRouteEvent { + public com.microsoft.playwright.impl.RouteImpl route; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRunBeforeUnloadParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRunBeforeUnloadParams.java new file mode 100644 index 000000000..e8c7b80fd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageRunBeforeUnloadParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageRunBeforeUnloadParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastChapterParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastChapterParams.java new file mode 100644 index 000000000..b288b79bf --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastChapterParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastChapterParams { + public String title; + public String description; + public Double duration; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameAckParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameAckParams.java new file mode 100644 index 000000000..43c98ca5e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameAckParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastFrameAckParams { + public Integer frameId; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameEvent.java new file mode 100644 index 000000000..39a2d5ef4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastFrameEvent.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastFrameEvent { + public Integer frameId; + public byte[] data; + public Double timestamp; + public Integer viewportWidth; + public Integer viewportHeight; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastHideActionsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastHideActionsParams.java new file mode 100644 index 000000000..f95f7a096 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastHideActionsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastHideActionsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastRemoveOverlayParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastRemoveOverlayParams.java new file mode 100644 index 000000000..d5406cd72 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastRemoveOverlayParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastRemoveOverlayParams { + public String id; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastSetOverlayVisibleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastSetOverlayVisibleParams.java new file mode 100644 index 000000000..06d64de0f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastSetOverlayVisibleParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastSetOverlayVisibleParams { + public Boolean visible; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowActionsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowActionsParams.java new file mode 100644 index 000000000..7628ca633 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowActionsParams.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastShowActionsParams { + public Double duration; + public String position; + public Integer fontSize; + public String cursor; + public PageScreencastShowActionsParamsStyle style; + + public static class PageScreencastShowActionsParamsStyle { + public String point; + public String highlight; + public String title; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayParams.java new file mode 100644 index 000000000..b57900403 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastShowOverlayParams { + public String html; + public Double duration; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayResult.java new file mode 100644 index 000000000..d4d4c537c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastShowOverlayResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastShowOverlayResult { + public String id; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartParams.java new file mode 100644 index 000000000..086e37ec6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastStartParams { + public PageScreencastStartParamsSize size; + public Integer quality; + public Integer fps; + public Boolean sendFrames; + public Boolean record; + + public static class PageScreencastStartParamsSize { + public Integer width; + public Integer height; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartResult.java new file mode 100644 index 000000000..f65c64965 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStartResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastStartResult { + public com.microsoft.playwright.impl.ArtifactImpl artifact; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStopParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStopParams.java new file mode 100644 index 000000000..e7318eba6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreencastStopParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreencastStopParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotParams.java new file mode 100644 index 000000000..c500760ae --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotParams.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageScreenshotParams { + public String type; + public Integer quality; + public Boolean fullPage; + public Rect clip; + public Boolean omitBackground; + public String caret; + public String animations; + public String scale; + public List mask; + public String maskColor; + public String style; + + public static class PageScreenshotParamsMask { + public com.microsoft.playwright.impl.FrameImpl frame; + public String selector; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotResult.java new file mode 100644 index 000000000..b83b41b46 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageScreenshotResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageScreenshotResult { + public byte[] binary; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetDockTileParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetDockTileParams.java new file mode 100644 index 000000000..2997d2ac6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetDockTileParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageSetDockTileParams { + public byte[] image; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetExtraHTTPHeadersParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetExtraHTTPHeadersParams.java new file mode 100644 index 000000000..1dce487e5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetExtraHTTPHeadersParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageSetExtraHTTPHeadersParams { + public List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetNetworkInterceptionPatternsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetNetworkInterceptionPatternsParams.java new file mode 100644 index 000000000..2bc3e46cc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetNetworkInterceptionPatternsParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageSetNetworkInterceptionPatternsParams { + public List patterns; + + public static class PageSetNetworkInterceptionPatternsParamsPatterns { + public String glob; + public String regexSource; + public String regexFlags; + public URLPattern urlPattern; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetViewportSizeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetViewportSizeParams.java new file mode 100644 index 000000000..e862c7cd6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetViewportSizeParams.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageSetViewportSizeParams { + public PageSetViewportSizeParamsViewportSize viewportSize; + + public static class PageSetViewportSizeParamsViewportSize { + public Integer width; + public Integer height; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetWebSocketInterceptionPatternsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetWebSocketInterceptionPatternsParams.java new file mode 100644 index 000000000..3f4510b05 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageSetWebSocketInterceptionPatternsParams.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageSetWebSocketInterceptionPatternsParams { + public List patterns; + + public static class PageSetWebSocketInterceptionPatternsParamsPatterns { + public String glob; + public String regexSource; + public String regexFlags; + public URLPattern urlPattern; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartCSSCoverageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartCSSCoverageParams.java new file mode 100644 index 000000000..919b2ce0c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartCSSCoverageParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageStartCSSCoverageParams { + public Boolean resetOnNavigation; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartJSCoverageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartJSCoverageParams.java new file mode 100644 index 000000000..306782102 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStartJSCoverageParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageStartJSCoverageParams { + public Boolean resetOnNavigation; + public Boolean reportAnonymousScripts; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageParams.java new file mode 100644 index 000000000..242ac1261 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageStopCSSCoverageParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageResult.java new file mode 100644 index 000000000..d31ed4706 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopCSSCoverageResult.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageStopCSSCoverageResult { + public List entries; + + public static class PageStopCSSCoverageResultEntries { + public String url; + public String text; + public List ranges; + + public static class PageStopCSSCoverageResultEntriesRanges { + public Integer start; + public Integer end; + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageParams.java new file mode 100644 index 000000000..9fa2795b7 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageStopJSCoverageParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageResult.java new file mode 100644 index 000000000..891dda772 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageStopJSCoverageResult.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageStopJSCoverageResult { + public List entries; + + public static class PageStopJSCoverageResultEntries { + public String url; + public String scriptId; + public String source; + public List functions; + + public static class PageStopJSCoverageResultEntriesFunctions { + public String functionName; + public Boolean isBlockCoverage; + public List ranges; + + public static class PageStopJSCoverageResultEntriesFunctionsRanges { + public Integer startOffset; + public Integer endOffset; + public Integer count; + } + } + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageTouchscreenTapParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageTouchscreenTapParams.java new file mode 100644 index 000000000..d61868788 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageTouchscreenTapParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageTouchscreenTapParams { + public Double x; + public Double y; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUnregisterLocatorHandlerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUnregisterLocatorHandlerParams.java new file mode 100644 index 000000000..c25cf60c1 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUnregisterLocatorHandlerParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageUnregisterLocatorHandlerParams { + public Integer uid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUpdateSubscriptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUpdateSubscriptionParams.java new file mode 100644 index 000000000..db1990534 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageUpdateSubscriptionParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageUpdateSubscriptionParams { + public String event; + public Boolean enabled; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageViewportSizeChangedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageViewportSizeChangedEvent.java new file mode 100644 index 000000000..a8604c974 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageViewportSizeChangedEvent.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageViewportSizeChangedEvent { + public PageViewportSizeChangedEventViewportSize viewportSize; + + public static class PageViewportSizeChangedEventViewportSize { + public Integer width; + public Integer height; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketEvent.java new file mode 100644 index 000000000..091ef6301 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebSocketEvent { + public com.microsoft.playwright.impl.WebSocketImpl webSocket; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketRouteEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketRouteEvent.java new file mode 100644 index 000000000..663157504 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebSocketRouteEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebSocketRouteEvent { + public com.microsoft.playwright.impl.WebSocketRouteImpl webSocketRoute; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageClearParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageClearParams.java new file mode 100644 index 000000000..488553f9c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageClearParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageClearParams { + public String kind; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemParams.java new file mode 100644 index 000000000..7ee609e2d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageGetItemParams { + public String kind; + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemResult.java new file mode 100644 index 000000000..babda5bc4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageGetItemResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageGetItemResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsParams.java new file mode 100644 index 000000000..624613198 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageItemsParams { + public String kind; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsResult.java new file mode 100644 index 000000000..138677d09 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageItemsResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PageWebStorageItemsResult { + public List items; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageRemoveItemParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageRemoveItemParams.java new file mode 100644 index 000000000..68fb3a607 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageRemoveItemParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageRemoveItemParams { + public String kind; + public String name; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageSetItemParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageSetItemParams.java new file mode 100644 index 000000000..baf68f451 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWebStorageSetItemParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWebStorageSetItemParams { + public String kind; + public String name; + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWorkerEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWorkerEvent.java new file mode 100644 index 000000000..12ad282c8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PageWorkerEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PageWorkerEvent { + public com.microsoft.playwright.impl.WorkerImpl worker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightChannel.java similarity index 62% rename from playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightChannel.java index e62410fab..489c547e4 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightChannel.java @@ -16,36 +16,16 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class WebSocketChannel { - private final ChannelOwner owner; +public class PlaywrightChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - WebSocketChannel(ChannelOwner owner) { + public PlaywrightChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } -} - -class WebSocketInitializer { - String url; -} - -class WebSocketOpenEvent { -} - -class WebSocketFrameSentEvent { - Integer opcode; - String data; -} - -class WebSocketFrameReceivedEvent { - Integer opcode; - String data; -} -class WebSocketSocketErrorEvent { - String error; -} - -class WebSocketCloseEvent { + public PlaywrightNewRequestResult newRequest(PlaywrightNewRequestParams params, Double timeout) { + return owner.sendMessage("newRequest", params, PlaywrightNewRequestResult.class, timeout); + } } diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightInitializer.java new file mode 100644 index 000000000..f90a18570 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightInitializer.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PlaywrightInitializer { + public com.microsoft.playwright.impl.BrowserTypeImpl chromium; + public com.microsoft.playwright.impl.BrowserTypeImpl firefox; + public com.microsoft.playwright.impl.BrowserTypeImpl webkit; + public com.microsoft.playwright.impl.LocalUtils utils; + public com.microsoft.playwright.impl.BrowserImpl preLaunchedBrowser; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestParams.java new file mode 100644 index 000000000..5ecf7ad9f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestParams.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class PlaywrightNewRequestParams { + public String baseURL; + public String userAgent; + public Boolean ignoreHTTPSErrors; + public List extraHTTPHeaders; + public Boolean failOnStatusCode; + public List clientCertificates; + public Integer maxRedirects; + public List httpCredentials; + public PlaywrightNewRequestParamsProxy proxy; + public PlaywrightNewRequestParamsStorageState storageState; + public String tracesDir; + + public static class PlaywrightNewRequestParamsClientCertificates { + public String origin; + public byte[] cert; + public byte[] key; + public String passphrase; + public byte[] pfx; + } + + public static class PlaywrightNewRequestParamsProxy { + public String server; + public String bypass; + public String username; + public String password; + } + + public static class PlaywrightNewRequestParamsStorageState { + public List cookies; + public List origins; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestResult.java new file mode 100644 index 000000000..64b09c033 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightNewRequestResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class PlaywrightNewRequestResult { + public com.microsoft.playwright.impl.APIRequestContextImpl request; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Point.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Point.java new file mode 100644 index 000000000..6113ca631 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Point.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class Point { + public Double x; + public Double y; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecordHarOptions.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecordHarOptions.java new file mode 100644 index 000000000..341b9e229 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecordHarOptions.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RecordHarOptions { + public String content; + public String mode; + public String urlGlob; + public String urlRegexSource; + public String urlRegexFlags; + public String harPath; + public String resourcesDir; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecorderSource.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecorderSource.java new file mode 100644 index 000000000..ec7beca59 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RecorderSource.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class RecorderSource { + public Boolean isRecorded; + public String id; + public String label; + public String text; + public String language; + public List highlight; + public Integer revealLine; + public String group; + + public static class RecorderSourceHighlight { + public Integer line; + public String type; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Rect.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Rect.java new file mode 100644 index 000000000..2875aad18 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/Rect.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class Rect { + public Double x; + public Double y; + public Double width; + public Double height; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RemoteAddr.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RemoteAddr.java new file mode 100644 index 000000000..468d8b6ff --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RemoteAddr.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RemoteAddr { + public String ipAddress; + public Integer port; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestChannel.java similarity index 54% rename from playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestChannel.java index 33d96044f..6cfada4eb 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RequestChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestChannel.java @@ -16,56 +16,28 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -import java.util.List; +public class RequestChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; -class RequestChannel { - private final ChannelOwner owner; - - RequestChannel(ChannelOwner owner) { + public RequestChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - RequestResponseResult response(RequestResponseParams params, Double timeout) { + public RequestResponseResult response(RequestResponseParams params, Double timeout) { return owner.sendMessage("response", params, RequestResponseResult.class, timeout); } - RequestResponseResult response(Double timeout) { + public RequestResponseResult response(Double timeout) { return response(new RequestResponseParams(), timeout); } - RequestRawRequestHeadersResult rawRequestHeaders(RequestRawRequestHeadersParams params, Double timeout) { + public RequestRawRequestHeadersResult rawRequestHeaders(RequestRawRequestHeadersParams params, Double timeout) { return owner.sendMessage("rawRequestHeaders", params, RequestRawRequestHeadersResult.class, timeout); } - RequestRawRequestHeadersResult rawRequestHeaders(Double timeout) { + public RequestRawRequestHeadersResult rawRequestHeaders(Double timeout) { return rawRequestHeaders(new RequestRawRequestHeadersParams(), timeout); } } - -class RequestInitializer { - FrameImpl frame; - WorkerImpl serviceWorker; - String url; - String resourceType; - String method; - byte[] postData; - List headers; - Boolean isNavigationRequest; - RequestImpl redirectedFrom; -} - -class RequestResponseParams { -} - -class RequestResponseResult { - ResponseImpl response; -} - -class RequestRawRequestHeadersParams { -} - -class RequestRawRequestHeadersResult { - List headers; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestInitializer.java new file mode 100644 index 000000000..34d2dba06 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestInitializer.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class RequestInitializer { + public com.microsoft.playwright.impl.FrameImpl frame; + public com.microsoft.playwright.impl.WorkerImpl serviceWorker; + public String url; + public String resourceType; + public String method; + public byte[] postData; + public List headers; + public Boolean isNavigationRequest; + public com.microsoft.playwright.impl.RequestImpl redirectedFrom; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersParams.java new file mode 100644 index 000000000..a4b3c1229 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RequestRawRequestHeadersParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersResult.java new file mode 100644 index 000000000..24c768893 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestRawRequestHeadersResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class RequestRawRequestHeadersResult { + public List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseParams.java new file mode 100644 index 000000000..c0b75b795 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RequestResponseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseResult.java new file mode 100644 index 000000000..ede92ea61 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestResponseResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RequestResponseResult { + public com.microsoft.playwright.impl.ResponseImpl response; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestSizes.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestSizes.java new file mode 100644 index 000000000..81eeea8e9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestSizes.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RequestSizes { + public Integer requestBodySize; + public Integer requestHeadersSize; + public Integer responseBodySize; + public Integer responseHeadersSize; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResourceTiming.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResourceTiming.java new file mode 100644 index 000000000..3353d7c91 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResourceTiming.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResourceTiming { + public Double startTime; + public Double domainLookupStart; + public Double domainLookupEnd; + public Double connectStart; + public Double secureConnectionStart; + public Double connectEnd; + public Double requestStart; + public Double responseStart; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyParams.java new file mode 100644 index 000000000..3b2cac0d4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseBodyParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyResult.java new file mode 100644 index 000000000..21f1af216 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseBodyResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseBodyResult { + public byte[] binary; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseChannel.java new file mode 100644 index 000000000..92dbf1841 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseChannel.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public ResponseChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public ResponseBodyResult body(ResponseBodyParams params, Double timeout) { + return owner.sendMessage("body", params, ResponseBodyResult.class, timeout); + } + + public ResponseBodyResult body(Double timeout) { + return body(new ResponseBodyParams(), timeout); + } + + public ResponseSecurityDetailsResult securityDetails(ResponseSecurityDetailsParams params, Double timeout) { + return owner.sendMessage("securityDetails", params, ResponseSecurityDetailsResult.class, timeout); + } + + public ResponseSecurityDetailsResult securityDetails(Double timeout) { + return securityDetails(new ResponseSecurityDetailsParams(), timeout); + } + + public ResponseServerAddrResult serverAddr(ResponseServerAddrParams params, Double timeout) { + return owner.sendMessage("serverAddr", params, ResponseServerAddrResult.class, timeout); + } + + public ResponseServerAddrResult serverAddr(Double timeout) { + return serverAddr(new ResponseServerAddrParams(), timeout); + } + + public ResponseRawResponseHeadersResult rawResponseHeaders(ResponseRawResponseHeadersParams params, Double timeout) { + return owner.sendMessage("rawResponseHeaders", params, ResponseRawResponseHeadersResult.class, timeout); + } + + public ResponseRawResponseHeadersResult rawResponseHeaders(Double timeout) { + return rawResponseHeaders(new ResponseRawResponseHeadersParams(), timeout); + } + + public ResponseHttpVersionResult httpVersion(ResponseHttpVersionParams params, Double timeout) { + return owner.sendMessage("httpVersion", params, ResponseHttpVersionResult.class, timeout); + } + + public ResponseHttpVersionResult httpVersion(Double timeout) { + return httpVersion(new ResponseHttpVersionParams(), timeout); + } + + public ResponseSizesResult sizes(ResponseSizesParams params, Double timeout) { + return owner.sendMessage("sizes", params, ResponseSizesResult.class, timeout); + } + + public ResponseSizesResult sizes(Double timeout) { + return sizes(new ResponseSizesParams(), timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionParams.java new file mode 100644 index 000000000..a80127a1a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseHttpVersionParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionResult.java new file mode 100644 index 000000000..e9d211b1d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseHttpVersionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseHttpVersionResult { + public String value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseInitializer.java new file mode 100644 index 000000000..b160f393a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseInitializer.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ResponseInitializer { + public com.microsoft.playwright.impl.RequestImpl request; + public String url; + public Integer status; + public String statusText; + public List headers; + public ResourceTiming timing; + public Boolean fromServiceWorker; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersParams.java new file mode 100644 index 000000000..e7866a770 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseRawResponseHeadersParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersResult.java new file mode 100644 index 000000000..b96bb6f83 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseRawResponseHeadersResult.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class ResponseRawResponseHeadersResult { + public List headers; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsParams.java new file mode 100644 index 000000000..1ff4ee703 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseSecurityDetailsParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsResult.java new file mode 100644 index 000000000..040e8b3c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSecurityDetailsResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseSecurityDetailsResult { + public SecurityDetails value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrParams.java new file mode 100644 index 000000000..cf3f147e3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseServerAddrParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrResult.java new file mode 100644 index 000000000..fc328483d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseServerAddrResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseServerAddrResult { + public RemoteAddr value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesParams.java new file mode 100644 index 000000000..72da6302d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseSizesParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesResult.java new file mode 100644 index 000000000..77429a351 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ResponseSizesResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class ResponseSizesResult { + public RequestSizes sizes; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootChannel.java similarity index 67% rename from playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootChannel.java index 55b2b5719..387716081 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RootChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootChannel.java @@ -16,28 +16,16 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class RootChannel { - private final ChannelOwner owner; +public class RootChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - RootChannel(ChannelOwner owner) { + public RootChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - RootInitializeResult initialize(RootInitializeParams params, Double timeout) { + public RootInitializeResult initialize(RootInitializeParams params, Double timeout) { return owner.sendMessage("initialize", params, RootInitializeResult.class, timeout); } } - -class RootInitializer { -} - -class RootInitializeParams { - String sdkLanguage; - Boolean supportsLoneSurrogates; -} - -class RootInitializeResult { - PlaywrightImpl playwright; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeParams.java new file mode 100644 index 000000000..9bf6b5852 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RootInitializeParams { + public String sdkLanguage; + public Boolean supportsLoneSurrogates; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeResult.java new file mode 100644 index 000000000..8a4f84a52 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializeResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RootInitializeResult { + public com.microsoft.playwright.impl.PlaywrightImpl playwright; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializer.java new file mode 100644 index 000000000..41212771a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RootInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteAbortParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteAbortParams.java new file mode 100644 index 000000000..0f03dbfde --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteAbortParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RouteAbortParams { + public String errorCode; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteChannel.java similarity index 52% rename from playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteChannel.java index 4fd7ceaec..0a32bbf16 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/RouteChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteChannel.java @@ -16,58 +16,28 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -import java.util.List; +public class RouteChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; -class RouteChannel { - private final ChannelOwner owner; - - RouteChannel(ChannelOwner owner) { + public RouteChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void redirectNavigationRequest(RouteRedirectNavigationRequestParams params, Double timeout) { + public void redirectNavigationRequest(RouteRedirectNavigationRequestParams params, Double timeout) { owner.sendMessage("redirectNavigationRequest", params, timeout); } - void abort(RouteAbortParams params, Double timeout) { + public void abort(RouteAbortParams params, Double timeout) { owner.sendMessage("abort", params, timeout); } - void continue_(RouteContinueParams params, Double timeout) { + public void continue_(RouteContinueParams params, Double timeout) { owner.sendMessage("continue", params, timeout); } - void fulfill(RouteFulfillParams params, Double timeout) { + public void fulfill(RouteFulfillParams params, Double timeout) { owner.sendMessage("fulfill", params, timeout); } } - -class RouteInitializer { - RequestImpl request; -} - -class RouteRedirectNavigationRequestParams { - String url; -} - -class RouteAbortParams { - String errorCode; -} - -class RouteContinueParams { - String url; - String method; - List headers; - byte[] postData; - Boolean isFallback; -} - -class RouteFulfillParams { - Integer status; - List headers; - String body; - Boolean isBase64; - String fetchResponseUid; -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteContinueParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteContinueParams.java new file mode 100644 index 000000000..8287d1a94 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteContinueParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class RouteContinueParams { + public String url; + public String method; + public List headers; + public byte[] postData; + public Boolean isFallback; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteFulfillParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteFulfillParams.java new file mode 100644 index 000000000..418203c3e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteFulfillParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class RouteFulfillParams { + public Integer status; + public List headers; + public String body; + public Boolean isBase64; + public String fetchResponseUid; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteInitializer.java new file mode 100644 index 000000000..e10217906 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RouteInitializer { + public com.microsoft.playwright.impl.RequestImpl request; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteRedirectNavigationRequestParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteRedirectNavigationRequestParams.java new file mode 100644 index 000000000..1b7b918e6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteRedirectNavigationRequestParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class RouteRedirectNavigationRequestParams { + public String url; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SDKLanguage.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SDKLanguage.java new file mode 100644 index 000000000..3d9f0f73b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SDKLanguage.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SDKLanguage { + public static final String JAVASCRIPT = "javascript"; + public static final String PYTHON = "python"; + public static final String JAVA = "java"; + public static final String CSHARP = "csharp"; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SecurityDetails.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SecurityDetails.java new file mode 100644 index 000000000..e023e4689 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SecurityDetails.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SecurityDetails { + public String issuer; + public String protocol; + public String subjectName; + public Double validFrom; + public Double validTo; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SelectorEngine.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SelectorEngine.java new file mode 100644 index 000000000..59f409dc4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SelectorEngine.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SelectorEngine { + public String name; + public String source; + public Boolean contentScript; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedArgument.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedArgument.java new file mode 100644 index 000000000..d422cffed --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedArgument.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class SerializedArgument { + public SerializedValue value; + public List handles; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedError.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedError.java new file mode 100644 index 000000000..ea7970b51 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedError.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SerializedError { + public SerializedErrorError error; + public SerializedValue value; + + public static class SerializedErrorError { + public String message; + public String name; + public String stack; + public String code; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedValue.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedValue.java new file mode 100644 index 000000000..0d266a9b8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SerializedValue.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class SerializedValue { + public Double n; + public Boolean b; + public String s; + public String v; + public String d; + public String u; + public String bi; + public SerializedValueTa ta; + public SerializedValueE e; + public SerializedValueR r; + public List a; + public List o; + public Integer h; + public String fn; + public Integer id; + public Integer ref; + + public static class SerializedValueTa { + public byte[] b; + public String k; + } + + public static class SerializedValueE { + public String m; + public String n; + public String s; + } + + public static class SerializedValueR { + public String p; + public String f; + } + + public static class SerializedValueO { + public String k; + public SerializedValue v; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetNetworkCookie.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetNetworkCookie.java new file mode 100644 index 000000000..47c9bca24 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetNetworkCookie.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SetNetworkCookie { + public String name; + public String value; + public String url; + public String domain; + public String path; + public Double expires; + public Boolean httpOnly; + public Boolean secure; + public String sameSite; + public String partitionKey; + public Boolean _crHasCrossSiteAncestor; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetOriginStorage.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetOriginStorage.java new file mode 100644 index 000000000..7a72fe4dd --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetOriginStorage.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class SetOriginStorage { + public String origin; + public List localStorage; + public List indexedDB; + public List opfs; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetVirtualCredential.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetVirtualCredential.java new file mode 100644 index 000000000..0d7e462dc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/SetVirtualCredential.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class SetVirtualCredential { + public String id; + public String rpId; + public String userHandle; + public String privateKey; + public String publicKey; + public Integer signCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StackFrame.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StackFrame.java new file mode 100644 index 000000000..7c0faf23f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StackFrame.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class StackFrame { + public String file; + public Integer line; + public Integer column; + public String function; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamChannel.java similarity index 67% rename from playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamChannel.java index 272d4529d..b538b9175 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/StreamChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamChannel.java @@ -16,38 +16,24 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class StreamChannel { - private final ChannelOwner owner; +public class StreamChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - StreamChannel(ChannelOwner owner) { + public StreamChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - StreamReadResult read(StreamReadParams params, Double timeout) { + public StreamReadResult read(StreamReadParams params, Double timeout) { return owner.sendMessage("read", params, StreamReadResult.class, timeout); } - void close(StreamCloseParams params, Double timeout) { + public void close(StreamCloseParams params, Double timeout) { owner.sendMessage("close", params, timeout); } - void close(Double timeout) { + public void close(Double timeout) { close(new StreamCloseParams(), timeout); } } - -class StreamInitializer { -} - -class StreamReadParams { - Integer size; -} - -class StreamReadResult { - byte[] binary; -} - -class StreamCloseParams { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamCloseParams.java new file mode 100644 index 000000000..91def739b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamCloseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class StreamCloseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamInitializer.java new file mode 100644 index 000000000..de81a4c4e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class StreamInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadParams.java new file mode 100644 index 000000000..31caa2d66 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class StreamReadParams { + public Integer size; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadResult.java new file mode 100644 index 000000000..70f9bf7e5 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamReadResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class StreamReadResult { + public byte[] binary; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingChannel.java new file mode 100644 index 000000000..0d9280ac3 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingChannel.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public TracingChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void tracingStart(TracingTracingStartParams params, Double timeout) { + owner.sendMessage("tracingStart", params, timeout); + } + + public TracingTracingStartChunkResult tracingStartChunk(TracingTracingStartChunkParams params, Double timeout) { + return owner.sendMessage("tracingStartChunk", params, TracingTracingStartChunkResult.class, timeout); + } + + public void tracingGroup(TracingTracingGroupParams params, Double timeout) { + owner.sendMessage("tracingGroup", params, timeout); + } + + public void tracingGroupEnd(TracingTracingGroupEndParams params, Double timeout) { + owner.sendMessage("tracingGroupEnd", params, timeout); + } + + public void tracingGroupEnd(Double timeout) { + tracingGroupEnd(new TracingTracingGroupEndParams(), timeout); + } + + public TracingTracingStopChunkResult tracingStopChunk(TracingTracingStopChunkParams params, Double timeout) { + return owner.sendMessage("tracingStopChunk", params, TracingTracingStopChunkResult.class, timeout); + } + + public void tracingStop(TracingTracingStopParams params, Double timeout) { + owner.sendMessage("tracingStop", params, timeout); + } + + public void tracingStop(Double timeout) { + tracingStop(new TracingTracingStopParams(), timeout); + } + + public TracingHarStartResult harStart(TracingHarStartParams params, Double timeout) { + return owner.sendMessage("harStart", params, TracingHarStartResult.class, timeout); + } + + public TracingHarExportResult harExport(TracingHarExportParams params, Double timeout) { + return owner.sendMessage("harExport", params, TracingHarExportResult.class, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportParams.java new file mode 100644 index 000000000..25bddd62c --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingHarExportParams { + public String harId; + public String mode; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportResult.java new file mode 100644 index 000000000..2efcda311 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarExportResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class TracingHarExportResult { + public com.microsoft.playwright.impl.ArtifactImpl artifact; + public List entries; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartParams.java new file mode 100644 index 000000000..1bf4acd00 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingHarStartParams { + public com.microsoft.playwright.impl.PageImpl page; + public RecordHarOptions options; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartResult.java new file mode 100644 index 000000000..cf7fe0245 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingHarStartResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingHarStartResult { + public String harId; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingInitializer.java new file mode 100644 index 000000000..648fa1e46 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupEndParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupEndParams.java new file mode 100644 index 000000000..31dc7b524 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupEndParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingGroupEndParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupParams.java new file mode 100644 index 000000000..9cdf05d7a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingGroupParams.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingGroupParams { + public String name; + public TracingTracingGroupParamsLocation location; + + public static class TracingTracingGroupParamsLocation { + public String file; + public Integer line; + public Integer column; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkParams.java new file mode 100644 index 000000000..21cddf510 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingStartChunkParams { + public String name; + public String title; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkResult.java new file mode 100644 index 000000000..9e1b1d9bc --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartChunkResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingStartChunkResult { + public String traceName; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartParams.java new file mode 100644 index 000000000..1cae8f76e --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStartParams.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingStartParams { + public String name; + public Boolean snapshotDom; + public Boolean snapshotAria; + public Boolean snapshotScreen; + public Boolean screencast; + public Boolean coverage; + public Boolean live; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkParams.java new file mode 100644 index 000000000..6f9c76bf4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingStopChunkParams { + public String mode; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkResult.java new file mode 100644 index 000000000..4ddac197f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopChunkResult.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class TracingTracingStopChunkResult { + public com.microsoft.playwright.impl.ArtifactImpl artifact; + public List entries; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopParams.java new file mode 100644 index 000000000..de4866109 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/TracingTracingStopParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class TracingTracingStopParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/URLPattern.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/URLPattern.java new file mode 100644 index 000000000..b6cf1def6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/URLPattern.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class URLPattern { + public String hash; + public String hostname; + public String password; + public String pathname; + public String port; + public String protocol; + public String search; + public String username; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/VirtualCredential.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/VirtualCredential.java new file mode 100644 index 000000000..c487aea58 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/VirtualCredential.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class VirtualCredential { + public String id; + public String rpId; + public String userHandle; + public String privateKey; + public String publicKey; + public Integer signCount; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WaitInfo.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WaitInfo.java new file mode 100644 index 000000000..ccf22a506 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WaitInfo.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WaitInfo { + public String waitId; + public String phase; + public String event; + public String message; + public String error; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketChannel.java new file mode 100644 index 000000000..5ad45ab85 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketChannel.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public WebSocketChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketCloseEvent.java new file mode 100644 index 000000000..94143875f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameReceivedEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameReceivedEvent.java new file mode 100644 index 000000000..6ab1d1a56 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameReceivedEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketFrameReceivedEvent { + public Integer opcode; + public String data; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameSentEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameSentEvent.java new file mode 100644 index 000000000..e6f7cb1da --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketFrameSentEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketFrameSentEvent { + public Integer opcode; + public String data; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketInitializer.java new file mode 100644 index 000000000..7af531f39 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketInitializer { + public String url; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketOpenEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketOpenEvent.java new file mode 100644 index 000000000..0ccd98d8f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketOpenEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketOpenEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteChannel.java new file mode 100644 index 000000000..6e2628c8d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteChannel.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public WebSocketRouteChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void connect(WebSocketRouteConnectParams params, Double timeout) { + owner.sendMessage("connect", params, timeout); + } + + public void connect(Double timeout) { + connect(new WebSocketRouteConnectParams(), timeout); + } + + public void ensureOpened(WebSocketRouteEnsureOpenedParams params, Double timeout) { + owner.sendMessage("ensureOpened", params, timeout); + } + + public void ensureOpened(Double timeout) { + ensureOpened(new WebSocketRouteEnsureOpenedParams(), timeout); + } + + public void sendToPage(WebSocketRouteSendToPageParams params, Double timeout) { + owner.sendMessage("sendToPage", params, timeout); + } + + public void sendToServer(WebSocketRouteSendToServerParams params, Double timeout) { + owner.sendMessage("sendToServer", params, timeout); + } + + public void closePage(WebSocketRouteClosePageParams params, Double timeout) { + owner.sendMessage("closePage", params, timeout); + } + + public void closeServer(WebSocketRouteCloseServerParams params, Double timeout) { + owner.sendMessage("closeServer", params, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageEvent.java new file mode 100644 index 000000000..b0a2c2287 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageEvent.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteClosePageEvent { + public Integer code; + public String reason; + public Boolean wasClean; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageParams.java new file mode 100644 index 000000000..74b7d9818 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteClosePageParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteClosePageParams { + public Integer code; + public String reason; + public Boolean wasClean; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerEvent.java new file mode 100644 index 000000000..19059343f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerEvent.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteCloseServerEvent { + public Integer code; + public String reason; + public Boolean wasClean; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerParams.java new file mode 100644 index 000000000..d24e5f076 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteCloseServerParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteCloseServerParams { + public Integer code; + public String reason; + public Boolean wasClean; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteConnectParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteConnectParams.java new file mode 100644 index 000000000..ca69df5c0 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteConnectParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteConnectParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteEnsureOpenedParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteEnsureOpenedParams.java new file mode 100644 index 000000000..8cf2df514 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteEnsureOpenedParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteEnsureOpenedParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteInitializer.java new file mode 100644 index 000000000..b582ec32d --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteInitializer.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class WebSocketRouteInitializer { + public String url; + public List protocols; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromPageEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromPageEvent.java new file mode 100644 index 000000000..204d298d6 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromPageEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteMessageFromPageEvent { + public String message; + public Boolean isBase64; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromServerEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromServerEvent.java new file mode 100644 index 000000000..5fcd20708 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteMessageFromServerEvent.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteMessageFromServerEvent { + public String message; + public Boolean isBase64; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToPageParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToPageParams.java new file mode 100644 index 000000000..2794c6ba4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToPageParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteSendToPageParams { + public String message; + public Boolean isBase64; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToServerParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToServerParams.java new file mode 100644 index 000000000..62ae165e8 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketRouteSendToServerParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketRouteSendToServerParams { + public String message; + public Boolean isBase64; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketSocketErrorEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketSocketErrorEvent.java new file mode 100644 index 000000000..6e5557600 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WebSocketSocketErrorEvent.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WebSocketSocketErrorEvent { + public String error; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerChannel.java new file mode 100644 index 000000000..783947362 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerChannel.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public WorkerChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void disconnect(WorkerDisconnectParams params, Double timeout) { + owner.sendMessage("disconnect", params, timeout); + } + + public WorkerEvaluateExpressionResult evaluateExpression(WorkerEvaluateExpressionParams params, Double timeout) { + return owner.sendMessage("evaluateExpression", params, WorkerEvaluateExpressionResult.class, timeout); + } + + public WorkerEvaluateExpressionHandleResult evaluateExpressionHandle(WorkerEvaluateExpressionHandleParams params, Double timeout) { + return owner.sendMessage("evaluateExpressionHandle", params, WorkerEvaluateExpressionHandleResult.class, timeout); + } + + public void updateSubscription(WorkerUpdateSubscriptionParams params, Double timeout) { + owner.sendMessage("updateSubscription", params, timeout); + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerCloseEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerCloseEvent.java new file mode 100644 index 000000000..2e11eead2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerCloseEvent.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerCloseEvent { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerConsoleEvent.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerConsoleEvent.java new file mode 100644 index 000000000..c845a37c2 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerConsoleEvent.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +import java.util.List; + +public class WorkerConsoleEvent { + public String type; + public String text; + public List args; + public WorkerConsoleEventLocation location; + public Double timestamp; + + public static class WorkerConsoleEventLocation { + public String url; + public Integer lineNumber; + public Integer columnNumber; + } +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerDisconnectParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerDisconnectParams.java new file mode 100644 index 000000000..d1e0ddae9 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerDisconnectParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerDisconnectParams { + public String reason; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleParams.java new file mode 100644 index 000000000..c61dcd416 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerEvaluateExpressionHandleParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleResult.java new file mode 100644 index 000000000..a9a39813f --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionHandleResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerEvaluateExpressionHandleResult { + public com.microsoft.playwright.impl.JSHandleImpl handle; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionParams.java new file mode 100644 index 000000000..b8c30ed28 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionParams.java @@ -0,0 +1,25 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerEvaluateExpressionParams { + public String expression; + public Boolean isFunction; + public SerializedArgument arg; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionResult.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionResult.java new file mode 100644 index 000000000..6344cbf8b --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerEvaluateExpressionResult.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerEvaluateExpressionResult { + public SerializedValue value; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerInitializer.java new file mode 100644 index 000000000..57d6a1442 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerInitializer.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerInitializer { + public String url; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerUpdateSubscriptionParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerUpdateSubscriptionParams.java new file mode 100644 index 000000000..607551738 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WorkerUpdateSubscriptionParams.java @@ -0,0 +1,24 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WorkerUpdateSubscriptionParams { + public String event; + public Boolean enabled; +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamChannel.java similarity index 66% rename from playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java rename to playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamChannel.java index a4d96dea1..0900c5934 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/WritableStreamChannel.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamChannel.java @@ -16,34 +16,24 @@ // This file is generated by scripts/generate_java_channels.js, do not edit manually. -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; -class WritableStreamChannel { - private final ChannelOwner owner; +public class WritableStreamChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; - WritableStreamChannel(ChannelOwner owner) { + public WritableStreamChannel(com.microsoft.playwright.impl.ChannelOwner owner) { this.owner = owner; } - void write(WritableStreamWriteParams params, Double timeout) { + public void write(WritableStreamWriteParams params, Double timeout) { owner.sendMessage("write", params, timeout); } - void close(WritableStreamCloseParams params, Double timeout) { + public void close(WritableStreamCloseParams params, Double timeout) { owner.sendMessage("close", params, timeout); } - void close(Double timeout) { + public void close(Double timeout) { close(new WritableStreamCloseParams(), timeout); } } - -class WritableStreamInitializer { -} - -class WritableStreamWriteParams { - byte[] binary; -} - -class WritableStreamCloseParams { -} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamCloseParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamCloseParams.java new file mode 100644 index 000000000..ba51f68cb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamCloseParams.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WritableStreamCloseParams { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamInitializer.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamInitializer.java new file mode 100644 index 000000000..06dc72d13 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamInitializer.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WritableStreamInitializer { +} diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamWriteParams.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamWriteParams.java new file mode 100644 index 000000000..85d675726 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamWriteParams.java @@ -0,0 +1,23 @@ +/* + * Copyright (c) Microsoft Corporation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// This file is generated by scripts/generate_java_channels.js, do not edit manually. + +package com.microsoft.playwright.impl.protocol; + +public class WritableStreamWriteParams { + public byte[] binary; +} diff --git a/scripts/generate_java_channels.js b/scripts/generate_java_channels.js index 13931b1a3..bb4febaf9 100644 --- a/scripts/generate_java_channels.js +++ b/scripts/generate_java_channels.js @@ -25,7 +25,9 @@ const fs = require('fs'); const path = require('path'); const GENERATED_MARKER = '// This file is generated by scripts/generate_java_channels.js, do not edit manually.'; -const OUT_DIR = path.join(__dirname, '..', 'playwright', 'src', 'main', 'java', 'com', 'microsoft', 'playwright', 'impl'); +const IMPL_DIR = path.join(__dirname, '..', 'playwright', 'src', 'main', 'java', 'com', 'microsoft', 'playwright', 'impl'); +const OUT_DIR = path.join(IMPL_DIR, 'protocol'); +const IMPL_PACKAGE = 'com.microsoft.playwright.impl'; const LICENSE_HEADER = `/* * Copyright (c) Microsoft Corporation. @@ -64,25 +66,14 @@ const OWNER_CLASS_OVERRIDES = { Disposable: 'DisposableObject', }; -// Generated classes live in the impl package and would shadow same-named public API types that -// the impl classes import with a wildcard (e.g. APIResponse, options.BrowserChannel), so they -// get a "Protocol" prefix instead. -const PUBLIC_API_DIRS = [ - path.join(OUT_DIR, '..'), - path.join(OUT_DIR, '..', 'options'), -]; -const publicTypeNames = new Set(); -for (const dir of PUBLIC_API_DIRS) { - if (!fs.existsSync(dir)) - continue; - for (const file of fs.readdirSync(dir)) { - if (file.endsWith('.java')) - publicTypeNames.add(file.substring(0, file.length - '.java'.length)); - } +// Generated code refers to impl classes by fully qualified name so that a generated class with +// the same simple name can never shadow one. +function implType(name) { + return IMPL_PACKAGE + '.' + name; } function classNameFor(name) { - return publicTypeNames.has(name) ? 'Protocol' + name : name; + return name; } function titleCase(name) { @@ -147,11 +138,11 @@ function javaType(type, parentName, propName, nested) { case 'float': return 'Double'; case 'binary': return 'byte[]'; case 'json': return 'JsonElement'; - case 'Channel': return 'ChannelOwner'; + case 'Channel': return implType('ChannelOwner'); case 'number': throw new Error('Use "int" or "float" instead of "number" in protocol.yml'); } if (interfaces.has(type)) - return OWNER_CLASS_OVERRIDES[type] || (type + 'Impl'); + return implType(OWNER_CLASS_OVERRIDES[type] || (type + 'Impl')); const struct = structs.get(type); if (struct) return struct.type === 'enum' ? 'String' : classNameFor(type); @@ -197,12 +188,12 @@ function classBody(name, props, indent, modifiers, extendsClause) { const id = safeIdentifier(field.name); if (id !== field.name) lines.push(`${indent} @SerializedName("${field.name}")`); - lines.push(`${indent} ${field.type} ${id};`); + lines.push(`${indent} public ${field.type} ${id};`); } for (const n of nested) { if (lines.length > 1) lines.push(''); - lines.push(...classBody(n.name, n.properties, indent + ' ', 'static ', null)); + lines.push(...classBody(n.name, n.properties, indent + ' ', 'public static ', null)); } lines.push(`${indent}}`); return lines; @@ -225,7 +216,7 @@ function fileText(bodyLines) { ${GENERATED_MARKER} -package com.microsoft.playwright.impl; +package com.microsoft.playwright.impl.protocol; ${imports.length ? imports.join('\n') + '\n\n' : ''}${body} `; @@ -239,26 +230,26 @@ function enumConstantName(literal) { } function generateStructs() { - const lines = []; + const classes = []; for (const [name, struct] of structs) { - if (lines.length) - lines.push(''); + const lines = []; if (struct.type === 'enum') { - lines.push(`class ${classNameFor(name)} {`); + lines.push(`public class ${classNameFor(name)} {`); const used = new Set(); for (const literal of struct.literals) { let constant = enumConstantName(String(literal)); while (used.has(constant)) constant += '_'; used.add(constant); - lines.push(` static final String ${constant} = ${JSON.stringify(String(literal))};`); + lines.push(` public static final String ${constant} = ${JSON.stringify(String(literal))};`); } lines.push('}'); } else { - lines.push(...classBody(classNameFor(name), struct.properties, '', '', null)); + lines.push(...classBody(classNameFor(name), struct.properties, '', 'public ', null)); } + classes.push({ name: classNameFor(name), text: fileText(lines) }); } - return fileText(lines); + return classes; } // Commands of the interface and all its ancestors, own commands first. @@ -281,12 +272,17 @@ function allCommands(name) { } function generateInterface(name, item) { - const lines = []; + const classes = []; + let lines = []; + const flush = className => { + classes.push({ name: className, text: fileText(lines) }); + lines = []; + }; // Channel. - lines.push(`class ${classNameFor(name + 'Channel')} {`); - lines.push(' private final ChannelOwner owner;'); + lines.push(`public class ${classNameFor(name + 'Channel')} {`); + lines.push(` private final ${implType('ChannelOwner')} owner;`); lines.push(''); - lines.push(` ${classNameFor(name + 'Channel')}(ChannelOwner owner) {`); + lines.push(` public ${classNameFor(name + 'Channel')}(${implType('ChannelOwner')} owner) {`); lines.push(' this.owner = owner;'); lines.push(' }'); for (const { interfaceName, methodName, method } of allCommands(name)) { @@ -296,64 +292,78 @@ function generateInterface(name, item) { const javaName = safeIdentifier(methodName); const call = hasReturns ? `owner.sendMessage("${methodName}", params, ${prefix}Result.class, timeout)` : `owner.sendMessage("${methodName}", params, timeout)`; lines.push(''); - lines.push(` ${result} ${javaName}(${prefix}Params params, Double timeout) {`); + lines.push(` public ${result} ${javaName}(${prefix}Params params, Double timeout) {`); lines.push(hasReturns ? ` return ${call};` : ` ${call};`); lines.push(' }'); if (!method.parameters || !Object.keys(method.parameters).length) { lines.push(''); - lines.push(` ${result} ${javaName}(Double timeout) {`); + lines.push(` public ${result} ${javaName}(Double timeout) {`); lines.push(hasReturns ? ` return ${javaName}(new ${prefix}Params(), timeout);` : ` ${javaName}(new ${prefix}Params(), timeout);`); lines.push(' }'); } } lines.push('}'); + flush(classNameFor(name + 'Channel')); // Initializer. - lines.push(''); + const initializerName = `${name}Initializer`; if (item.initializer) - lines.push(...classBody(`${name}Initializer`, item.initializer, '', '', null)); + lines.push(...classBody(initializerName, item.initializer, '', 'public ', null)); else - lines.push(...classBody(`${name}Initializer`, {}, '', '', item.extends && interfaces.has(item.extends) ? `${item.extends}Initializer` : null)); + lines.push(...classBody(initializerName, {}, '', 'public ', item.extends && interfaces.has(item.extends) ? `${item.extends}Initializer` : null)); + flush(initializerName); // Own commands. for (const [methodName, rawMethod] of Object.entries(item.commands || {})) { const method = rawMethod || {}; const prefix = name + titleCase(methodName); - lines.push(''); - lines.push(...classBody(`${prefix}Params`, method.parameters, '', '', null)); - if (method.returns) { - lines.push(''); - lines.push(...classBody(`${prefix}Result`, method.returns, '', '', null)); - } - if (method.errorDetails) { - lines.push(''); - lines.push(...classBody(`${prefix}ErrorDetails`, method.errorDetails, '', '', null)); - } + const emit = (className, props) => { + lines.push(...classBody(className, props, '', 'public ', null)); + flush(className); + }; + emit(`${prefix}Params`, method.parameters); + if (method.returns) + emit(`${prefix}Result`, method.returns); + if (method.errorDetails) + emit(`${prefix}ErrorDetails`, method.errorDetails); } // Events. for (const [eventName, rawEvent] of Object.entries(item.events || {})) { const event = rawEvent || {}; - lines.push(''); - lines.push(...classBody(`${name}${titleCase(eventName)}Event`, event.parameters, '', '', null)); + const className = `${name}${titleCase(eventName)}Event`; + lines.push(...classBody(className, event.parameters, '', 'public ', null)); + flush(className); } - return fileText(lines); + return classes; } // ---- main ---- const outputs = new Map(); -outputs.set('ProtocolStructs.java', generateStructs()); +function addClasses(classes) { + for (const { name, text } of classes) { + const file = `${name}.java`; + if (outputs.has(file)) + throw new Error(`Duplicate generated class ${name}`); + outputs.set(file, text); + } +} +addClasses(generateStructs()); for (const [name, item] of interfaces) - outputs.set(`${classNameFor(name + 'Channel')}.java`, generateInterface(name, item)); - -// Delete stale generated files. -for (const file of fs.readdirSync(OUT_DIR)) { - if (!file.endsWith('.java') || outputs.has(file)) - continue; - const text = fs.readFileSync(path.join(OUT_DIR, file), 'utf-8'); - if (text.includes(GENERATED_MARKER)) - fs.unlinkSync(path.join(OUT_DIR, file)); + addClasses(generateInterface(name, item)); + +fs.mkdirSync(OUT_DIR, { recursive: true }); + +// Delete stale generated files, in the new directory and in the old location. +for (const dir of [IMPL_DIR, OUT_DIR]) { + for (const file of fs.readdirSync(dir)) { + if (!file.endsWith('.java') || (dir === OUT_DIR && outputs.has(file))) + continue; + const text = fs.readFileSync(path.join(dir, file), 'utf-8'); + if (text.includes(GENERATED_MARKER)) + fs.unlinkSync(path.join(dir, file)); + } } for (const [file, text] of outputs) { const target = path.join(OUT_DIR, file); From d61b8c51127fb18d0e69f4b75295ca5c51ed38d5 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 17:38:33 -0800 Subject: [PATCH 31/33] chore(protocol): exclude impl.protocol from javadoc --- playwright/pom.xml | 2 +- scripts/verify_javadoc.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright/pom.xml b/playwright/pom.xml index 2362d86f2..8b323e69f 100644 --- a/playwright/pom.xml +++ b/playwright/pom.xml @@ -33,7 +33,7 @@ makes the plugin pass "patch-module com.microsoft.playwright=null" and the javadoc jar ends up empty. --> ${project.build.sourceDirectory} com.microsoft.playwright - com.microsoft.playwright.impl + com.microsoft.playwright.impl,com.microsoft.playwright.impl.protocol diff --git a/scripts/verify_javadoc.sh b/scripts/verify_javadoc.sh index 1ed02de8e..68b970389 100755 --- a/scripts/verify_javadoc.sh +++ b/scripts/verify_javadoc.sh @@ -42,9 +42,9 @@ for page in \ fi done -IMPL_PAGES=$(echo "$ENTRIES" | grep -E '^com/microsoft/playwright/impl/[^/]+\.html$' || true) +IMPL_PAGES=$(echo "$ENTRIES" | grep -E '^com/microsoft/playwright/impl/(protocol/)?[^/]+\.html$' || true) if [[ -n "$IMPL_PAGES" ]]; then - echo "ERROR: com.microsoft.playwright.impl should be excluded, found:" + echo "ERROR: com.microsoft.playwright.impl and impl.protocol should be excluded, found:" echo "$IMPL_PAGES" FAILED=1 fi From 1dedddc378265b18426f5d59687d94e0a964b33c Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 17:59:39 -0800 Subject: [PATCH 32/33] fix(javadoc): exclude the subpackages of impl from the javadoc jar --- playwright/pom.xml | 2 +- scripts/verify_javadoc.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright/pom.xml b/playwright/pom.xml index 8b323e69f..a59e6f3e3 100644 --- a/playwright/pom.xml +++ b/playwright/pom.xml @@ -33,7 +33,7 @@ makes the plugin pass "patch-module com.microsoft.playwright=null" and the javadoc jar ends up empty. --> ${project.build.sourceDirectory} com.microsoft.playwright - com.microsoft.playwright.impl,com.microsoft.playwright.impl.protocol + com.microsoft.playwright.impl:com.microsoft.playwright.impl.* diff --git a/scripts/verify_javadoc.sh b/scripts/verify_javadoc.sh index 68b970389..3d45bd206 100755 --- a/scripts/verify_javadoc.sh +++ b/scripts/verify_javadoc.sh @@ -42,9 +42,9 @@ for page in \ fi done -IMPL_PAGES=$(echo "$ENTRIES" | grep -E '^com/microsoft/playwright/impl/(protocol/)?[^/]+\.html$' || true) +IMPL_PAGES=$(echo "$ENTRIES" | grep -E '^com/microsoft/playwright/impl/' || true) if [[ -n "$IMPL_PAGES" ]]; then - echo "ERROR: com.microsoft.playwright.impl and impl.protocol should be excluded, found:" + echo "ERROR: com.microsoft.playwright.impl and its subpackages should be excluded, found:" echo "$IMPL_PAGES" FAILED=1 fi From 64d9d9a38133f7b6cccb6e21dc9c4bed5923b8b0 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Mon, 16 Nov 2026 18:19:40 -0800 Subject: [PATCH 33/33] fix(assertions): resolve handles in the expected value of hasJSProperty Frame.expect params carry the handles of expectedValue, so they have to be read with the connection's Gson. Adds a regression test. --- .../java/com/microsoft/playwright/impl/FrameImpl.java | 2 +- .../main/java/com/microsoft/playwright/impl/Utils.java | 2 +- .../com/microsoft/playwright/TestLocatorAssertions.java | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index 048bd0437..4cfd275b7 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java @@ -1168,7 +1168,7 @@ FrameExpectResult expect(String expression, FrameExpectOptions options, String t } FrameExpectResult expect(String expression, FrameExpectOptions options) { - FrameExpectParams params = toProtocol(options, FrameExpectParams.class); + FrameExpectParams params = toProtocol(this, options, FrameExpectParams.class); params.expression = expression; FrameExpectResult result = new FrameExpectResult(); try { diff --git a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java index e39c0d2c7..b0e3aa035 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -140,7 +140,7 @@ public void write(JsonWriter out, ChannelOwner value) throws IOException { @Override public ChannelOwner read(JsonReader in) { - throw new PlaywrightException("Internal error: params with channel references must be built with ChannelOwner.toProtocol"); + throw new PlaywrightException("Internal error: params with channel references must be built with Utils.toProtocol(owner, options, paramsClass)"); } }; } diff --git a/playwright/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java b/playwright/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java index c0d7db266..204701aea 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestLocatorAssertions.java @@ -461,6 +461,15 @@ void hasJSPropertyPass(Page page) { assertThat(locator).hasJSProperty("foo", mapOf("a", 1, "b", "string")); } + @PlaywrightTest + void hasJSPropertyHandlePass(Page page) { + // https://github.com/microsoft/playwright-java/pull/2049 + page.setContent("

hi
"); + JSHandle body = page.evaluateHandle("document.body"); + page.evaluate("b => { document.querySelector('#a').foo = b; }", body); + assertThat(page.locator("#a")).hasJSProperty("foo", body); + } + @PlaywrightTest void hasJSPropertyNumberFail(Page page) { page.setContent("
Text content
");