Home > Mobile >  How do I set Chrome upload directory with Selenium & VBA
How do I set Chrome upload directory with Selenium & VBA

Time:06-18

How do i set default upload path with selinium and chrome. eg going to a webpage, and upload. this opens a fileexploere, but it always opens c:\users[me] I want to be able to set anoter default path.

i have seen this to set download path driver.SetPreference "download.default_directory", "c:\temp" and i tried to alter it driver.SetPreference "upload.default_directory", "c:\temp" but it dosnt work.

Chrome Version 102.0.5005.115 - win10

CodePudding user response:

Found it

from this helpfull link Where can I find a list of all available ChromeOption arguments?

theres a link to "List of preferences:"

in here i found selectfile.last_directory So i set driver.SetPreference "selectfile.last_directory", "c:\temp" or what you want

CodePudding user response:

This code isn't working for me, as I need multiple paths for multiple download. Do you know how can I do it?

Thank you for your help anyway

  • Related