Not able to delete downloaded files from containers
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 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.
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 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.
Closing as we didn't get more information from the OP.