備忘録 EdgeDriver(C#)でPDFやファイルのダイアログを出さずにダウンロード
var options = new EdgeOptions(); options.AddUserProfilePreference("download.default_directory", "c:\\Test2"); options.AddUserProfilePreference("download.prompt_for_download", false); options.AddUserProfilePreference("plugins.always_open_pdf_externally", true); driver = new EdgeDriver(options); try { driver.Url = "https://hoge.hoge/"; var element = driver.FindElement(By.Id("hogehoge1")); element.Click();