ReadLn procedure reads one line from the file and moves the file pointer to the next line.
Reads one line from the file, which is associated with the file variable by calling the
AssignFile procedure, then assigns this line to the specified variable and goes to the next line.
The procedure has the following parameters:
Specifies the file variable, which is associated with the desired file by calling the
Specifies the variable, which holds the received line.
ReadLn procedure does not have the Var parameter, it moves the file pointer to the beginning of the next line; if the current line is final, the pointer is placed at the end of the file.
Since TestComplete works with variant variables, the received string can be converted to any other data type. The following example demonstrates how you can work with data received from the file.
// Opens a file
AssignFile(FileVar, 'C:\My File.txt');
// Reads a line into the MyVar variable
// Outputs the data to the test log
// Closes the file