zalenium

Mount the directory in Windows OS for file uploading to Zalenium docker image


I'm running my Selenium tests through Zalenium docker image. I have a test which I need to upload ".csv" file. I have read Zalenium mounting documentation and I follow all steps which written in Zalenium documentation, but still I can not mount csv file from my local machine to Zalenium docker image. My local machine runs on Windows OS. I use this Zalenium string for running image

docker run --rm -ti --name zalenium -p 4444:4444 -p 5555:5555 -v /var/run/docker.sock:/var/run/docker.sock -v /c/ZaleniumLogs:/home/seluser/videos -v /c/ZaleniumLogs/TestData:/home/s eluser/DataFiles --privileged dosel/zalenium start --screenWidth 1920 --screenHeight 1080 --timeZone "UTC/GMT+4"


Solution

  • This part -v /c/ZaleniumLogs/TestData:/home/seluser/DataFiles is wrong, the correct one would be: -v /c/ZaleniumLogs/TestData:/tmp/node/home/seluser/DataFiles

    Check https://opensource.zalando.com/zalenium/#docker, "Mounting volumes/folders across containers"