3232import java .util .function .Supplier ;
3333import java .util .logging .Level ;
3434import java .util .logging .Logger ;
35+ import org .jspecify .annotations .NullMarked ;
36+ import org .jspecify .annotations .Nullable ;
3537import org .openqa .selenium .BuildInfo ;
3638import org .openqa .selenium .Capabilities ;
3739import org .openqa .selenium .Credentials ;
6769 * A {@link WebDriver} implementation that controls a Chromium browser running on the local machine.
6870 * It is used as the base class for Chromium-based browser drivers (Chrome, Edge).
6971 */
72+ @ NullMarked
7073public class ChromiumDriver extends RemoteWebDriver
7174 implements HasAuthentication ,
7275 HasBiDi ,
@@ -90,8 +93,15 @@ public class ChromiumDriver extends RemoteWebDriver
9093 private final Optional <DevTools > devTools ;
9194 private final Optional <URI > biDiUri ;
9295 private final Optional <BiDi > biDi ;
93- protected HasCasting casting ;
94- protected HasCdp cdp ;
96+
97+ /**
98+ * May be null when the driver does not support casting; initialized during setup if available.
99+ */
100+ protected @ Nullable HasCasting casting ;
101+
102+ /** May be null when CDP is unavailable for the current browser/session. */
103+ protected @ Nullable HasCdp cdp ;
104+
95105 private final Map <Integer , ScriptKey > scriptKeys = new HashMap <>();
96106
97107 protected ChromiumDriver (
0 commit comments