An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll

怎甘沉沦 提交于 2019-12-23 17:58:38

问题


I'm following a selenium C# tutorial and I'm in the first stage. So when I run my console application I got the following error.

An unhandled exception of type 'System.InvalidOperationException' occurred in WebDriver.dll

Additional information: unknown error: unrecognized Blink revision: 3b3c00f2d95c45cca18ab944acced413fb759311

And in the console it says

Only local connections are allowed

My code

 class Program
    {
        static void Main(string[] args)
        {
            IWebDriver driver = new ChromeDriver();

            driver.Navigate().GoToUrl("http://www.google.lk");
        }
    }

回答1:


try downloading the driver and give its path to constructor - LINK

driver = new ChromeDriver(DRIVER_PATH);


来源:https://stackoverflow.com/questions/33074831/an-unhandled-exception-of-type-system-invalidoperationexception-occurred-in-we

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!