0

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

1 Answers1

0

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