[š Bug]: FirefoxDriverService.cs one line change breaks geckodriver ConnectToRunningBrowser
See original GitHub issueWhat happened?
[dotnet] Add --websocket-port command line argument for geckodriver argsBuilder.Append(string.Format(CultureInfo.InvariantCulture, " --websocket-port {0}", PortUtilities.FindFreePort()));
This breaks the firefoxdriver ability to connect to an already open browser when using --connect-existing.
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ā¦
How can we reproduce the issue?
FirefoxDriverService firefoxDriverService = FirefoxDriverService.CreateDefaultService(browserSettings.DriverLocation);
firefoxDriverService.HideCommandPromptWindow = false;
firefoxDriverService.Port = 0;
firefoxDriverService.BrowserCommunicationPort = 2828;
firefoxDriverService.Host = "127.0.0.1";
firefoxDriverService.ConnectToRunningBrowser = true;
var tmpDriver = new FirefoxDriver(firefoxDriverService, ffOptions);
Relevant log output
geckodriver: The argument '--connect-existing' cannot be used with '--websocket-port
Operating System
win 10
Selenium version
latest
What are the browser(s) and version(s) where you see this issue?
firefox
What are the browser driver(s) and version(s) where you see this issue?
most recent geckodriver
Are you using Selenium Grid?
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Selenium using Python - Geckodriver executable needs to be ...
The following command not only installs it, but it also puts it in the executable PATH . sudo apt install firefox-geckodriver. The problem...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jimevans I didnāt state any malice. Intentional is exactly what the change was, however the implementation was flawed.
iāve developed code since 1986, itās why I know about this bug. every single bug iāve ever written and will write is all intentional, never any malice implied, but honestly speaking, every bug is intended for some purpose that it misses to fulfill. the code is intentionally written, albeit without me realizing it was buggy.
Okay, yes, I see that itās a bug. Contrary to @deadmikeās assertion, this break was not intentional; it was done inadvertently with a misunderstanding of how the bidi port should be applied. Without it, none of the new Selenium 4 bidi-based features (network interception, JavaScript console monitoring, etc.) will work for Firefox. Iām sure youāre willing to live with the trade off, so Iāll reopen the issue. I get the frustration, but the assertion of malice and intent, and the accompanying tone, is entirely unwarranted.