[cdp] Use `se:cdpVersion` if present
@Override
public HasDevTools getImplementation(Capabilities caps, ExecuteMethod executeMethod) {
- CdpInfo info = new CdpVersionFinder().match(caps.getBrowserVersion()).orElseGet(NoOpCdpInfo::new);
+ Object cdpVersion = caps.getCapability("se:cdpVersion");
+ String version = cdpVersion instanceof String ? (String) cdpVersion : caps.getBrowserVersion();
+
+ CdpInfo info = new CdpVersionFinder().match(version).orElseGet(NoOpCdpInfo::new);
Optional<DevTools> devTools = SeleniumCdpConnection.create(caps).map(conn -> new DevTools(info::getDomains, conn));
return () -> devTools.orElseThrow(() -> new IllegalStateException("Unable to create connection to " + caps));
