Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Feb 10, 2021 12:03

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

NameTypePossible ValuesDescription
fileLocationString

The locator as it appears in the Perfecto repository.

Example:
PUBLIC:fileToUpload.zip

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: 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");
driver.executeScript("perfecto:file:upload",param);
  • No labels