C# Selenium

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/");
View Code

錯誤「Unable to open chrome browser using Selenium Webdriver. Loading unpacked extensions are disabled by administrator」 解決方案:chrome

1.ide

option.AddArgument("disable-extensions");
option.AddArgument("--start-maximized");spa

2 Open Registry Editorcode

   Search for below keys HKEY_CURRENT_USER\Software\Policies\Google\Chrome\ExtensionInstallBlacklist HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\ExtensionInstallBlacklistblog

    If you find any keys set under above location, just delete itci

版本對應:selenium

chromedriver版本 -> 支持的Chrome版本 

                 v2.35         v62-64it

相關文章
相關標籤/搜索