Popular use cases
You'd probably want to add file upload steps in the following cases:
- When it's required to upload some file in order to complete a flow and test it.
- When you want to validate that only specific types of file can be uploaded.
- When you want to validate that only one file (instead of multiple) can be uploaded.
How to add a File upload step?
Testim supports the following ways to upload a file:
- File browser, single file
- File browser, multiple files
- Drop file, single file
- Drop file, multiple files
On recording, the file will be uploaded to the Testim cloud, and upon played back, the file will be downloaded from the server and uploaded to the AUT (Application Under Test). This assures that no matter where the test runs, the file will be always accessible.
Upload a file using the File Browser
Just choose a file (or multiple) and Testim will record it automatically. Once done, a "File upload" step will be created.
If your app allows it, you can drop one file (or multiple). Once done, a "Drop file" step will be created.
Important issues to be aware of
- There are times when you run this step it will fail with an "Element not visible" error because the upload file element is not visible to the user. In this case, uncheck the "Element must be visible" in the properties of the upload step and try again.
- Recommended file size to upload is up to 1 Mega - If you need to test your app while uploading a bigger file size feel free to contact us.
- Make sure Chrome Dev Tools is closed - You'll not be able to run "file upload" steps if the Dev Tools is opened.
- Make sure the option "Ask where to save each file.." in Chrome settings is unchecked - In case the option is checked you'll not be able to record file upload steps. You can check your settings by opening Chrome settings > Clicking "Advanced settings" > scrolling to "Downloads" section.