- Print
- DarkLight
You can record and execute tests that involve file downloads. However, you cannot test whether the download was complete or run tests on the downloaded file(s).
You can test file uploads with Autify.
Points to note when running tests
There are a few things to keep in mind when running tests that include file download operations.
- The real iOS device does not support downloading a Excel file
- When downloading a Excel file, a confirmation dialog box, which is "Do you want to download ~ ?", will appear. Currently, Autify cannot click on this dialog, which will affect subsequent steps.
Is the downloaded file saved?
No, downloaded files will not be saved anywhere.
The downloaded files are temporarily saved in the test environment while the test is running. However, a new test environment is created at every test and is deleted once the test is complete. Any downloaded file will be deleted at that time.
Can I check if the download link is valid?
To check whether the download link is valid, you should be able to do this by adding operations and verifications after the download.
If the download link is invalid, you would expect a dialog informing the user that the link is invalid, or the user will be redirected to a 404 page. Therefore, the steps after the download should fail.
This will be recorded in a screenshot.
However, this solution assumes that an unexpected state will occur. If screens are displayed and operations can be done as expected even when the download link is invalid, please use [JS Step] or devise a similar solution.