0

I googled this question and found a lot of answers, still non of the solutions worked for me.

So my question is: how to Enable "Save as" dialog for Selenium Chromedriver? I want to see this dialog when I download a file.

Good to see how to do it in Python but any other languages are good too.

I've tried to add the next line "{download.prompt_for_download': 'true'}" to arguments and to experimental options:

chrome_options.add_experimental_option("prefs"{'download.prompt_for_download': 'true'})

chrome_options.add_argument({'download.prompt_for_download': 'true'})

The first one didn't give any result, the second one caused code error.

I also tried "saveas-menu-label" and got no result.

Denis Koreyba
  • 3,144
  • 1
  • 31
  • 49

2 Answers2

0

If you want to just see the dialog when you download the file, open settings and select "Ask where to save each file before downloading".

If your configuration requires to do this from the code, try this solution:

"How to make the settings for Download in Chrome when launched using Chromedriver?"

Community
  • 1
  • 1
voy
  • 696
  • 7
  • 14
0

There is a syntax error in your code as true/false are supposed to be given in boolean and not string. So in python, it could be so

chrome_options.add_experimental_option("prefs",{'download.prompt_for_download': True})

Hope this helps you out.

KayBee
  • 175
  • 2
  • 8