3

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)

Jothi Vignesh
  • 45
  • 1
  • 6

1 Answers1

2

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!

Dungeon
  • 972
  • 2
  • 16
  • 32
  • Hi @Dungeon, thanks for reply. I tried with no-sandbox option, but it didn't help. I updated the browser and driver to the latest. I am not sure how to add time out, could you please help me in the same using C# – Jothi Vignesh Jun 06 '18 at 15:12
  • 2
    `Driver = new ChromeDriver("driver_path", options, TimeSpan.FromMinutes(3)); //May be you dont have to set the TimesSpan if you dont want to wait for 3 minutes.` – Dungeon Jun 07 '18 at 04:47