In this post, we will learn how to write to a file using the Raptor flowchart. The standard Output flowchart symbol is used to write to the file. The standard output to the flowchart is the MasterConsole window that is displayed on the computer monitor screen. We can override this behavior by Redirecting the output to the file.
This is much canonical to reading from a file. ( https://www.testingdocs.com/reading-a-file-in-the-raptor-flowchart/)
To write to a file in the flowchart, we have to redirect the output to the file using
The function call would create a new file or overwrite an existing file with the filename. After file processing we can turn off the redirection using the statement:
Let’s create a flowchart that will write two lines of output to the file using the RAPTOR application. Assume the filename is output_raptor.txt. The file would be created in the same directory to which the RAPTOR flowchart is present.
Append to an existing file
To append to an existing file we can use the following RAPTOR statement.
This statement would open an existing file in an append mode. All the flowchart output would be appended to the file at the end. If the specified file is not present a new file would be created.
RAPTOR tutorial page: https://www.testingdocs.com/raptor-a-flowchart-tool/
Flowchart examples: https://www.testingdocs.com/raptor-flowchart-examples/
RAPTOR official website: https://raptor.martincarlisle.com/