下面是我用来初始化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);
但是仍然没有运气。请让我知道是否有任何解决方案。