0

Please advise how to download a file to a specific path project from UI in Chrome using Python or Selenium? There is an "Export" button in UI and system does not propose to select a place for downloading. It can be selected only by pressing the right mouse button. It is important to do it through the UI.

Sveta Iva
  • 1
  • 2

1 Answers1

0

unfortunately this is not an east thing to do. so brace yourself.

i can think of two options:

  1. set chrome-driver in advanced to automatically download files to a specified location
  2. create an automation on windows to do what you need.

for option #1:

see explantion on how to set options and preferences to chrome-driver on launch
see this question to find the specific flags you need. in the preferences link i found this:

const char kPromptForDownload[] = "download.prompt_for_download";
const char kDownloadDefaultDirectory[] = "download.default_directory";

for option #2:

for this i once used win32-api to automate the chrome open window
alternatively, you can check Winium out

itay zohar
  • 148
  • 10