Save File

This is a pre-built Action located under the @Browser Element. The functionality of this Action in Avo Assure is to save a file opened in a new tab with the specified name, allowing the file to be stored in a specific folder during test execution. The result is stored in a dynamic variable for further use during test execution.

Syntax

Input Value: <FilePath>;<FileName.extn>;<Wait (in Seconds)>(Optional)

Argument
Description

<FilePath> (Required)

Provide the location to save the file.

<FileName.extn> (Required)

Provide the name of the file along with its extension (for example, .pdf, .txt).

<Wait (in Seconds)> (Optional)

Provide the time in seconds to wait before performing the action.

Output Value: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Argument
Description

<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

Both dynamic variable stores the status as True or False.

Note:

  • This action is applicable only for Web applications.

  • If a file such as .txt, .pdf, or .xml opens in a new browser tab, Avo Assure allows saving it locally.

  • There is no need to specify the file extension in the input. ICE automatically saves the file with its original extension.

  • If a wait time (in seconds) is provided, ICE waits for the specified duration before launching the file explorer.

Example: Saving a File Opened in the Browser

In this example, we explain how to save a file opened in the browser to a specified local path using the Save File action.

  • Action: Save File

  • Input Value: C:\Users\Downloads\dictionary.pdf;2

    • The file path (C:\Users\Downloads\dictionary.pdf) specifies the location on the local system where the file should be saved.

    • The optional wait time (2) represents the delay (in seconds) before initiating the save operation.

  • Output Value: {Status}

    • The result of save file operation is stored in the {Status} dynamic variable, which returns one of the following values:

      • True: If the file is saved successfully.

      • False: If the file is not saved successfully.

  • Logical Explanation: The Save File action takes the value from the Input Value column (C:\Users\Downloads\dictionary.pdf;2) and saves the file currently open in the browser to the specified path. The optional wait time allows for a short delay before performing the save. After execution, the result of this operation is stored in the {Status} variable as true.

Last updated

Was this helpful?