Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The HTTP request to the remote WebDriver server for URL - Chrome

Tags:

c#

selenium

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)

like image 877
Jothi Vignesh Avatar asked Feb 25 '26 13:02

Jothi Vignesh


1 Answers

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!

like image 83
Dungeon Avatar answered Feb 27 '26 01:02

Dungeon



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!