Protected Variables And Safe Box

Version 4.4 introduces an option to hide sensitive data such as passwords:

  • The Safe Box is a container protected by a password.
  • The box contains protected variables (name and value pairs). The variables are visible to test scripts only when the safe box is unlocked (i.e. the password has been entered).
  • Values of protected variables are not displayed in the GUI or copied to the XML reports.

To manage the safe box use the Script->Safe Box Manager tool:


  • You will be prompted to enter a password to establish or unlock the Safe Box. Entering of a valid password unlocks the box for the current session (until Robot gets closed or the box is locked manually).
  • Use the Add, Edit, Rename and Remove buttons to manage the protected variables.
  • To lock the safe box during the session use the Lock button. You may unlock it again by reopening the manager and re-entering the password at any time.
  • To purge the safe box use the Purge button. You may establish a new safe box again at any time.

To view protected variables and insert them into the scripts use the Protected Variables tab of the Tool Panel component:

To unlock the safe for automated testing:

  • Use the Safe Box Manager.
  • Test scripts started from within the GUI will prompt for password once a protected variable is used and the safe box is locked.
  • For the CLI mode use the --safepass option.

The safe box is internally implemented as an XML file stored in the Robot configuration folder ("<user_home>/.tplanrobot/safebox.xml"). It contains variable names and encrypted values (AES). To migrate the safe box simply copy the file as needed. Avoid manual editing of the file to avoid the XML data corruption.


Have a test script connecting to a password protected VNC server:

Connect rfb:// password=welcome

To hide the password open the Safe Box Manager window and create a variable called mytest-pass:

Then replace the password in the connect command with the variable call:

Connect rfb:// password="{mytest-pass}"