'Selenium getting stuck on data:, (MS Edge)

I want to use Selenium to navigate to a website. Selenium opens up the browser but does not navigate further to the specified website URL, but gets stuck on the "data:," url. After some time time I get the following exception:

"The HTTP request to the remote WebDriver server for URL http://localhost:58504/session timed out after 60 seconds"

Note: I did not specify the 58504 port anymore, so I guess it is the default port that Selenium use?

I am programming in C# and using the following Nuget Packages:

Here is the code:

    using OpenQA.Selenium;
    using OpenQA.Selenium.Edge;
    using WebDriverManager;
    using WebDriverManager.DriverConfigs.Impl;
    using WebDriverManager.Helpers;
    
    public void VisitWebsite() 
    {
        IWebDriver driver = null;

        try  
        {
            new DriverManager().SetUpDriver(new EdgeConfig(), VersionResolveStrategy.MatchingBrowser);
    
            EdgeOptions options = new EdgeOptions();
            options.AddArgument("--no-sandbox);
            options.AddArgument("--disable-infobars");
            options.AddArgument("--disable-dev-shm-usage");
            options.AddArgument("--disable-browser-side-navigation");
            options.AddArgument("--disable-extensions");
            options.AddArgument("--dns-prefetch-disable");
            options.AddArgument("--disable-gpu");
            options.AddArgument("--disable-software-rastersizer");
    
            driver = new EdgeDriver(options);
        }
        catch (Exception ex) 
        {   
            throw ex;
        }
    
        driver.Navigate().GoToUrl("https://www.google.com");
    }

Where does it go wrong? Thanks!



Sources

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

Source: Stack Overflow

Solution Source