Skip to content

Read Data From Text File: READ_FILE

The Read Data From Text File action reads data from a specified text file and saves it in a variable for further use. This is useful for capturing and reusing text stored in file, such as configuration details or saved information.

Note: This action only works with text files.

Setup:

  • File Path: Enter the file location in the Parameters section.
  • Variable Name: In the Element Key field, specify a name for the variable where the file data will be saved.
  • Example:

Let’s read data from a file called UserDetails.txt and save the data to a variable named UserInfo.

Steps to configure:

  1. Select Read Data From Text File from the Action drop-down menu.
  2. Leave the Screen Name field blank, as this action directly reads the specified file.
  3. In the Element Key field, enter a variable name to store the data (e.g., UserInfo).
  4. In the Parameters section, enter the file path (e.g., C:/Documents/UserDetails.txt).
  5. Click Save.

Note: These steps follow the same process in both Tabular View and Card View.

scrn-read-data-from-text-file-tabular-view
Tabular View
scrn-read-data-from-text-file-card-view
Card View

Expected Outcome on Execution: 

  • The Read Data From Text File action will read data from the file at the specified path (C:/Documents/UserDetails.txt) and save it in the variable UserInfo.
  • This variable can be used in later steps of your automation process to reference the stored information using syntax ${Variable Name} (e.g., ${UserInfo}).

Back To Top