1 ChromeOptions option = new ChromeOptions(); 2 option.AddArgument("disable-extensions"); 3 option.AddArgument("--start-maximized"); 4 IWebDriver selenium = new ChromeDriver(option); 5 //IWebDriver selenium = new ChromeDriver(); 6 selenium.Navigate().GoToUrl("http://www.baidu.com/");
错误“Unable to open chrome browser using Selenium Webdriver. Loading unpacked extensions are disabled by administrator” 解决方案:
1.
option.AddArgument("disable-extensions");
option.AddArgument("--start-maximized");
2 Open Registry Editor
Search for below keys HKEY_CURRENT_USER\Software\Policies\Google\Chrome\ExtensionInstallBlacklist HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallBlacklist
If you find any keys set under above location, just delete it
版本对应:
chromedriver版本 -> 支持的Chrome版本
v2.35 v62-64