Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Downloading file in zalenium gets saved in seluser/Downloads foldee #1198

Open
saigaitonde opened this issue Aug 14, 2020 · 1 comment
Open

Comments

@saigaitonde
Copy link

saigaitonde commented Aug 14, 2020

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.

@syedshirazahmed
Copy link

syedshirazahmed commented Aug 28, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants