File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/main/java/com/lambdatest/selenium/agent Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,7 @@ public static void enhanceCapabilities(MutableCapabilities capabilities) {
210210 }
211211 }
212212
213- // Ensure lt:options is updated in capabilities
214- capabilities .setCapability ("lt:options" , ltOptions );
215-
213+ // Handle tunnel BEFORE setting lt:options to ensure tunnel name is included
216214 // Check if tunnel is enabled in capabilities
217215 if (ltOptions .containsKey ("tunnel" )) {
218216 Object tunnelValue = ltOptions .get ("tunnel" );
@@ -287,6 +285,10 @@ public static void enhanceCapabilities(MutableCapabilities capabilities) {
287285 }
288286 }
289287
288+ // Ensure lt:options is updated in capabilities AFTER tunnel handling
289+ // This ensures tunnel name is included in the final capabilities
290+ capabilities .setCapability ("lt:options" , ltOptions );
291+
290292 } catch (Exception e ) {
291293 System .err .println ("[LambdaTest SDK RemoteWebDriverAdvice] Error enhancing capabilities: " + e .getMessage ());
292294 e .printStackTrace ();
You can’t perform that action at this time.
0 commit comments