Upload file (FR)
Perfecto Command
perfecto:file:upload
Purpose
For Web tests, provides a way to upload a file from the Perfecto repository to the desktop web instance under test.
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
fileLocation | String |
|
The locator as it appears in the Perfecto repository. Example: |
Return Value
The location on the VM that the file was uploaded to
Exceptions
If the upload fails, the following exception is thrown: Failed to upload file
If the file fileLocation
parameter has an incorrect value or is empty, the following exception is thrown: FileLocation is empty or wrong
If the file does not exist, the following exception is thrown: File not found - No such file
Example
Java sample
Map param = new HashMap();
param.put("fileLocation","PUBLIC:fileToUpload.zip");
Object result = driver.executeScript("perfecto:file:upload",param);