Skip to main content
Version: 9.0.0

File Upload

upload

Method allowing to upload a document.

object

ParameterTypeDescription
filesSelectoranySelector of the element allowing to select the file to upload.
submitSelectoranySelector of the element allowing to upload a file.
delayBeforeSubmitnumberDelay between file selection and file upload. (ms)
filePathstring / string[]Relative path of the uploaded file

Basic Usage

  await I.upload(
{
filesSelector: "chooseFileSelector",
submitSelector: "uploadSelector",
delayBeforeSubmit: 100,
filePath: "./relative-path-file.txt"
}
)

setFilesToUpload

Method allowing to set a document for upload.

ParameterTypeDescription
selectorselectorTypeSelector of the element allowing to set a file to upload.
filePathstring / string[]Relative path of the targeted file.

Basic Usage

        await I.setFilesToUpload(
"chooseFileSelector",
"./relative-path-file.txt"
);

clearUpload

Method allowing to remive a document that has been set for upload.

ParameterTypeDescription
selectorselectorTypeSelector of the element allowing to set a file to upload.

Basic Usage

await I.clearUpload("chooseFileSelector");