File tree 1 file changed +4
-1
lines changed
java/client/src/org/openqa/selenium/devtools
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,10 @@ public Class<HasDevTools> getDescribedInterface() {
41
41
42
42
@ Override
43
43
public HasDevTools getImplementation (Capabilities caps , ExecuteMethod executeMethod ) {
44
- CdpInfo info = new CdpVersionFinder ().match (caps .getBrowserVersion ()).orElseGet (NoOpCdpInfo ::new );
44
+ Object cdpVersion = caps .getCapability ("se:cdpVersion" );
45
+ String version = cdpVersion instanceof String ? (String ) cdpVersion : caps .getBrowserVersion ();
46
+
47
+ CdpInfo info = new CdpVersionFinder ().match (version ).orElseGet (NoOpCdpInfo ::new );
45
48
Optional <DevTools > devTools = SeleniumCdpConnection .create (caps ).map (conn -> new DevTools (info ::getDomains , conn ));
46
49
47
50
return () -> devTools .orElseThrow (() -> new IllegalStateException ("Unable to create connection to " + caps ));
You can’t perform that action at this time.
0 commit comments