zalenium icon indicating copy to clipboard operation
zalenium copied to clipboard

Not able to delete downloaded files from containers

Open hariharanravichandran opened this issue 8 years ago • 4 comments

EveryTime We take a pull of latest Zalenium images.

Command we use to start Zalenium: docker run --rm -d --name zalenium -p 4444:4444 -p 5555:5555 -v /usr/bin/docker:/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp/node/home/seluser/Downloads -v /tmp:/home/seluser/Downloads --label zalenium_main --privileged dosel/zalenium:$zalenium start --seleniumImageName elgalu/selenium:$selenium --desiredContainers 4 --maxDockerSeleniumContainers 4 --maxTestSessions 4 --videoRecordingEnabled false --timeZone Europe/Dublin

Our Test contains a part where it will download a file for verification. After verification, file will be deleted automatically. Now, It is not happening. Please Help us resolve this issue.

hariharanravichandran avatar Jun 18 '18 06:06 hariharanravichandran

@hariharanravichandran how are you downloading the files? Normally you wouldn't download a file through selenium directly as it will just end up on a selenium node somewhere, which is not useful. And there is no way via the selenium API to manage files. So, I'm not sure how you were deleting files before? If you set --maxTestSessions 1 then it will delete the selenium pod after every test, which would as a side effect end up deleting the downloaded files, but because you have it set to 4, it won't delete the selenium pod until 4 tests have run inside it. To test a file download you'd generally read the url via selenium and then download that file in your test outside of the selenium.

pearj avatar Jun 18 '18 11:06 pearj

Yes.. We are downloading a file at the end of test and validating the same. When we try to delete the file, we are getting operation not permitted..

hariharanravichandran avatar Jul 01 '18 11:07 hariharanravichandran

@hariharanravichandran you didn't answer my question as to how you are actually downloading the file. We can't help you if you give no context or code samples.

pearj avatar Jul 07 '18 13:07 pearj

Closing as we didn't get more information from the OP.

diemol avatar Jul 29 '18 16:07 diemol