This folder contains examples for using up / download files from:
- Android real devices on the Sauce Labs RDC Cloud
- Android Emulators on the Sauce Labs Emulator cloud
- Android Emulator on your local machine
- iOS Simulators on the Sauce Labs Emulator cloud
- iOS Simulator on your local machine
NOTE:\
- Up/downloading files to iOS real devices is not supported by Apple/Appium!\
- Downloading files from iOS Simulators is not possible (not found a way to do that currently)
You can install all dependencies by running the following command
npm install
This will install all needed dependencies that are listed in the package.json
-file
NOTE:
Make sure you are in the folderwebdriverio/appium-app/examples/up-download-file
when you execute this command
The market of Android is being controlled by a lot of different vendors, this also means a lot of different file structures where to upload your file to or download the file from. This makes it a challenge to determine which folder on the device you need to have. You can check the location if you are using the Virtual USB offering of Sauce Labs for Private devices, see also this video.
The advice is that you use a dedicated device, so you always know the file structure and don't need to over complicate the up/downloading script.
- For Android real devices we use the Samsung Gallery
- For Android emulators we use the Google Photos app
- For iOS simulators we use the iOS Photo's app
The purpose is NOT to show you how to automate these apps, but more to show you how you can verify if an upload was successful.
The examples in this repository that can run on Sauce Labs use environment variables, make sure you've added the following
# For Sauce Labs Real devices in the New UI
export SAUCE_USERNAME=********
export SAUCE_ACCESS_KEY=*******
The script on how to use this can be found here and the execution will look like this
The script on how to use this can be found here and the execution will look like this
The script on how to use this can be found here and the execution will look like this
If you want to run the tests on Sauce Labs real devices then you can run the Android test with
// If using the US DC
npm run test.sauce.rdc.android.us
// If using the EU DC
npm run test.sauce.rdc.android.eu
The tests will be executed on a Samsung Galaxy 10.
See this config-file for more information.
If you want to run the tests on Sauce Labs Android Emulators then you can run the Android test with
// If using the US DC
npm run test.sauce.android.emulator.us
// If using the EU DC
npm run test.sauce.android.emulator.eu
The tests will be executed on an Android 8.1, 9.0 and 10.0.
See this config-file for more information.
If you want to run the tests on your local Android Emulator you can test this with
npm run test.local.android.emulator
Please check this config-file for more information.
If you want to run the tests on Sauce Labs iOS Simulators then you can run the iOS test with
// If using the US DC
npm run test.sauce.ios.simulator.us
// If using the EU DC
npm run test.sauce.ios.simulator.eu
The tests will be executed on an iOS 14.5 and 15.0
See this config-file for more information.
If you want to run the tests on your local iOS Simulator you can test this with
npm run test.local.ios.simulator
Please check this config-file for more information.
This repo of examples is based on this article from Jonathan Lipps.