'Error in selenium c# witch WebDriverException

OpenQA.Selenium.WebDriverException: "The HTTP request to the remote WebDriver server for URL http://localhost:61601/session/bf47076dd5340edf30b904f946dae6f2/url timed out after 60 seconds."

ChromeOptions options = new ChromeOptions();
options.AddArgument("no-sandbox");
options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0");
//       options.AddArgument("ignore-certificate-errors");
options.AddArguments("--disable-blink-features");
options.AddArgument("--disable-blink-features=AutomationControlled");
options.AddExcludedArgument("enable-automation");
options.AddArguments("--disable-infobars");
options.AddHttpProxy(ProxyIp[i], ProxyPort[i], ProxyPassword[i], ProxyLogin[i]);
//               options.AddArguments("headless"); // 
Console.Write(i.ToString());

Browser = new OpenQA.Selenium.Chrome.ChromeDriver(options);
Browser.Manage().Window.Maximize();
Browser.Navigate().GoToUrl("https://rutube.ru");
Browser.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
//  CheckAcceptOption( Browser);
Actions actionProvider = new Actions(Browser);
IWebElement FindOption = Browser.FindElement(By.CssSelector(".char-base-button-module__button.char-base-button-module__contained-accent.char-base-button-module__pointerCursor.char-base-button-module__regular"));
if (FindOption != null)
{
    actionProvider.Click(FindOption).Perform();
}
else return;


Solution 1:[1]

I have encountered that issue many times while running selenium test cases. This is how i solve this problem.

  • Go to temp folder and empty it. Then run your test again.

To go to temp folder - press Win + R, type %temp% & hit enter.

OR

  • Switch to another internet connection.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 harrysrangal