Selenium Chrome驱动程序引发错误-“此类型的文件可能会损害您的计算机”

时间:2018-09-07 08:37:09

标签: c# selenium google-chrome selenium-chromedriver

下面是我用来初始化chrome驱动程序的代码,但仍然有消息提示:

Feature level to 0

我也尝试过:

ChromeOptions chrome = new ChromeOptions();
_chromeDriverService = ChromeDriverService.CreateDefaultService(_config.ReadConfig(VanityRedirect_Constants.ChromeFilePath));
_chromeDriverService.HideCommandPromptWindow = true;
chrome.AddArguments("--test-type");
chrome.AddArgument("--start-maximized");
chrome.AddArguments("--disable-extensions");
chrome.AddUserProfilePreference("download.prompt_for_download", true);
chrome.AddUserProfilePreference("download.directory_upgrade", true);
chrome.AddUserProfilePreference("download.default_directory", _config.ReadConfig(VanityRedirect_Constants.DefaultPathVanity));
chrome.AddUserProfilePreference("safebrowsing.enabled", "false");
_driver = new ChromeDriver(_chromeDriverService, chrome, VanityRedirect_Constants.ChromeLoadTimeVanity);

但是仍然没有运气。请让我知道是否有任何解决方案。

0 个答案:

没有答案