File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
java/src/org/openqa/selenium/grid/node/local Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -791,8 +791,11 @@ private Session createExternalSession(
791
791
toUse = new PersistentCapabilities (cdpFiltered ).setCapability ("se:cdpEnabled" , false );
792
792
}
793
793
794
+ // Check if the user wants to use BiDi
795
+ boolean webSocketUrl = toUse .asMap ().containsKey ("webSocketUrl" );
794
796
// Add se:bidi if necessary to send the bidi url back
795
- if ((isSupportingBiDi || toUse .getCapability ("se:bidi" ) != null ) && bidiEnabled ) {
797
+ boolean bidiSupported = isSupportingBiDi || toUse .getCapability ("se:bidi" ) != null ;
798
+ if (bidiSupported && bidiEnabled && webSocketUrl ) {
796
799
String bidiPath = String .format ("/session/%s/se/bidi" , other .getId ());
797
800
toUse = new PersistentCapabilities (toUse ).setCapability ("se:bidi" , rewrite (bidiPath ));
798
801
} else {
You can’t perform that action at this time.
0 commit comments