@@ -155,7 +155,6 @@ export class FirefoxCore {
155155
156156 if ( this . options . connectExisting ) {
157157 const port = this . options . marionettePort ?? 2828 ;
158- const host = this . options . marionetteHost ?? '127.0.0.1' ;
159158
160159 // Find geckodriver binary (--driver avoids downloading Firefox via selenium-manager)
161160 const geckodriverPath = await findGeckodriver ( ) ;
@@ -180,20 +179,6 @@ export class FirefoxCore {
180179 // which would otherwise invoke selenium-manager with --browser firefox.
181180 const seleniumDriver = firefox . Driver . createSession ( caps , serviceBuilder . build ( ) ) ;
182181 this . driver = seleniumDriver as unknown as IDriver ;
183-
184- // For remote Firefox, rewrite webSocketUrl hostname in the session capabilities.
185- // Selenium only rewrites localhost→127.0.0.1; arbitrary hosts need explicit patching.
186- // Session.getCapabilities() returns the same Capabilities object every time, so
187- // calling caps.set() here is seen by the lazy getBidi() call that comes later.
188- if ( host !== '127.0.0.1' ) {
189- const caps = await seleniumDriver . getCapabilities ( ) ;
190- const wsUrl = caps . get ( 'webSocketUrl' ) as string | undefined ;
191- if ( wsUrl ) {
192- const parsed = new URL ( wsUrl ) ;
193- parsed . hostname = host ;
194- caps . set ( 'webSocketUrl' , parsed . toString ( ) ) ;
195- }
196- }
197182 } else {
198183 // Set up output file for capturing Firefox stdout/stderr
199184 if ( this . options . logFile ) {
0 commit comments