If you use the Click and upload file command, you can use files registered on MagicPod in advance for the file upload test.
1. Upload files to MagicPod
If you add the command and click the Select file button,
the file selection/registration dialog box shall be displayed, so where necessary, register the file.
When the web page you are testing supports multiple file uploading, you can select multiple files to upload on MagicPod.
2. Specify UI element for file upload
Please specify the UI element in Drop UI element.
In case of a browser's standard file upload button
When using the standard browser (although it depends on the browser, the file upload button has the following kind of design. The type attribute is a file input element), the button and the file path name area to its right are combined into one element.
You can upload the file by selecting this element as the UI element in the Click and upload file command, and selecting the file you wish to upload.
In case of a originally uploaded file upload element
On many sites, specially designed file selection buttons are implemented instead of the standard browser buttons described above. For example, even with MagicPod, an original file selection button is used for the file selection and registration described above.
As it is not possible to operate the button in this case, run a command in relation to the input elements with the type attribute compatible with the file upload area.
Basically, if you specify button elements in the same way as in In case of a browser's standard file upload button (“Choose a file to upload” button in the above figure), MagicPod automatically searches for the necessary input elements. However, it may be difficult to determine this automatically depending on the HTML structure of the website. If the following kind of message is displayed, specify the locator manually after checking the candidates displayed in the message.
key=xpath, value=//input[@name='foo'] is a candidate but is very different from the originally selected element
key=id, value=foo and key=id, value=bar are candidates, but it was not possible to select one as both were closest to the originally selected element
Add the file selection button locator, according to the Defining an original locator guide. With the input content, the upper level (key) is the error message key, and the lower level (value) is the error message value. In case a second message is displayed, and it is not clear what the correct element is, or the candidates are not displayed, search for the correct element by confirming with the development team, etc.