I am trying to download files by clicking a button. This works fine as long as my ChromeDriver is not in headless mode. Once I tested the macro with ChromeDriver in headless mode, I realized that nothing was being downloaded. I researched the issue and found out that it was a security measure. There are suggested work-arounds for Python, however I was not able to translate the code into VBA. I am using SeleniumBasic.
What I want is to be able to download files to the Environ("userprofile") & "\Downloads\"
folder once I click a download button, just like I do when the browser is not in headless mode. Thank you all in advance.
Notes:
- I call the driver in headless mode using
driver.AddArgument "--headless"
- I could not provide the URL I am using as this is a long macro requiring login etc. but as far as I understand, the issue should be reproducible in any download scenario involving a headless ChromeDriver.
- I am using the most recent SeleniumBasic v2.0.9.0 and the ChromeDriver version 75.0.3770.140