You can use FILE_UPLOAD command as follows:
- Hover over Repository and File Uploads from the menu
- Click Add to upload a file that you want to use in your test case
- Alternatively, you can use a file which was uploaded externally to a storage service, such as Dropbox, but make sure that the link directly downloads a file and not opens in a preview mode.
- In your test case, use FILE_UPLOAD command in a step
- Two drop-downs are presented
- Select the file upload locator for your application from the list of locators available in the first drop-down. Alternatively, you can use Inline with this XPath: //input[@type='file']
- Select the file you uploaded in the above bullet from the second drop-down or click URL and enter the URL of the file.
- Save your test case and run it to confirm that the upload is successful.
NOTE: The XPath for the locator must reference an input tag with type = "file". For example
//input[@type='file']
Comments
Please sign in to leave a comment.