e2e_appmon - encrypt password in Nimrecorder script
search cancel

e2e_appmon - encrypt password in Nimrecorder script


Article ID: 268291


Updated On:


CA Unified Infrastructure Management On-Premise (Nimsoft / UIM) CA Unified Infrastructure Management SaaS (Nimsoft / UIM) DX Unified Infrastructure Management (Nimsoft / UIM)


How can I encrypt a passwword within an e2e_appmon Nimrecorder script?


Script example


WriteHTML("INPUT TEXT[NAME= 'xxxxxxxxx']", "xxxxxxxxx")
WriteHTMLEncrypted("INPUT PASSWORD[NAME= 'xxxxx']", "<encrypted_string>")
ClickHTMLElement("INPUT IMAGE[NAME= '<img>']")



The WriteHTMLEncrypted function writes encrypted text in a text field web-form.


Used to fill automatically a password field on a Web page. Recording mode generates automatically the WriteHTMLEncrypted statement if you check Encrypt web passwords checkbox in the Recording options dialog box (select Configure/Recording menu option). Or select Insert/Encrypted string menu option to generate the encrypted text from the original text.

Video: WriteHTML writes some text into a field within a web form. WriteHTMLEncrypted and WriteHTMLPaste are variations and the video explains the use of those three WinTask functions.


ret=WriteHTMLEncrypted(<html_descriptor> , <encrypted_text>)


<html_descriptor>, string, HTML descriptor of the text field. Use Recording mode to generate the WriteHTML syntax and then change the string into an encrypted string.

<encrypted_text>, string, encrypted text to write in the form field.

Return value

Ret, optional numeric return value. If the function succeeds writing within 30 seconds (this default value can be changed using #ActionTimeout), the function returns 0. If the function fails, the return value is a nonzero negative value (see Web Functions Error Codes).


If at replay, you see that the text is not typed correctly, slow down the field filling using #HTMLPosRetry.

See also


Create Variables

NimRecorder allows you to use custom variables in scripts. You can define variables in the probe to use in NimRecorder scripts. For example, to use an encrypted password in the script, define the password as a variable and select the Crypted option.

Follow these steps:

  1. Open the Variables tab.
  2. Right-click in the Variables section and select Add variable....
  3. Complete the following information in the Variable properties window:
    • Variable name: defines the variable name, which is unique for each variable.
    • Crypted: allows you to encrypt the variable value and prevents the same being displayed in the human readable format.
    • Variable value: defines a value to be assigned to the variable.
  4. Click OK.
  5. Update the following information in the Quality of Service variables section to configure default QoS properties:
    • Group name: defines the default QoS group.
    • Name: defines the default QoS name.
  6. Click Apply.