diff --git a/Rakefile b/Rakefile index e001226b899e1..9ba7db50768cb 100644 --- a/Rakefile +++ b/Rakefile @@ -104,7 +104,6 @@ JAVA_RELEASE_TARGETS = %w[ //java/src/org/openqa/selenium/chrome:chrome.publish //java/src/org/openqa/selenium/chromium:chromium.publish //java/src/org/openqa/selenium/devtools/v85:v85.publish - //java/src/org/openqa/selenium/devtools/v91:v91.publish //java/src/org/openqa/selenium/devtools/v92:v92.publish //java/src/org/openqa/selenium/devtools/v93:v93.publish //java/src/org/openqa/selenium/devtools:devtools.publish diff --git a/java/CHANGELOG b/java/CHANGELOG index e8ad027fbe3cc..f3b4e88b74696 100644 --- a/java/CHANGELOG +++ b/java/CHANGELOG @@ -1,7 +1,7 @@ v4.0.0-rc-1 =========== -* Supported CDP versions: 85, 91, 92, 93. +* Supported CDP versions: 85, 92, 93. * Only the name and stereotype are mandatory in nodeConfig. * No longer sets unexpected alert value in Options by default. * Update IE options class in each language to match the currently diff --git a/java/src/org/openqa/selenium/devtools/v91/BUILD.bazel b/java/src/org/openqa/selenium/devtools/v91/BUILD.bazel deleted file mode 100644 index 2252b06fa1724..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/BUILD.bazel +++ /dev/null @@ -1,72 +0,0 @@ -load("@rules_jvm_external//:defs.bzl", "artifact") -load("//common:defs.bzl", "copy_file") -load("//java:defs.bzl", "java_export", "java_library") -load("//java:version.bzl", "SE_VERSION") - -cdp_version = "v91" - -java_export( - name = cdp_version, - srcs = glob(["*.java"]), - maven_coordinates = "org.seleniumhq.selenium:selenium-devtools-%s:%s" % (cdp_version, SE_VERSION), - opens_to = [ - "org.openqa.selenium.json", - ], - pom_template = "//java/src/org/openqa/selenium:template-pom", - visibility = [ - "//visibility:public", - ], - exports = [ - ":cdp", - ], - deps = [ - ":cdp", - "//java:auto-service", - "//java/src/org/openqa/selenium:core", - "//java/src/org/openqa/selenium/devtools", - "//java/src/org/openqa/selenium/json", - "//java/src/org/openqa/selenium/remote/http", - artifact("com.google.guava:guava"), - ], -) - -java_library( - name = "cdp", - srcs = [ - ":create-cdp-srcs", - ], - tags = [ - "no-lint", - ], - deps = [ - "//java/src/org/openqa/selenium:core", - "//java/src/org/openqa/selenium/devtools", - "//java/src/org/openqa/selenium/json", - artifact("com.google.guava:guava"), - ], -) - -genrule( - name = "create-cdp-srcs", - srcs = [ - ":browser_protocol", - ":js_protocol", - ], - outs = ["cdp.srcjar"], - cmd = "$(location //java/src/org/openqa/selenium/devtools:cdp-client-generator) $(location :browser_protocol) $(location :js_protocol) %s $@" % cdp_version, - tools = [ - "//java/src/org/openqa/selenium/devtools:cdp-client-generator", - ], -) - -copy_file( - name = "browser_protocol", - src = "//common/devtools/chromium/%s:browser_protocol" % cdp_version, - out = "browser_protocol.json", -) - -copy_file( - name = "js_protocol", - src = "//common/devtools/chromium/%s:js_protocol" % cdp_version, - out = "js_protocol.json", -) diff --git a/java/src/org/openqa/selenium/devtools/v91/V91CdpInfo.java b/java/src/org/openqa/selenium/devtools/v91/V91CdpInfo.java deleted file mode 100644 index 6f31efd608c3f..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91CdpInfo.java +++ /dev/null @@ -1,29 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import com.google.auto.service.AutoService; -import org.openqa.selenium.devtools.CdpInfo; - -@AutoService(CdpInfo.class) -public class V91CdpInfo extends CdpInfo { - - public V91CdpInfo() { - super(91, V91Domains::new); - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Domains.java b/java/src/org/openqa/selenium/devtools/v91/V91Domains.java deleted file mode 100644 index 7877d27c17245..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Domains.java +++ /dev/null @@ -1,70 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import org.openqa.selenium.devtools.DevTools; -import org.openqa.selenium.devtools.idealized.Domains; -import org.openqa.selenium.devtools.idealized.Events; -import org.openqa.selenium.devtools.idealized.Javascript; -import org.openqa.selenium.devtools.idealized.Network; -import org.openqa.selenium.devtools.idealized.log.Log; -import org.openqa.selenium.devtools.idealized.target.Target; -import org.openqa.selenium.internal.Require; - -public class V91Domains implements Domains { - - private final V91Javascript js; - private final V91Events events; - private final V91Log log; - private final V91Network network; - private final V91Target target; - - public V91Domains(DevTools devtools) { - Require.nonNull("DevTools", devtools); - events = new V91Events(devtools); - js = new V91Javascript(devtools); - log = new V91Log(); - network = new V91Network(devtools); - target = new V91Target(); - } - - @Override - public Events events() { - return events; - } - - @Override - public Javascript javascript() { - return js; - } - - @Override - public Network network() { - return network; - } - - @Override - public Target target() { - return target; - } - - @Override - public Log log() { - return log; - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Events.java b/java/src/org/openqa/selenium/devtools/v91/V91Events.java deleted file mode 100644 index 06aedfc4fe338..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Events.java +++ /dev/null @@ -1,116 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import com.google.common.collect.ImmutableList; -import org.openqa.selenium.JavascriptException; -import org.openqa.selenium.devtools.Command; -import org.openqa.selenium.devtools.DevTools; -import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.events.ConsoleEvent; -import org.openqa.selenium.devtools.idealized.Events; -import org.openqa.selenium.devtools.idealized.runtime.model.RemoteObject; -import org.openqa.selenium.devtools.v91.runtime.Runtime; -import org.openqa.selenium.devtools.v91.runtime.model.ConsoleAPICalled; -import org.openqa.selenium.devtools.v91.runtime.model.ExceptionDetails; -import org.openqa.selenium.devtools.v91.runtime.model.ExceptionThrown; -import org.openqa.selenium.devtools.v91.runtime.model.StackTrace; - -import java.math.BigDecimal; -import java.time.Instant; -import java.util.List; -import java.util.Optional; - -public class V91Events extends Events { - - public V91Events(DevTools devtools) { - super(devtools); - } - - @Override - protected Command enableRuntime() { - return Runtime.enable(); - } - - @Override - protected Command disableRuntime() { - return Runtime.disable(); - } - - @Override - protected Event consoleEvent() { - return Runtime.consoleAPICalled(); - } - - @Override - protected Event exceptionThrownEvent() { - return Runtime.exceptionThrown(); - } - - @Override - protected ConsoleEvent toConsoleEvent(ConsoleAPICalled event) { - long ts = new BigDecimal(event.getTimestamp().toJson()).longValue(); - - List modifiedArgs = event.getArgs().stream() - .map(obj -> new RemoteObject( - obj.getType().toString(), - obj.getValue().orElse(null))) - .collect(ImmutableList.toImmutableList()); - - return new ConsoleEvent( - event.getType().toString(), - Instant.ofEpochMilli(ts), - modifiedArgs); - } - - @Override - protected JavascriptException toJsException(ExceptionThrown event) { - ExceptionDetails details = event.getExceptionDetails(); - Optional maybeTrace = details.getStackTrace(); - Optional - maybeException = details.getException(); - - String message = maybeException - .flatMap(obj -> obj.getDescription().map(String::toString)) - .orElseGet(details::getText); - - JavascriptException exception = new JavascriptException(message); - - if (!maybeTrace.isPresent()) { - StackTraceElement element = new StackTraceElement( - "unknown", - "unknown", - details.getUrl().orElse("unknown"), - details.getLineNumber()); - exception.setStackTrace(new StackTraceElement[]{element}); - return exception; - } - - StackTrace trace = maybeTrace.get(); - - exception.setStackTrace(trace.getCallFrames().stream() - .map(frame -> new StackTraceElement( - "", - frame.getFunctionName(), - frame.getUrl(), - frame.getLineNumber())) - .toArray(StackTraceElement[]::new)); - - return exception; - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Javascript.java b/java/src/org/openqa/selenium/devtools/v91/V91Javascript.java deleted file mode 100644 index 091aa6008601e..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Javascript.java +++ /dev/null @@ -1,86 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import org.openqa.selenium.devtools.Command; -import org.openqa.selenium.devtools.DevTools; -import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.idealized.Javascript; -import org.openqa.selenium.devtools.v91.page.Page; -import org.openqa.selenium.devtools.v91.page.model.ScriptIdentifier; -import org.openqa.selenium.devtools.v91.runtime.Runtime; -import org.openqa.selenium.devtools.v91.runtime.model.BindingCalled; - -import java.util.Optional; - -public class V91Javascript extends Javascript { - - public V91Javascript(DevTools devtools) { - super(devtools); - } - - @Override - protected Command enableRuntime() { - return Runtime.enable(); - } - - @Override - protected Command disableRuntime() { - return Runtime.disable(); - } - - @Override - protected Command doAddJsBinding(String scriptName) { - return Runtime.addBinding(scriptName, Optional.empty(), Optional.empty()); - } - - @Override - protected Command doRemoveJsBinding(String scriptName) { - return Runtime.removeBinding(scriptName); - } - - @Override - protected Command enablePage() { - return Page.enable(); - } - - @Override - protected Command disablePage() { - return Page.disable(); - } - - @Override - protected Command addScriptToEvaluateOnNewDocument(String script) { - return Page.addScriptToEvaluateOnNewDocument(script, Optional.empty()); - } - - @Override - protected Command removeScriptToEvaluateOnNewDocument(ScriptIdentifier id) { - return Page.removeScriptToEvaluateOnNewDocument(id); - } - - @Override - protected Event bindingCalledEvent() { - return Runtime.bindingCalled(); - } - - @Override - protected String extractPayload(BindingCalled event) { - return event.getPayload(); - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Log.java b/java/src/org/openqa/selenium/devtools/v91/V91Log.java deleted file mode 100644 index eefa8b5e0d3e1..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Log.java +++ /dev/null @@ -1,87 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import org.openqa.selenium.devtools.Command; -import org.openqa.selenium.devtools.ConverterFunctions; -import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.v91.log.Log; -import org.openqa.selenium.devtools.v91.log.model.LogEntry; -import org.openqa.selenium.devtools.v91.runtime.model.Timestamp; -import org.openqa.selenium.json.JsonInput; - -import java.util.function.Function; -import java.util.logging.Level; - -public class V91Log implements org.openqa.selenium.devtools.idealized.log.Log { - @Override - public Command enable() { - return Log.enable(); - } - - @Override - public Command clear() { - return Log.clear(); - } - - @Override - public Event entryAdded() { - return new Event<>( - Log.entryAdded().getMethod(), - input -> { - Function mapper = ConverterFunctions.map( - "entry", - LogEntry.class); - LogEntry entry = mapper.apply(input); - - return new org.openqa.selenium.devtools.idealized.log.model.LogEntry( - entry.getSource().toString(), - new org.openqa.selenium.logging.LogEntry( - fromCdpLevel(entry.getLevel()), - fromCdpTimestamp(entry.getTimestamp()), - entry.getText())); - }); - } - - private Level fromCdpLevel(LogEntry.Level level) { - switch (level.toString()) { - case "verbose": - return Level.FINEST; - - case "info": - return Level.INFO; - - case "warning": - return Level.WARNING; - - case "error": - return Level.SEVERE; - - default: - return Level.INFO; - } - } - - private long fromCdpTimestamp(Timestamp timestamp) { - try { - return Long.parseLong(timestamp.toString()); - } catch (NumberFormatException e) { - return System.currentTimeMillis(); - } - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Network.java b/java/src/org/openqa/selenium/devtools/v91/V91Network.java deleted file mode 100644 index f67f71be7830b..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Network.java +++ /dev/null @@ -1,150 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import com.google.common.collect.ImmutableList; -import org.openqa.selenium.UsernameAndPassword; -import org.openqa.selenium.devtools.Command; -import org.openqa.selenium.devtools.DevTools; -import org.openqa.selenium.devtools.Event; -import org.openqa.selenium.devtools.idealized.Network; -import org.openqa.selenium.devtools.v91.fetch.Fetch; -import org.openqa.selenium.devtools.v91.fetch.model.AuthChallengeResponse; -import org.openqa.selenium.devtools.v91.fetch.model.AuthRequired; -import org.openqa.selenium.devtools.v91.fetch.model.HeaderEntry; -import org.openqa.selenium.devtools.v91.fetch.model.RequestPattern; -import org.openqa.selenium.devtools.v91.fetch.model.RequestPaused; -import org.openqa.selenium.devtools.v91.network.model.Request; -import org.openqa.selenium.remote.http.Contents; -import org.openqa.selenium.remote.http.HttpRequest; -import org.openqa.selenium.remote.http.HttpResponse; - -import java.util.ArrayList; -import java.util.Base64; -import java.util.List; -import java.util.Optional; - -public class V91Network extends Network { - - public V91Network(DevTools devTools) { - super(devTools); - } - - @Override - protected Command setUserAgentOverride(UserAgent userAgent) { - return org.openqa.selenium.devtools.v91.network.Network.setUserAgentOverride( - userAgent.userAgent(), userAgent.acceptLanguage(), userAgent.platform(), Optional.empty()); - } - - @Override - protected Command enableNetworkCaching() { - return org.openqa.selenium.devtools.v91.network.Network.setCacheDisabled(false); - } - - @Override - protected Command disableNetworkCaching() { - return org.openqa.selenium.devtools.v91.network.Network.setCacheDisabled(true); - } - - @Override - protected Command enableFetchForAllPatterns() { - return Fetch.enable( - Optional.of(ImmutableList.of(new RequestPattern(Optional.of("*"), Optional.empty(), Optional.empty()))), - Optional.of(true)); - } - - @Override - protected Command disableFetch() { - return Fetch.disable(); - } - - @Override - protected Event authRequiredEvent() { - return Fetch.authRequired(); - } - - @Override - protected String getUriFrom(AuthRequired authRequired) { - return authRequired.getAuthChallenge().getOrigin(); - } - - @Override - protected Command continueWithAuth(AuthRequired authRequired, UsernameAndPassword credentials) { - return Fetch.continueWithAuth( - authRequired.getRequestId(), - new AuthChallengeResponse( - AuthChallengeResponse.Response.PROVIDECREDENTIALS, - Optional.of(credentials.username()), - Optional.ofNullable(credentials.password()))); - } - - @Override - protected Command cancelAuth(AuthRequired authRequired) { - return Fetch.continueWithAuth( - authRequired.getRequestId(), - new AuthChallengeResponse(AuthChallengeResponse.Response.CANCELAUTH, Optional.empty(), Optional.empty())); - } - - @Override - protected Event requestPausedEvent() { - return Fetch.requestPaused(); - } - - @Override - protected Optional createHttpRequest(RequestPaused pausedRequest) { - if (pausedRequest.getResponseErrorReason().isPresent() || pausedRequest.getResponseStatusCode().isPresent()) { - return Optional.empty(); - } - - Request cdpRequest = pausedRequest.getRequest(); - - return Optional.of(createHttpRequest( - cdpRequest.getMethod(), - cdpRequest.getUrl(), - cdpRequest.getHeaders(), - cdpRequest.getPostData())); - } - - @Override - protected Command continueWithoutModification(RequestPaused pausedRequest) { - return Fetch.continueRequest( - pausedRequest.getRequestId(), - Optional.empty(), - Optional.empty(), - Optional.empty(), - Optional.empty()); - } - - @Override - protected Command createResponse(RequestPaused pausedRequest, HttpResponse response) { - List headers = new ArrayList<>(); - response.getHeaderNames().forEach( - name -> response.getHeaders(name).forEach(value -> headers.add(new HeaderEntry(name, value)))); - - byte[] bytes = Contents.bytes(response.getContent()); - String body = bytes.length > 0 ? Base64.getEncoder().encodeToString(bytes) : null; - - return Fetch.fulfillRequest( - pausedRequest.getRequestId(), - response.getStatus(), - Optional.of(headers), - Optional.empty(), - Optional.ofNullable(body), - Optional.empty()); - } -} diff --git a/java/src/org/openqa/selenium/devtools/v91/V91Target.java b/java/src/org/openqa/selenium/devtools/v91/V91Target.java deleted file mode 100644 index fa36cd4417f95..0000000000000 --- a/java/src/org/openqa/selenium/devtools/v91/V91Target.java +++ /dev/null @@ -1,89 +0,0 @@ -// Licensed to the Software Freedom Conservancy (SFC) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The SFC licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -package org.openqa.selenium.devtools.v91; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import org.openqa.selenium.devtools.Command; -import org.openqa.selenium.devtools.ConverterFunctions; -import org.openqa.selenium.devtools.idealized.browser.model.BrowserContextID; -import org.openqa.selenium.devtools.idealized.target.model.SessionID; -import org.openqa.selenium.devtools.idealized.target.model.TargetID; -import org.openqa.selenium.devtools.v91.target.Target; -import org.openqa.selenium.devtools.v91.target.model.TargetInfo; -import org.openqa.selenium.json.JsonInput; -import org.openqa.selenium.json.TypeToken; - -import java.util.List; -import java.util.Optional; -import java.util.function.Function; - -public class V91Target implements org.openqa.selenium.devtools.idealized.target.Target { - @Override - public Command detachFromTarget(Optional sessionId, Optional targetId) { - return Target.detachFromTarget( - sessionId.map(id -> new org.openqa.selenium.devtools.v91.target.model.SessionID(id.toString())), - targetId.map(id -> new org.openqa.selenium.devtools.v91.target.model.TargetID(id.toString()))); - } - - @Override - public Command> getTargets() { - Function> mapper = ConverterFunctions.map( - "targetInfos", - new TypeToken>() {}.getType()); - - return new Command<>( - Target.getTargets().getMethod(), - ImmutableMap.of(), - input -> { - List infos = mapper.apply(input); - return infos.stream() - .map(info -> new org.openqa.selenium.devtools.idealized.target.model.TargetInfo( - new TargetID(info.getTargetId().toString()), - info.getType(), - info.getTitle(), - info.getUrl(), - info.getAttached(), - info.getOpenerId().map(id -> new TargetID(id.toString())), - info.getBrowserContextId().map(id -> new BrowserContextID(id.toString())) - )) - .collect(ImmutableList.toImmutableList()); - }); - } - - @Override - public Command attachToTarget(TargetID targetId) { - Function mapper = - ConverterFunctions.map("sessionId", org.openqa.selenium.devtools.v91.target.model.SessionID.class); - - return new Command<>( - "Target.attachToTarget", - ImmutableMap.of( - "targetId", new org.openqa.selenium.devtools.v91.target.model.TargetID(targetId.toString()), - "flatten", true), - input -> { - org.openqa.selenium.devtools.v91.target.model.SessionID id = mapper.apply(input); - return new SessionID(id.toString()); - }); - } - - @Override - public Command setAutoAttach() { - return Target.setAutoAttach(true, false, Optional.of(true)); - } -} diff --git a/java/src/org/openqa/selenium/devtools/versions.bzl b/java/src/org/openqa/selenium/devtools/versions.bzl index 901265bd7b797..a367fb1ce5e46 100644 --- a/java/src/org/openqa/selenium/devtools/versions.bzl +++ b/java/src/org/openqa/selenium/devtools/versions.bzl @@ -1,6 +1,5 @@ CDP_VERSIONS = [ "v85", # Required by Firefox - "v91", "v92", "v93", ]