Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/chromium/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
load("//java:defs.bzl", "java_export")
load("//java:version.bzl", "SE_VERSION")
load("//java:defs.bzl", "artifact", "java_export", "java_library")

java_export(
name = "chromium",
Expand All @@ -19,5 +20,6 @@ java_export(
"//java:auto-service",
"//java/src/org/openqa/selenium/json",
"//java/src/org/openqa/selenium/remote",
artifact("org.jspecify:jspecify:1.0.0"),
],
)
11 changes: 9 additions & 2 deletions java/src/org/openqa/selenium/chromium/ChromiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
import static org.openqa.selenium.remote.Browser.CHROME;
import static org.openqa.selenium.remote.Browser.EDGE;
import static org.openqa.selenium.remote.Browser.OPERA;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;


import java.net.URI;
import java.net.URISyntaxException;
Expand Down Expand Up @@ -67,6 +70,7 @@
* A {@link WebDriver} implementation that controls a Chromium browser running on the local machine.
* It is used as the base class for Chromium-based browser drivers (Chrome, Edge).
*/
@NullMarked
public class ChromiumDriver extends RemoteWebDriver
implements HasAuthentication,
HasBiDi,
Expand All @@ -90,8 +94,11 @@ public class ChromiumDriver extends RemoteWebDriver
private final Optional<DevTools> devTools;
private final Optional<URI> biDiUri;
private final Optional<BiDi> biDi;
protected HasCasting casting;
protected HasCdp cdp;
/** May be null when the driver does not support casting; initialized during setup if available. */
protected @Nullable HasCasting casting;
/** May be null when CDP is unavailable for the current browser/session. */
protected @Nullable HasCdp cdp;

private final Map<Integer, ScriptKey> scriptKeys = new HashMap<>();

protected ChromiumDriver(
Expand Down