Behavior in case a file download occurs while operating the test differs according to the browser.
- In case of Chrome, Firefox, or Edge
- The download confirmation dialog box will not be displayed, and the file will be downloaded to the designated location (by default, it will be downloaded to the magicPod/downloads folder on the Desktop).
- In the case of IE11
- As, with IE11, it is not possible to automatically hide the confirmation dialog box, use the keyboard operation to save the file to the same folder as in the case of Chrome, Firefox, or Edge. For this reason, the operation may be slower than with other browsers.
- Also, as it will tend to operate with less stability than other browsers, unless you have a particular need to perform a download test using IE, we would recommend testing using other browsers.
・How to Specify the Download Operation
When performing a test using only Chrome or Firefox, there is no need to do anything special for the download operation. For example, if you specify “clicking” a particular button, downloads shall take place automatically.
On the other hand, IE does not allow for the above keyboard operation to be performed by simply clicking on the download button, so a special "Click and download file" command is employed. As it is not clear which button will cause the download process to occur on the MagicPod side, it is necessary to set this up when creating the test case. In Chrome or Firefox, if the “Click and download file” command is specified, this has the same operation as “Click”, so it is possible to use IE and these browsers for common test cases.
・Confirmation of download results
To check whether a file has been downloaded without issues, check whether the file with that specific name is present in the download folder. Confirm by running the “Assert download completed” command. You can use regular expressions for the filename.
It is not currently possible to open the downloaded file and check the contents with MagicPod.
・Waiting for time-consuming downloads
In case the file download seems as though it may take some time (10 seconds or more), enter the “Wait until download completed” command before the confirmation command. Regular expressions can be used for the filename here, too. If it finishes within 10 seconds, it will wait with the confirmation command alone, so you do not need to enter the wait command.
The final command will be as follows:
If there is no need to check the downloaded file(s), the two commands below will not be necessary.