0

For CeF+Cefglue using chromedriver.exe i set a download directory (D:), however while downloading any file, It is not automatically downloading in Download directory rather shows "save as" dialog box with default Download Directory (Downloads). Other Features like setting User profile Folder, Navigating is working fine.

Project configuration:

  • CEF - 74.1.19+gb62bacf+chromium-74.0.3729.157
  • Cefglue - 74.1.0.0
  • Chromedriver - 74.0.3729.6
  • Selenium - 3.141.0.0 (Since this is the last version have .Net Framework compatibility i can't use latest version)

Chromeoptions which i have tried but didn't work:

 Dim service = ChromeDriverService.CreateDefaultService
 Dim chromeOptions As New OpenQA.Selenium.Chrome.ChromeOptions()
 chromeOptions.AddUserProfilePreference("safebrowsing.enabled", True)
 chromeOptions.AddUserProfilePreference("safebrowsing_for_trusted_sources_enabled", True)
 chromeOptions.AddUserProfilePreference("download.default_directory", "D:\") 
 chromeOptions.AddUserProfilePreference("download.prompt_for_download", False)
 chromeOptions.AddUserProfilePreference("download.directory_upgrade", True)
 chromeOptions.AddUserProfilePreference("disable-popup-blocking", True)
 Dim driver As OpenQA.Selenium.Chrome.ChromeDriver = New 
 OpenQA.Selenium.Chrome.ChromeDriver(service, chromeOptions, TimeSpan.FromSeconds(120))

I was able to set download path in Google Chrome (all versions) using chromedriver+selenium using above syntax but it is not working for My Cef How to set default download directory in Cefglue using chromedriver.exe?

IT researcher
  • 3,274
  • 17
  • 79
  • 143

0 Answers0