ChromeDriver ignores download.prompt_for_download preference in Incognito mode
GCuser99 opened this issue · comments
Mike commented
Started happening in ChromeDriver 117.
Will continue to monitor here:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=4582
... and here:
https://stackoverflow.com/questions/77093248/chromedriver-version-117-forces-save-as-dialog-how-to-bypass-selenium-jav
The easiest work-around thus far is to turn off incognito mode...
A more involved work-around from 2nd link above:
Dim localStatePrefs As New Dictionary
localStatePrefs.Add "browser.enabled_labs_experiments", Array("download-bubble@2", "download-bubble-v2@2")
caps.SetOption "localState", localStatePrefs
driver.OpenBrowser caps
And another from same link:
caps.AddArguments "disable-features=DownloadBubble,DownloadBubbleV2"
driver.OpenBrowser caps