File Upload
upload
Method allowing to upload a document.
object
Parameter | Type | Description |
---|---|---|
filesSelector | any | Selector of the element allowing to select the file to upload. |
submitSelector | any | Selector of the element allowing to upload a file. |
delayBeforeSubmit | number | Delay between file selection and file upload. (ms) |
filePath | string / 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.
Parameter | Type | Description |
---|---|---|
selector | selectorType | Selector of the element allowing to set a file to upload. |
filePath | string / 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.
Parameter | Type | Description |
---|---|---|
selector | selectorType | Selector of the element allowing to set a file to upload. |
Basic Usage
await I.clearUpload("chooseFileSelector");