diff --git a/playwright/pom.xml b/playwright/pom.xml index 2362d86f2..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:com.microsoft.playwright.impl.* 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..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,7 +16,9 @@ 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; import com.microsoft.playwright.APIResponse; import com.microsoft.playwright.PlaywrightException; @@ -37,14 +39,17 @@ 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 { +public class APIRequestContextImpl extends ChannelOwner implements APIRequestContext { private final TracingImpl tracing; private String disposeReason; 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()); @@ -62,21 +67,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 @@ -84,7 +89,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 @@ -98,8 +105,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(); } @@ -134,20 +140,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) { @@ -161,38 +165,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, result.response); + } + + 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) { @@ -207,8 +218,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) { @@ -218,12 +229,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; } 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 21f96b2cb..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; @@ -27,6 +28,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,25 +40,32 @@ class APIResponseImpl implements APIResponse { final APIRequestContextImpl context; - private final JsonObject initializer; + private final com.microsoft.playwright.impl.protocol.APIResponse response; private final RawHeaders headers; - APIResponseImpl(APIRequestContextImpl apiRequestContext, JsonObject response) { + APIResponseImpl(APIRequestContextImpl apiRequestContext, com.microsoft.playwright.impl.protocol.APIResponse 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 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 +76,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 @@ -90,28 +99,38 @@ public boolean ok() { @Override public SecurityDetails securityDetails() { - if (!initializer.has("securityDetails")) { + com.microsoft.playwright.impl.protocol.SecurityDetails 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 +141,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,25 +163,27 @@ 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() { - 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/ArtifactImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ArtifactImpl.java index 142d8c44a..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,15 +28,15 @@ 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) { super(parent, type, guid, initializer); } 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() { @@ -53,39 +54,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/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 2b1a44e55..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; @@ -53,6 +54,8 @@ public Frame frame() { } } + final BindingCallChannel channel = new BindingCallChannel(this); + BindingCall(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -63,12 +66,16 @@ 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. 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..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,9 +16,11 @@ 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; +import com.google.gson.reflect.TypeToken; import com.microsoft.playwright.*; import com.microsoft.playwright.options.*; @@ -40,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; @@ -90,6 +92,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()); @@ -354,18 +358,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 @@ -392,8 +394,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) { @@ -409,17 +411,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 @@ -447,23 +448,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); } @@ -483,10 +482,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 @@ -502,9 +500,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 @@ -512,8 +510,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 @@ -603,41 +600,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); } @@ -648,9 +644,11 @@ 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); + // 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 = json.toString(); if (options.path != null) { @@ -733,11 +731,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) { @@ -764,7 +764,7 @@ void handleWebSocketRoute(WebSocketRouteImpl route) { } WaitableResult pause() { - return sendMessageAsync("pause", new JsonObject()); + return sendMessageAsync("pause", new BrowserContextPauseParams()); } @Override @@ -826,15 +826,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); @@ -917,14 +912,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 d22716ad6..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,11 +16,15 @@ 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; +import com.google.gson.reflect.TypeToken; 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; @@ -32,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<>(); @@ -48,6 +52,8 @@ enum EventType { DISCONNECTED, } + final BrowserChannel channel = new BrowserChannel(this); + BrowserImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -92,7 +98,7 @@ public void close(CloseOptions options) { return; } try { - sendMessage("close"); + channel.close(new BrowserCloseParams(), NO_TIMEOUT); } catch (PlaywrightException e) { if (!isSafeCloseError(e)) { throw e; @@ -146,28 +152,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) { @@ -175,29 +183,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(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; + BrowserContextImpl context = channel.newContext(params, NO_TIMEOUT).context; context.initializeHarFromOptions(harOptions); return context; } @@ -213,43 +216,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) { @@ -265,6 +256,54 @@ public byte[] stopTracing() { return data; } + // The protocol takes a list of http credentials, the option is a single value or a list. + @SuppressWarnings("unchecked") + static List httpCredentialsToProtocol(Object httpCredentials) { + if (httpCredentials == null) { + return null; + } + List list = new ArrayList<>(); + if (httpCredentials instanceof List) { + list.addAll((List) httpCredentials); + } else { + list.add((HttpCredentials) httpCredentials); + } + if (list.isEmpty()) { + return null; + } + List result = new ArrayList<>(); + for (HttpCredentials credentials : list) { + 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; + c.send = credentials.send == null ? null : credentials.send.name().toLowerCase(); + result.add(c); + } + return result; + } + + static List clientCertificatesToProtocol(List clientCertificates) { + if (clientCertificates == null) { + return null; + } + 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) { BrowserContextImpl context = newContext(convertType(options, NewContextOptions.class)); PageImpl page = context.newPage(); @@ -300,9 +339,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 f5dd7d7a3..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,26 +16,31 @@ 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; 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.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.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.httpCredentialsToProtocol; 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); + BrowserTypeImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -45,9 +50,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; @@ -59,13 +63,11 @@ public Browser connect(String wsEndpoint, ConnectOptions options) { options = new ConnectOptions(); } // 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(); + // 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)) { @@ -76,14 +78,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")) { @@ -120,11 +122,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; } @@ -149,25 +149,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) { @@ -175,26 +179,37 @@ 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"); + 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.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.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; + 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/CDPSessionImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CDPSessionImpl.java index ad6bf77aa..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; @@ -31,6 +32,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); } @@ -67,15 +70,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 @@ -90,6 +91,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/ChannelOwner.java b/playwright/src/main/java/com/microsoft/playwright/impl/ChannelOwner.java index c25f33eb3..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<>(); @@ -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) { @@ -142,6 +161,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. + */ + 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()) { + return null; + } + return connection.protocolGson().fromJson(result, resultClass); + } + + public 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/ClockImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ClockImpl.java index 67d506cd3..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,6 +1,6 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Clock; import java.util.Date; @@ -8,129 +8,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/Connection.java b/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java index 8bbae9cee..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,7 +15,14 @@ */ 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; +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 +32,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; @@ -52,7 +60,7 @@ public String toString() { ", method='" + method + '\'' + ", params=" + (params == null ? null : "<...>") + ", result='" + result + '\'' + - ", error='" + error + '\'' + + ", error='" + Connection.errorToString(error) + '\'' + '}'; } } @@ -61,6 +69,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; @@ -87,11 +99,10 @@ 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"; + params.supportsLoneSurrogates = true; + return new RootChannel(this).initialize(params, NO_TIMEOUT).playwright; } } @@ -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,79 @@ 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()); + } + } + + // 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 ""; @@ -301,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/ConsoleMessageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ConsoleMessageImpl.java index dcfde77ca..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,8 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.ConsoleMessage; import com.microsoft.playwright.JSHandle; import com.microsoft.playwright.Worker; @@ -26,25 +25,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 +73,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/CredentialsImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/CredentialsImpl.java index aa68f4a7d..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,7 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Credentials; import com.microsoft.playwright.options.VirtualCredential; @@ -24,6 +24,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 +36,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 4bad327d1..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; @@ -25,11 +26,14 @@ 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 { +public 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); } @@ -65,22 +69,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/DialogImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/DialogImpl.java index 74d23dca9..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,13 @@ 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; DialogImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { @@ -34,17 +36,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/DisposableObject.java b/playwright/src/main/java/com/microsoft/playwright/impl/DisposableObject.java index b4e16db10..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,15 +16,18 @@ 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) { super(parent, type, guid, initializer); } @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/ElementHandleImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/ElementHandleImpl.java index 53e7fe729..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,11 +16,11 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; +import com.microsoft.playwright.impl.protocol.*; 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; @@ -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; @@ -52,61 +55,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 @@ -114,8 +108,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 @@ -123,17 +117,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 @@ -141,16 +131,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 @@ -158,22 +148,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 @@ -181,20 +170,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 @@ -202,54 +189,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 @@ -257,9 +233,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 @@ -270,11 +246,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); } @@ -286,8 +271,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 @@ -307,9 +292,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); } @@ -326,9 +316,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); } @@ -338,16 +335,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 @@ -355,8 +354,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 @@ -383,9 +382,16 @@ 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); + 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)); } @Override @@ -399,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 @@ -409,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 @@ -424,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 @@ -434,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 @@ -446,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 @@ -460,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/FrameImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/FrameImpl.java index dbf4cd77c..4cfd275b7 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; @@ -49,6 +50,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); @@ -78,30 +81,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 @@ -137,13 +130,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 @@ -152,13 +143,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 @@ -170,9 +159,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); @@ -181,10 +169,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 @@ -196,9 +183,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); @@ -207,10 +193,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 @@ -218,9 +203,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 @@ -237,12 +222,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 @@ -250,8 +235,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 @@ -263,12 +248,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 @@ -276,32 +261,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 @@ -309,10 +289,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 @@ -320,15 +300,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 @@ -410,14 +389,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 @@ -429,14 +405,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 @@ -448,9 +419,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 @@ -462,13 +433,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 @@ -480,10 +451,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 @@ -495,10 +466,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 @@ -510,10 +481,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 @@ -525,10 +496,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 @@ -545,10 +516,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 @@ -560,10 +531,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 @@ -575,10 +546,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 @@ -590,10 +561,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 @@ -610,10 +581,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 @@ -640,10 +611,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 @@ -655,10 +626,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); } @@ -667,10 +645,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); } @@ -684,17 +667,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 @@ -715,9 +700,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 @@ -734,10 +719,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); + 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)); } @Override @@ -755,10 +747,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 @@ -766,9 +765,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 @@ -776,15 +775,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 @@ -792,10 +790,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 @@ -803,9 +801,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 @@ -818,12 +816,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 @@ -997,22 +993,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 @@ -1050,62 +1041,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) { + Utils.UploadParams upload = addFilePathUploadParams(files, page.context()); + if (upload.emptyPayloads) { + params.payloads = new ArrayList<>(); } - sendMessage("highlight", params, NO_TIMEOUT); + params.localPaths = upload.localPaths; + params.streams = upload.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); + } + } + + 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) { @@ -1162,11 +1168,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(this, 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); 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..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,22 +16,21 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; +import com.microsoft.playwright.impl.protocol.*; 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 +41,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 +88,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 +98,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 +111,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 +130,8 @@ private static Map mergeSetCookieHeaders(JsonArray headersArray) } void dispose() { - JsonObject params = new JsonObject(); - params.addProperty("harId", harId); + LocalUtilsHarCloseParams params = new LocalUtilsHarCloseParams(); + params.harId = harId; localUtils.sendMessageAsync("harClose", params); } } 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..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; @@ -29,6 +30,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(); @@ -42,57 +45,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 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..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,13 +29,15 @@ 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 } 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); } @@ -42,9 +45,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 @@ -79,7 +82,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/KeyboardImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/KeyboardImpl.java index 969fa30ca..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,31 +16,31 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; 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.toProtocol; 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 +49,26 @@ public void press(String key, PressOptions options) { } private void pressImpl(String key, PressOptions options) { - if (options == null) { - options = new PressOptions(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("key", key); - page.sendMessage("keyboardPress", params, NO_TIMEOUT); + PageKeyboardPressParams params = toProtocol(options, PageKeyboardPressParams.class); + 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(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("text", text); - page.sendMessage("keyboardType", params, NO_TIMEOUT); + PageKeyboardTypeParams params = toProtocol(options, PageKeyboardTypeParams.class); + 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/LocalUtils.java b/playwright/src/main/java/com/microsoft/playwright/impl/LocalUtils.java index 782089aad..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; @@ -26,6 +27,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); } @@ -34,48 +37,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/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 cb4357846..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.*; @@ -112,13 +113,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 +137,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 +147,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 +680,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 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..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,29 +16,26 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Mouse; 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; +import static com.microsoft.playwright.impl.Utils.toProtocol; class MouseImpl implements Mouse { - private final ChannelOwner page; + private final PageImpl page; - MouseImpl(ChannelOwner page) { + MouseImpl(PageImpl page) { this.page = page; } @Override public void click(double x, double y, ClickOptions options) { - if (options == null) { - options = new ClickOptions(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("x", x); - params.addProperty("y", y); - page.sendMessage("mouseClick", params, NO_TIMEOUT); + PageMouseClickParams params = toProtocol(options, PageMouseClickParams.class); + params.x = x; + params.y = y; + page.channel.mouseClick(params, NO_TIMEOUT); } @Override @@ -59,38 +56,29 @@ private void dblclickImpl(double x, double y, DblclickOptions options) { @Override public void down(DownOptions options) { - if (options == null) { - options = new DownOptions(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - page.sendMessage("mouseDown", params, NO_TIMEOUT); + PageMouseDownParams params = toProtocol(options, PageMouseDownParams.class); + page.channel.mouseDown(params, NO_TIMEOUT); } @Override public void move(double x, double y, MoveOptions options) { - if (options == null) { - options = new MoveOptions(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("x", x); - params.addProperty("y", y); - page.sendMessage("mouseMove", params, NO_TIMEOUT); + PageMouseMoveParams params = toProtocol(options, PageMouseMoveParams.class); + params.x = x; + params.y = y; + page.channel.mouseMove(params, NO_TIMEOUT); } @Override public void up(UpOptions options) { - if (options == null) { - options = new UpOptions(); - } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - page.sendMessage("mouseUp", params, NO_TIMEOUT); + PageMouseUpParams params = toProtocol(options, PageMouseUpParams.class); + 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/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/PageImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/PageImpl.java index f4a279541..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; @@ -41,6 +42,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 +137,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); @@ -577,13 +580,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)) { @@ -606,13 +607,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 @@ -628,14 +624,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)); } @@ -644,10 +639,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) { } } @@ -663,9 +658,9 @@ private void onLocatorHandlerTriggered(int uid) { if (remove) { locatorHandlers.remove(uid); } - JsonObject params = new JsonObject(); - params.addProperty("uid", uid); - params.addProperty("remove", remove); + PageResolveLocatorHandlerNoReplyParams params = new PageResolveLocatorHandlerNoReplyParams(); + params.uid = uid; + params.remove = remove; sendMessageAsync("resolveLocatorHandlerNoReply", params); } } @@ -675,9 +670,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 @@ -708,10 +702,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 @@ -726,7 +719,7 @@ public ElementHandle addStyleTag(AddStyleTagOptions options) { @Override public void bringToFront() { - sendMessage("bringToFront"); + channel.bringToFront(NO_TIMEOUT); } @Override @@ -768,8 +761,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 @@ -796,10 +789,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 @@ -945,12 +937,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 @@ -962,17 +950,13 @@ 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 public void requestGC() { - sendMessage("requestGC"); + channel.requestGC(NO_TIMEOUT); } @Override @@ -1050,33 +1034,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(this, item)); } 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 (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; @@ -1099,7 +1087,7 @@ public WebMCP webmcp() { @Override public void hideHighlight() { - sendMessage("hideHighlight", new JsonObject(), NO_TIMEOUT); + channel.hideHighlight(NO_TIMEOUT); } @Override @@ -1117,13 +1105,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 @@ -1150,10 +1138,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); } @@ -1179,12 +1165,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 @@ -1280,11 +1262,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(this, options, PageScreenshotParams.class); + byte[] buffer = channel.screenshot(params, timeoutSettings.timeout(options.timeout)).binary; if (options.path != null) { Utils.writeToFile(buffer, options.path); } @@ -1323,16 +1302,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 @@ -1358,9 +1336,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 @@ -1435,11 +1415,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 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..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; @@ -66,6 +67,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/Protocol.java b/playwright/src/main/java/com/microsoft/playwright/impl/Protocol.java index b7e02eed2..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,90 +16,9 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; 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 +30,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/RequestImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/RequestImpl.java index 1d33a08b6..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; @@ -25,11 +26,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; @@ -52,6 +55,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); @@ -158,11 +163,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 @@ -171,8 +172,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 @@ -199,11 +205,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 b2f73fcf1..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; @@ -31,6 +32,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 { @@ -38,6 +40,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))); @@ -53,8 +57,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 @@ -89,8 +92,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 @@ -125,20 +127,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); + com.microsoft.playwright.impl.protocol.SecurityDetails 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 @@ -163,8 +174,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; } 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..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,15 +16,19 @@ 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; 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; @@ -36,6 +40,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()); @@ -44,8 +50,8 @@ 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); + RouteAbortParams params = new RouteAbortParams(); + params.errorCode = errorCode; sendMessageAsync("abort", params); } @@ -116,26 +122,33 @@ 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)); - } - if (options.postData != null) { - String base64 = Base64.getEncoder().encodeToString(options.postData); - params.addProperty("postData", base64); + params.headers = toNameValues(options.headers); } + params.postData = options.postData; } - params.addProperty("isFallback", isFallback); + params.isFallback = isFallback; sendMessageAsync("continue", params); } + 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); + } + return result; + } + private static byte[] getPostDataBytes(Object postData) { if (postData instanceof byte[]) { return (byte[]) postData; @@ -219,14 +232,12 @@ 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); - } + RouteFulfillParams params = new RouteFulfillParams(); + params.status = status; + params.headers = toNameValues(headers); + params.isBase64 = isBase64; + params.body = body; + params.fetchResponseUid = fetchResponseUid; sendMessageAsync("fulfill", params); } @@ -237,8 +248,8 @@ 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); } 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..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; @@ -25,7 +26,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,8 +51,8 @@ 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")); + PageScreencastFrameAckParams ackParams = new PageScreencastFrameAckParams(); + ackParams.frameId = params.get("frameId").getAsInt(); page.sendMessageAsync("screencastFrameAck", ackParams); } } @@ -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..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; @@ -31,7 +32,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"; @@ -43,8 +44,8 @@ public void setTestIdAttribute(String attributeName) { testIdAttributeName = attributeName; for (BrowserContextImpl context : contextsForSelectors) { try { - JsonObject params = new JsonObject(); - params.addProperty("testIdAttributeName", attributeName); + BrowserContextSetTestIdAttributeNameParams params = new BrowserContextSetTestIdAttributeNameParams(); + params.testIdAttributeName = attributeName; context.sendMessageAsync("setTestIdAttributeName", params); } catch (PlaywrightException e) { } @@ -68,20 +69,20 @@ 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"); } - 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); } 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..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; @@ -69,6 +72,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 +91,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 +132,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 +161,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 +173,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 +197,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 +293,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)); } @@ -336,38 +324,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) { @@ -486,6 +442,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/Stream.java b/playwright/src/main/java/com/microsoft/playwright/impl/Stream.java index cfb94401a..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,14 +16,16 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import java.io.IOException; import java.io.InputStream; -import java.util.Base64; 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); } @@ -48,14 +50,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++]; } @@ -65,7 +65,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/TouchscreenImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TouchscreenImpl.java index 175a70c17..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,7 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.Touchscreen; import static com.microsoft.playwright.impl.ChannelOwner.NO_TIMEOUT; @@ -25,14 +25,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/TracingImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/TracingImpl.java index b2130f897..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,8 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonArray; -import com.google.gson.JsonElement; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import com.microsoft.playwright.PlaywrightException; import com.microsoft.playwright.Tracing; @@ -32,11 +31,11 @@ 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 { +public class TracingImpl extends ChannelOwner implements Tracing { private boolean includeSources; private Path tracesDir; private boolean isTracing; @@ -55,6 +54,8 @@ static class HarRecorder { } + final TracingChannel channel = new TracingChannel(this); + TracingImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -89,11 +90,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); } @@ -102,23 +103,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) { @@ -131,7 +131,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 @@ -156,26 +156,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) { @@ -192,14 +188,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); } @@ -209,14 +203,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); } } @@ -266,25 +253,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; } @@ -297,22 +287,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(); @@ -320,10 +309,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(); } 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..b0e3aa035 100644 --- a/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java +++ b/playwright/src/main/java/com/microsoft/playwright/impl/Utils.java @@ -16,9 +16,16 @@ 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; +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; @@ -39,7 +46,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 { @@ -86,6 +92,60 @@ 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. 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(); + } catch (Exception e) { + throw new PlaywrightException("Internal error", e); + } + } + 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 Utils.toProtocol(owner, options, paramsClass)"); + } + }; + } + }).create(); + public static T clone(T f) { if (f == null) { return f; @@ -106,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) { @@ -164,27 +237,26 @@ 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) { - JsonObject tempFilesParams = new JsonObject(); + private static BrowserContextCreateTempFilesResult createTempFiles(BrowserContextImpl context, Path localDirectory, List localPaths) { + 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 { @@ -198,13 +270,12 @@ 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); + BrowserContextCreateTempFilesParams.BrowserContextCreateTempFilesParamsItems item = new BrowserContextCreateTempFilesParams.BrowserContextCreateTempFilesParamsItems(); + item.name = name.toString(); + item.lastModifiedMs = (double) lastModifiedMs; + params.items.add(item); } - tempFilesParams.add("items", items); - return context.sendMessage("createTempFiles", tempFilesParams, NO_TIMEOUT).getAsJsonObject(); + return context.channel.createTempFiles(params, NO_TIMEOUT); } static void checkFilePayloadSize(FilePayload[] files) { @@ -359,66 +430,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) { 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..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,8 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.WebMCP; import com.microsoft.playwright.options.WebMCPTool; @@ -37,18 +36,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/WebSocketImpl.java b/playwright/src/main/java/com/microsoft/playwright/impl/WebSocketImpl.java index 130a5e505..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; @@ -38,6 +39,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..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; @@ -12,9 +13,9 @@ 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 { +public class WebSocketRouteImpl extends ChannelOwner implements WebSocketRoute { private Consumer onPageMessage; private BiConsumer onPageClose; @@ -27,8 +28,8 @@ public void close(CloseOptions options) { if (options == null) { options = new CloseOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("wasClean", true); + WebSocketRouteCloseServerParams params = toProtocol(options, WebSocketRouteCloseServerParams.class); + params.wasClean = true; sendMessageAsync("closeServer", params); } @@ -49,18 +50,17 @@ public void onMessage(Consumer handler) { @Override public void send(String message) { - JsonObject params = new JsonObject(); - params.addProperty("message", message); - params.addProperty("isBase64", false); + WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); + params.message = message; + params.isBase64 = false; sendMessageAsync("sendToServer", 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); + WebSocketRouteSendToServerParams params = new WebSocketRouteSendToServerParams(); + params.message = Base64.getEncoder().encodeToString(message); + params.isBase64 = true; sendMessageAsync("sendToServer", params); } @@ -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); } @@ -84,8 +86,8 @@ public void close(CloseOptions options) { if (options == null) { options = new CloseOptions(); } - JsonObject params = gson().toJsonTree(options).getAsJsonObject(); - params.addProperty("wasClean", true); + WebSocketRouteClosePageParams params = toProtocol(options, WebSocketRouteClosePageParams.class); + params.wasClean = true; sendMessageAsync("closePage", params); } @@ -95,7 +97,7 @@ public WebSocketRoute connectToServer() { throw new PlaywrightException("Already connected to the server"); } connected = true; - sendMessageAsync("connect"); + sendMessageAsync("connect", new WebSocketRouteConnectParams()); return server; } @@ -111,18 +113,17 @@ public void onMessage(Consumer handler) { @Override public void send(String message) { - JsonObject params = new JsonObject(); - params.addProperty("message", message); - params.addProperty("isBase64", false); + WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); + params.message = message; + params.isBase64 = false; sendMessageAsync("sendToPage", 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); + WebSocketRouteSendToPageParams params = new WebSocketRouteSendToPageParams(); + params.message = Base64.getEncoder().encodeToString(message); + params.isBase64 = true; sendMessageAsync("sendToPage", params); } @@ -153,7 +154,7 @@ void afterHandle() { } // 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. } @@ -167,9 +168,9 @@ 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); + WebSocketRouteSendToServerParams messageParams = new WebSocketRouteSendToServerParams(); + messageParams.message = message; + messageParams.isBase64 = isBase64; sendMessageAsync("sendToServer", messageParams); } } else if ("messageFromServer".equals(event)) { @@ -178,9 +179,9 @@ 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); + WebSocketRouteSendToPageParams messageParams = new WebSocketRouteSendToPageParams(); + messageParams.message = message; + messageParams.isBase64 = isBase64; sendMessageAsync("sendToPage", messageParams); } } else if ("closePage".equals(event)) { @@ -190,10 +191,10 @@ 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); + WebSocketRouteCloseServerParams closeParams = new WebSocketRouteCloseServerParams(); + closeParams.code = code; + closeParams.reason = reason; + closeParams.wasClean = wasClean; sendMessageAsync("closeServer", closeParams); } } else if ("closeServer".equals(event)) { @@ -203,10 +204,10 @@ 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); + WebSocketRouteClosePageParams closeParams = new WebSocketRouteClosePageParams(); + closeParams.code = code; + closeParams.reason = reason; + closeParams.wasClean = wasClean; sendMessageAsync("closePage", closeParams); } } 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..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,7 +16,7 @@ package com.microsoft.playwright.impl; -import com.google.gson.JsonObject; +import com.microsoft.playwright.impl.protocol.*; import com.microsoft.playwright.WebStorage; import com.microsoft.playwright.options.WebStorageItem; @@ -35,43 +35,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); } } 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..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; @@ -39,6 +40,8 @@ enum EventType { CONSOLE, } + final WorkerChannel channel = new WorkerChannel(this); + WorkerImpl(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -97,21 +100,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 5c5164ebc..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,15 +16,18 @@ package com.microsoft.playwright.impl; +import com.microsoft.playwright.impl.protocol.*; import com.google.gson.JsonObject; import java.io.IOException; import java.io.OutputStream; import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; -import java.util.Base64; +import java.util.Arrays; + +public class WritableStream extends ChannelOwner { + final WritableStreamChannel channel = new WritableStreamChannel(this); -class WritableStream extends ChannelOwner { WritableStream(ChannelOwner parent, String type, String guid, JsonObject initializer) { super(parent, type, guid, initializer); } @@ -38,17 +41,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); } }; } 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/protocol/ArtifactChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactChannel.java new file mode 100644 index 000000000..95e0a9f4a --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/ArtifactChannel.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.protocol; + +public class ArtifactChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public ArtifactChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public ArtifactPathAfterFinishedResult pathAfterFinished(ArtifactPathAfterFinishedParams params, Double timeout) { + return owner.sendMessage("pathAfterFinished", params, ArtifactPathAfterFinishedResult.class, timeout); + } + + public ArtifactPathAfterFinishedResult pathAfterFinished(Double timeout) { + return pathAfterFinished(new ArtifactPathAfterFinishedParams(), timeout); + } + + public void saveAs(ArtifactSaveAsParams params, Double timeout) { + owner.sendMessage("saveAs", params, timeout); + } + + public ArtifactSaveAsStreamResult saveAsStream(ArtifactSaveAsStreamParams params, Double timeout) { + return owner.sendMessage("saveAsStream", params, ArtifactSaveAsStreamResult.class, timeout); + } + + public ArtifactSaveAsStreamResult saveAsStream(Double timeout) { + return saveAsStream(new ArtifactSaveAsStreamParams(), timeout); + } + + public ArtifactFailureResult failure(ArtifactFailureParams params, Double timeout) { + return owner.sendMessage("failure", params, ArtifactFailureResult.class, timeout); + } + + public ArtifactFailureResult failure(Double timeout) { + return failure(new ArtifactFailureParams(), timeout); + } + + public ArtifactStreamResult stream(ArtifactStreamParams params, Double timeout) { + return owner.sendMessage("stream", params, ArtifactStreamResult.class, timeout); + } + + public ArtifactStreamResult stream(Double timeout) { + return stream(new ArtifactStreamParams(), timeout); + } + + public void cancel(ArtifactCancelParams params, Double timeout) { + owner.sendMessage("cancel", params, timeout); + } + + public void cancel(Double timeout) { + cancel(new ArtifactCancelParams(), timeout); + } + + public void delete(ArtifactDeleteParams params, Double timeout) { + owner.sendMessage("delete", params, timeout); + } + + public void delete(Double timeout) { + delete(new ArtifactDeleteParams(), timeout); + } +} 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/protocol/BindingCallChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallChannel.java new file mode 100644 index 000000000..cc1cbecce --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/BindingCallChannel.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 BindingCallChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public BindingCallChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void reject(BindingCallRejectParams params, Double timeout) { + owner.sendMessage("reject", params, timeout); + } + + public void resolve(BindingCallResolveParams params, Double timeout) { + owner.sendMessage("resolve", params, timeout); + } +} 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/protocol/CDPSessionChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionChannel.java new file mode 100644 index 000000000..7de7e8a33 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/CDPSessionChannel.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; + +public class CDPSessionChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public CDPSessionChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public CDPSessionSendResult send(CDPSessionSendParams params, Double timeout) { + return owner.sendMessage("send", params, CDPSessionSendResult.class, timeout); + } + + public void detach(CDPSessionDetachParams params, Double timeout) { + owner.sendMessage("detach", params, timeout); + } + + public void detach(Double timeout) { + detach(new CDPSessionDetachParams(), timeout); + } +} 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/protocol/DialogChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogChannel.java new file mode 100644 index 000000000..e5f7e82c4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DialogChannel.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; + +public class DialogChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public DialogChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void accept(DialogAcceptParams params, Double timeout) { + owner.sendMessage("accept", params, timeout); + } + + public void dismiss(DialogDismissParams params, Double timeout) { + owner.sendMessage("dismiss", params, timeout); + } + + public void dismiss(Double timeout) { + dismiss(new DialogDismissParams(), timeout); + } +} 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/protocol/DisposableChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableChannel.java new file mode 100644 index 000000000..4b792c3d4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/DisposableChannel.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 DisposableChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public DisposableChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void dispose(DisposableDisposeParams params, Double timeout) { + owner.sendMessage("dispose", params, timeout); + } + + public void dispose(Double timeout) { + dispose(new DisposableDisposeParams(), timeout); + } +} 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/protocol/JsonPipeChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeChannel.java new file mode 100644 index 000000000..dfb9e2361 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/JsonPipeChannel.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; + +public class JsonPipeChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public JsonPipeChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void send(JsonPipeSendParams params, Double timeout) { + owner.sendMessage("send", params, timeout); + } + + public void close(JsonPipeCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public void close(Double timeout) { + close(new JsonPipeCloseParams(), timeout); + } +} 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/protocol/PlaywrightChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightChannel.java new file mode 100644 index 000000000..489c547e4 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/PlaywrightChannel.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 PlaywrightChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public PlaywrightChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + 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/protocol/RequestChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestChannel.java new file mode 100644 index 000000000..6cfada4eb --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RequestChannel.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 RequestChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public RequestChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public RequestResponseResult response(RequestResponseParams params, Double timeout) { + return owner.sendMessage("response", params, RequestResponseResult.class, timeout); + } + + public RequestResponseResult response(Double timeout) { + return response(new RequestResponseParams(), timeout); + } + + public RequestRawRequestHeadersResult rawRequestHeaders(RequestRawRequestHeadersParams params, Double timeout) { + return owner.sendMessage("rawRequestHeaders", params, RequestRawRequestHeadersResult.class, timeout); + } + + public RequestRawRequestHeadersResult rawRequestHeaders(Double timeout) { + return rawRequestHeaders(new RequestRawRequestHeadersParams(), timeout); + } +} 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/protocol/RootChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootChannel.java new file mode 100644 index 000000000..387716081 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RootChannel.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 RootChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public RootChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public RootInitializeResult initialize(RootInitializeParams params, Double timeout) { + return owner.sendMessage("initialize", params, RootInitializeResult.class, timeout); + } +} 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/protocol/RouteChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteChannel.java new file mode 100644 index 000000000..0a32bbf16 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/RouteChannel.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 RouteChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public RouteChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void redirectNavigationRequest(RouteRedirectNavigationRequestParams params, Double timeout) { + owner.sendMessage("redirectNavigationRequest", params, timeout); + } + + public void abort(RouteAbortParams params, Double timeout) { + owner.sendMessage("abort", params, timeout); + } + + public void continue_(RouteContinueParams params, Double timeout) { + owner.sendMessage("continue", params, timeout); + } + + public void fulfill(RouteFulfillParams params, Double timeout) { + owner.sendMessage("fulfill", params, timeout); + } +} 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/protocol/StreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamChannel.java new file mode 100644 index 000000000..b538b9175 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/StreamChannel.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; + +public class StreamChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public StreamChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public StreamReadResult read(StreamReadParams params, Double timeout) { + return owner.sendMessage("read", params, StreamReadResult.class, timeout); + } + + public void close(StreamCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public void close(Double timeout) { + close(new StreamCloseParams(), timeout); + } +} 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/protocol/WritableStreamChannel.java b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamChannel.java new file mode 100644 index 000000000..0900c5934 --- /dev/null +++ b/playwright/src/main/java/com/microsoft/playwright/impl/protocol/WritableStreamChannel.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; + +public class WritableStreamChannel { + private final com.microsoft.playwright.impl.ChannelOwner owner; + + public WritableStreamChannel(com.microsoft.playwright.impl.ChannelOwner owner) { + this.owner = owner; + } + + public void write(WritableStreamWriteParams params, Double timeout) { + owner.sendMessage("write", params, timeout); + } + + public void close(WritableStreamCloseParams params, Double timeout) { + owner.sendMessage("close", params, timeout); + } + + public void close(Double timeout) { + close(new WritableStreamCloseParams(), timeout); + } +} 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/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
"); 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..bb4febaf9 --- /dev/null +++ b/scripts/generate_java_channels.js @@ -0,0 +1,373 @@ +#!/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 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. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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 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 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 implType('ChannelOwner'); + case 'number': throw new Error('Use "int" or "float" instead of "number" in protocol.yml'); + } + if (interfaces.has(type)) + return implType(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} public ${field.type} ${id};`); + } + for (const n of nested) { + if (lines.length > 1) + lines.push(''); + lines.push(...classBody(n.name, n.properties, indent + ' ', 'public 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.protocol; + +${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 classes = []; + for (const [name, struct] of structs) { + const lines = []; + if (struct.type === 'enum') { + 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(` public static final String ${constant} = ${JSON.stringify(String(literal))};`); + } + lines.push('}'); + } else { + lines.push(...classBody(classNameFor(name), struct.properties, '', 'public ', null)); + } + classes.push({ name: classNameFor(name), text: fileText(lines) }); + } + return classes; +} + +// 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 classes = []; + let lines = []; + const flush = className => { + classes.push({ name: className, text: fileText(lines) }); + lines = []; + }; + // Channel. + lines.push(`public class ${classNameFor(name + 'Channel')} {`); + lines.push(` private final ${implType('ChannelOwner')} owner;`); + lines.push(''); + lines.push(` public ${classNameFor(name + 'Channel')}(${implType('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(` 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(` 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. + const initializerName = `${name}Initializer`; + if (item.initializer) + lines.push(...classBody(initializerName, item.initializer, '', 'public ', null)); + else + 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); + 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 || {}; + const className = `${name}${titleCase(eventName)}Event`; + lines.push(...classBody(className, event.parameters, '', 'public ', null)); + flush(className); + } + return classes; +} + +// ---- main ---- + +const outputs = new Map(); +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) + 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); + 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)}`); diff --git a/scripts/verify_javadoc.sh b/scripts/verify_javadoc.sh index 1ed02de8e..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/[^/]+\.html$' || true) +IMPL_PAGES=$(echo "$ENTRIES" | grep -E '^com/microsoft/playwright/impl/' || true) if [[ -n "$IMPL_PAGES" ]]; then - echo "ERROR: com.microsoft.playwright.impl should be excluded, found:" + echo "ERROR: com.microsoft.playwright.impl and its subpackages should be excluded, found:" echo "$IMPL_PAGES" FAILED=1 fi