You can use a pre-run executable script to download files from a public location to the Sauce Labs virtual machine running your tests. This topic contains example scripts for downloading remote files on different operating systems, and details configuring the prerun capability in your tests.
NOTE: Custom data/files that are downloaded or created during tests only reside in the VM that the test is currently running on. This information is not stored anywhere, and is discarded along with the VM once the test completes.
Select an OS for detailed instructions:
OS X 10.6, 10.8, 10.9, 10.10
This shell script will fetch the file at the URL and save it to
Windows 7, 8, 8.1
This batch file accomplishes the same thing as the OS X
curl method, but using
bitsadmin.exe since Windows doesn't ship with
This batch file creates a VBScript file,
dl.vbs, which will perform the download, and then runs it:
This shell script downloads file.txt at mywebsite.com to the
After you've created the download script, use the prerun capability in your test script to point to its location.
If your script is in a publicly accessible location, you need to add the URL to the prerun capability.
If your script is in Sauce Storage, you just need to indicate that location, and then the name of the script.