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

前端 未结 1 1668
甜味超标
甜味超标 2021-01-15 04: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#

相关标签:
1条回答
  • 2021-01-15 04:57

    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!

    0 讨论(0)
提交回复
热议问题