Y
Y
yraiv2022-04-20 20:12:35
Google Chrome
yraiv, 2022-04-20 20:12:35

How to remove error in selenium WebDriverException?

When running the program, an OpenQA.Selenium.WebDriverException error appears: "The HTTP request to the remote WebDriver server for URL localhost:61601/session/bf47076dd5340edf30b904f946... 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;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question