Chrome > Settings > Download - Elements for "Ask where to save each file before downloading"

Hi,

I would like to ask your expertise. Every time I open the chrome whenever I start the chrome. I want to check if the “Ask where to save each file before downloading” if is OFF then I set this in ON otherwise no actions.

Thanks

Hi @asamazald3

May I know why you want to check it always? Maybe you can directly set it once in your VM and it will always remain so.

Or in your code you can run a command line (through Uipath) and set the default toggle value to the chrome settings. (I dont have the code right now for it but you can refer this https://www.ghacks.net/list-useful-google-chrome-command-line-switches/)

Hope this helps :slight_smile:

2 Likes

The VM that I am using will return to normal setting or default. Every time a run the BOT, the setting should be check else if will fail the process. I am doing saving direct to the path and rename the file as well./

Then you can run a command line (with parameters) using invoke code (or even start process using bath file) and set it to your desired setting in the code itself (UiPath workflow)

1 Like

Great, The think I really need now is the command line to toggle on the download prompt.
Thank You!

Did you take a look at the link I sent? :slight_smile:

1 Like

If your intention is to give a direct path to download then the following link tells you exactly how to do it. - pdf - Download file with Chrome via command line - Super User

PS : Build the URL in real time and the file will get downloaded based on the link provided during the execution

1 Like

Yes, but I could find the command line to toggle ON the ask where to save file.
I need this to move on saving the file in a proper folder and also to rename it

When you toggle it on chrome will automatically trigger the window where you need to save the file or if you choose to follow the cmd line then the file directly gets downloaded in the path that you choose to provide .

1 Like

No cmd line to change the directory or the download prompt.
I am trying to find the elements or selector but no luck.

You wouldnt require a selector as cmd line is being used in the first approach.

1 Like

What is the cmd line for that? Because I can’t find the cmd line which to disable auto download and allows pop up to save as the file.

Hi please have a look at this stackoverflow post

1 Like

This is helpful if I download the file coming directly to url.
But the website I am working is to click the download button, where I can select what kind of data should be downloaded (i.e. excel, pdf, csv. etc.). They just provide to download directly the download link.

Well,

You can use get attribute activity and get the URL of the downloading fil e( it might be an onclick event that triggers the download which most of the times will have a URL that it hits to download the data stream)

1 Like