Skip to content

Commit

Permalink
[dotnet] Add --websocket-port command line argument for geckodriver
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Sep 29, 2021
1 parent b8caa25 commit 0f95b27
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dotnet/src/webdriver/Firefox/FirefoxDriverService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ protected override string CommandLineArguments
argsBuilder.Append(" --jsdebugger");
}

argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --websocket-port {0}", PortUtilities.FindFreePort()));

return argsBuilder.ToString().Trim();
}
}
Expand Down

1 comment on commit 0f95b27

@deadmike
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks the firefoxdriver ability to connect to an already open browser when using --connect-existing.
I spent the whole day tracking this down... :(
geckodriver: The argument '--connect-existing' cannot be used with '--websocket-port

The websocket-port should not be blindly added when all the other parms are conditional...

Please sign in to comment.