Edge driver not working.The HTTP request to the remote WebDriver server for URL http.... timed out

387 views
Skip to first unread message

Always a student

unread,
May 22, 2019, 12:06:33 PM5/22/19
to Selenium Users
Hi All,

Edge driver has been working fine until a few days ago. Now it throws this error

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

This is what I had before

var edDriverService = EdgeDriverService.CreateDefaultService("C:\\Windows\\SysWOW64\\", "MicrosoftWebDriver.exe", 52296);

I had gotten this info somehwhere on Microsoft forums saying we need to specify the path and port for it to work. It has been working fine until now. It still works on my local machine but when I try to execute on Azure DevOps using on premise agents, the website loads, and I can see the login page and then it doesnt enter anything in it to login and after sometime, i get this error above.

I went to the path and made sure the driver is there and also as you might be aware, Microsoft now supplies driver as a part of OS feature. I had followed the instructions to install it visa DISM.I did that step again just in case if it makes any difference. It did not. I clicked on the .exe and it said " Listening on http://[::1]:17556/"


I changed port to 17556 to see if it makes any difference.No.Same error, with new port number.
I remove the arguments and used just var edDriverService = EdgeDriverService.CreateDefaultService(); . Still no difference. Still throws same error. 

All of the above methods work fine on my local, which is also on Windows 10, same OS versions 1809.

Does any one have any idea what is going on and how to fix this? 
Message has been deleted

Always a student

unread,
May 22, 2019, 6:41:28 PM5/22/19
to Selenium Users
I fixed this myself. posting here just in case someone faces this in future.

I updated the url navigate to use Javascript instead of WebDriver.Url

string script= "window.location = \'" + url + "\'";
                        ((IJavaScriptExecutor)IWebDriver).ExecuteScript(script);
Reply all
Reply to author
Forward
0 new messages