File tree Expand file tree Collapse file tree
java/src/org/openqa/selenium/grid/node/local Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -791,8 +791,11 @@ private Session createExternalSession(
791791 toUse = new PersistentCapabilities (cdpFiltered ).setCapability ("se:cdpEnabled" , false );
792792 }
793793
794+ // Check if the user wants to use BiDi
795+ boolean webSocketUrl = toUse .asMap ().containsKey ("webSocketUrl" );
794796 // 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 ) {
796799 String bidiPath = String .format ("/session/%s/se/bidi" , other .getId ());
797800 toUse = new PersistentCapabilities (toUse ).setCapability ("se:bidi" , rewrite (bidiPath ));
798801 } else {
You can’t perform that action at this time.
0 commit comments