Write to File
Last updated
Last updated
This is pre-built Action located under the @Generic Element Name. It instructs the Avo Assure Client to write given content in the file whose file path is provided in Input Value and save the result as ‘true’ or ‘false’ in the given output variable.
In the Output variable, “True” will be returned if given content is written in file, else “False”.
Input: For Text file: <file path>; <content to write>; <Newline>
This syntax is for .txt file where user need to provide file path, content to write and newline if required
XML/JSON: <file path>; <content to write>
This syntax is for .json or .xml file where user need to provide file path and content in Input Value to write content in desired file
For Excel file: <file path>;<Sheetname>(Optional); <content to write>; <Newline>
This syntax is for .xls file where user needs to provide file path, content to write and newline if required.
Note: Write to file Action supports an optional extra parameter “Newline”. When this parameter is encountered, the following text is written to a new line.
Output: <Dynamic Variable>;<Dynamic Variable>(Optional)
When you are testing a system that generates reports. After executing tests, you want to log the results into a designated output file for review and analysis.
Input:
Output File: testResults.txt
Content to Write: “Test Case 1: Passed”
Using the Action: In the automation script, the "Write to File" Action is used to append the test result to the output file.
Expected Result: By using the "Write to File" Action in this testing scenario, Avo Assure ensures that test results are logged accurately, facilitating easy tracking and reporting of test outcomes.
Output: This Action will write the content in the provided file store them in the {result} output variable, which can be utilized for display or other purposes.