Reputation: 45
I am facing getting The HTTP request to the remote WebDriver server for URL error while executing the selenium script in Chrome.
I am using Selenium with C# and Latest version of Chrome Driver, Chrome(66.0.3359.181) and Selenium(3.12.1)
Upvotes: 3
Views: 8196
Reputation: 1040
Give this a try:- add the "no-sandbox
" flag to the Chrome options:
var options = new ChromeOptions();
options.AddArgument("no-sandbox");
There are two causes to this exception I've seen:
1.Browser/web driver version mismatch - solved by updating webdriver nuget package to latest usually.
2.Server-side takes too long to load page - solved by either getting a faster server or as per https://code.google.com/p/selenium/issues/detail?id=5071 it looks like you can add a timeout argument when newing up a RemoteWebDriver, in Seleno that happens in Browser, but you don't have to use Browser you can new up the driver yourself to try out the fix. Feel free to submit a PR to Seleno to allow that timespan to be passed in as an option to the various drivers (probably in the override that has capabilities passed in).
Hope it helps!
Upvotes: 2