MicrosoftEdge / EdgeWebDriver

Feedback and discussions about WebDriver for Microsoft Edge
MIT License
55 stars 7 forks source link

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

Open SahilMahajan90 opened 9 months ago

SahilMahajan90 commented 9 months ago

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 commented 9 months ago

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?
bwalderman commented 9 months ago

Hi @SahilMahajan90. Can you please share the following:

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.