Clear File Content
Last updated
Last updated
This is pre-built Action located under the @Generic Element Name. It instructs the Avo Assure Client to clear the content of the file whose path is provided in Input value and save the status as result in the given output variable.
Input: For Text File: <location>; <file name>
For Excel File: <file location>, <file name>; <sheet name>(Optional)
Output: <Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
When you are testing an application that logs errors and events to a specific file. Before starting a new test run, it’s essential to clear any existing content in the log file to ensure that you only capture new data.
Input: Log File to Clear: testLog.txt
Using the Action: In the Avo Assure, the "Clear File Content" Action is used to empty the contents of the log file before the test execution.
After executing the Action, the test verifies that the log file is empty, ensuring that no previous entries will interfere with the current test run.
Expected Result: By using the "Clear File Content" Action in this testing scenario, Avo Assure ensure that the log file is ready for new entries, which is crucial for accurate logging and reporting.
Output: This Action will clear the provided file’s content and store ‘True’ in {result} output variable, which can be utilized for display or other purposes.