While scripting for web application, one always faces an issue in selecting a folder location to save the file. Suppose, script clicks on download button on the page to download a file) and then presented with the Save as dialog box (shown below) that shows after clicking on the Save button.
Now, to save file to desired location (suppose Desktop), Desktop icon on the left side of the dialog box needs to be clicked.
To do this, we only need to type or set the full path of the desired location along with the file name in the File Name field in the Dialog Box and then click on Save button
To save the file in Downloads folder on Desktop, just set “C:\Users\<username>\Desktop\Downloads\file.txt” in the File Name field and click on Save button