Allow multiple downloads in ChromeDriver

I need to download multiple files in Chrome using ChromeDriver (C #), the first file downloaded successfully but other users failed to download, a window appeared asking "Upload multiple files - Allow | Block"

I need to configure the download automatically. Chrome settings have the following options: "Settings β†’ Content Settings β†’ Automatic Downloads β†’ Allow all sites to download multiple files automatically"

I need to configure in "ChromeOptions" like in the example

var options = new ChromeOptions();
options.AddUserProfilePreference("...", true);

      

Below is the image with Chrome post

Chrome message box

+3


source to share


1 answer


I found a solution. Just add a preference:



var options = new ChromeOptions();
options.AddUserProfilePreference("profile.default_content_setting_values.automatic_downloads", 1);

      

+4


source







All Articles