Когда я делаю загрузку через webdriver, я получаю «Fail - Download error», но вручную (в браузере без webdriver) я получаю загрузку нормально.
Какие проблемы могутбыть?
Действие, которое вызывает загрузку - это просто щелчок по кнопке, ничего особенного.
Ниже, мой экземпляр ChromeDriver();
var chromeOptions = new ChromeOptions();
if (SilentMode)
{
chromeOptions.AddArguments("headless", "disable-gpu", "silent-launch", "no-startup-window", "incognito");
}
chromeOptions.AddArguments("disable-web-security", "disable-popup-blocking", "AcceptInsecureCertificates", "auth-server-whitelist=*", "no-sandbox", "disable-notifications", "disable-single-click-autofill");
chromeOptions.AddUserProfilePreference("download.default_directory", CaminhoDownload);
chromeOptions.AddUserProfilePreference("download.prompt_for_download", false);
Driver = new ChromeDriver(chromeOptions);
NomeProcessoDriver = "chromedriver";