diff --git a/java/client/src/org/openqa/selenium/chromium/ChromiumDriver.java b/java/client/src/org/openqa/selenium/chromium/ChromiumDriver.java index 807aec908b619..c220ca277c933 100644 --- a/java/client/src/org/openqa/selenium/chromium/ChromiumDriver.java +++ b/java/client/src/org/openqa/selenium/chromium/ChromiumDriver.java @@ -24,6 +24,7 @@ import org.openqa.selenium.WebDriverException; import org.openqa.selenium.devtools.Connection; import org.openqa.selenium.devtools.DevTools; +import org.openqa.selenium.devtools.HasDevTools; import org.openqa.selenium.html5.LocalStorage; import org.openqa.selenium.html5.Location; import org.openqa.selenium.html5.LocationContext; @@ -61,7 +62,7 @@ * to the appropriate interface. */ public class ChromiumDriver extends RemoteWebDriver - implements LocationContext, WebStorage, HasTouchScreen, NetworkConnection { + implements HasDevTools, HasTouchScreen, LocationContext, NetworkConnection, WebStorage { private final RemoteLocationContext locationContext; private final RemoteWebStorage webStorage; @@ -152,6 +153,7 @@ public Map executeCdpCommand(String commandName, Map new WebDriverException("Unable to create DevTools connection")); diff --git a/java/client/src/org/openqa/selenium/devtools/BUILD.bazel b/java/client/src/org/openqa/selenium/devtools/BUILD.bazel index d1e726e1d6529..997cd5068fa24 100644 --- a/java/client/src/org/openqa/selenium/devtools/BUILD.bazel +++ b/java/client/src/org/openqa/selenium/devtools/BUILD.bazel @@ -6,6 +6,7 @@ java_library( "//java/client/src/org/openqa/selenium/chromium:__pkg__", "//java/client/src/org/openqa/selenium/edge:__pkg__", "//java/client/src/org/openqa/selenium/remote:__pkg__", + "//java/client/test/org/openqa/selenium/devtools:__pkg__", ], deps = [ "//java/client/src/org/openqa/selenium:core", diff --git a/java/client/src/org/openqa/selenium/devtools/HasDevTools.java b/java/client/src/org/openqa/selenium/devtools/HasDevTools.java new file mode 100644 index 0000000000000..b049d7dcca202 --- /dev/null +++ b/java/client/src/org/openqa/selenium/devtools/HasDevTools.java @@ -0,0 +1,24 @@ +// 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; + +public interface HasDevTools { + + DevTools getDevTools(); + +}