zalenium icon indicating copy to clipboard operation
zalenium copied to clipboard

Downloading file in zalenium gets saved in seluser/Downloads foldee

Open saigaitonde opened this issue 4 years ago • 1 comments

Hello,

I need help. My code wants to save a PDF and then read the PDF. Locally, I have set capabilities to my chrome browser to download it to a local location and then I'm reading the PDF.

However, when I run it in Zalenium, even though I have set the capabilities to store the PDF in the same local directory, it downloads it in seluser/Downloads.

Is that how it works? How can I get it to download in my local directory? PLEASE HELP.

saigaitonde avatar Aug 14 '20 10:08 saigaitonde

You can use the mounting volume feature of Zalenium. While launching Zalenium, use the following: -v /your/local/downloads/folder:/tmp/node/home/seluser/Downloads

This will mount your local downloads directory to the Downloads directory where zalenium will download the files. You can then directly read the downloaded file from your local directory.

Also make sure that the default download directory of your Webdriver is set as /home/seluser/Downloads

syedshirazahmed avatar Aug 28 '20 09:08 syedshirazahmed