File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
javascript/node/selenium-webdriver Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ const zip = require('./io/zip')
121121const { Browser, Capabilities, Capability } = require ( './lib/capabilities' )
122122const { Zip } = require ( './io/zip' )
123123const { getBinaryPaths } = require ( './common/driverFinder' )
124+ const portprober = require ( "./net/portprober" ) ;
124125const FIREFOX_CAPABILITY_KEY = 'moz:firefoxOptions'
125126
126127/**
@@ -492,6 +493,10 @@ class ServiceBuilder extends remote.DriverService.Builder {
492493 */
493494 constructor ( opt_exe ) {
494495 super ( opt_exe )
496+ if ( ! self . args . includes ( '--connect-existing' ) ) {
497+ self . args . append ( '--websocket-port' )
498+ self . args . append ( `${ portprober . findFreePort ( ) } ` )
499+ }
495500 this . setLoopback ( true ) // Required.
496501 }
497502
You can’t perform that action at this time.
0 commit comments