Upload Files

I.upload

Upload a file.

Usage

I.upload(field, pathToFile)

Parameters

ParameterTypeRemarks
fieldstringKeyword to identify the file upload field
pathToFilestring

Path to the file to upload.
Currently, only absolute paths from the project root are supported.

Example

First, you need to add the file to be used for testing file upload to the UI-licious test project.

Click on the "plus" button in the workspace pane to open the "Add file" dialog.

Select the "Upload file" menu, and upload the file to the project.

Finally, specify the absolute or relative path to the file in the I.upload command.

This will upload "cat.jpg" to the "Start uploading" file input field in our test application.

Last Updated: