Create File
Last updated
Last updated
The Create File action in the Avo Assure is found under the @Generic Element is used to create a new file at the specified location, using the provided name and file type, store the result in an output variable.
Input: <file_path>;<File_name.extn>
1. file_path: This argument specifies that in which folder the user wants to save their file.
2. file_name.extn: This argument specifies the file format for saving the given file. Note: supported file formats are .txt. .xlsx, .xls, .pdf, .gif, .doc, .xml.
Output: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
A user is testing a new feature in their application that generates log files. Every time they run a test; they need to create a new log file to capture the results.
Instead of manually creating the log file each time, using Avo assure tool with a “Create File” action that automatically creates a new text file. For instance, the tool generates a file named “Test_2024-10.txt” in a specified folder. This ensures that each test’s results are saved in a new file, making it easy for the team to track and review the logs without any extra effort.
Input: Provide the input values as below:
C:\Data Folder;Test_2024-10.txt
Expected Result: It should create the file with name as “Test_2024-10.txt” at given location.
Output: The Create File action creates the new file at given location and save its result in the {result} output variable as “True”. This output can be used for display or other purposes.