EdgeWebDriver icon indicating copy to clipboard operation
EdgeWebDriver copied to clipboard

The HTTP request to the remote WebDriver server for URL http://localhost:52526/session timed out after 10 seconds.

Open SahilMahajan90 opened this issue 1 year ago • 2 comments

Hi Team, We are trying to attach Edge browser with OpenAI.Selenium.Edge but we are getting below error: Error: The HTTP request to the remote WebDriver server for URL http://localhost:52526/session timed out after 10 seconds.

We are using below code snippet to attach Edge browser and it is throwing exception on line - return new EdgeDriver(service, options, commandTimeout);

public IWebDriver AttachDebugger(SeleniumBrowser browser, string debuggerAddress, TimeSpan commandTimeout) { EdgeOptions options = new EdgeOptions { DebuggerAddress = debuggerAddress }; var service = EdgeDriverService.CreateDefaultService(); return new EdgeDriver(service, options, commandTimeout); }

Please help us to resolve this at the earliest.

SahilMahajan90 avatar Dec 04 '23 09:12 SahilMahajan90

Also, we observed that, even basic console selenium application is also not working on my machine. Strangely, when move the dll with above code changed to fresh machine, it starts working with edge browser. So, I have couple of questions here:

  1. Do we need to have some specific machine configuration to run selenium based web application with Edge browser?
  2. Do we need to do any changes in Edge browser settings before running any tests or application?

SahilMahajan90 avatar Dec 05 '23 06:12 SahilMahajan90

Hi @SahilMahajan90. Can you please share the following:

  • How Edge is being launched. E.g. what command line parameters are you using?
  • Value of DebuggerAddress.

Edge should be launched with --remote-debugging-port=####, for example, --remote-debugging-port=9222. When setting DebuggerAddress in Selenium, it should have a value like "localhost:9222".

Also, on the affected machine, make sure msedgedriver.exe is available on the PATH, and that your basic selenium console app and the Selenium DLL (WebDriver.dll) are in the same directory.

bwalderman avatar Dec 15 '23 23:12 bwalderman