Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Hide user input value in the user prompt


I am trying to input username and password from the user using "_sahi._prompt("Enter a name");
But what i need is to hide the value of password or replace the value of password with special chars like "*" or "." when user is inputting it. Can it be done in SAHI ?


  • Hi Archana,

    Can I know why you are using the _prompt() to enter the password? You can use _setPassword() to set the password in the textbox. It will use the encrypted text for setting the value in the textbox.
  • Hi Pratik,

    For security purposes, the login details cannot be stored in a file from which the script can read in which case i could use _setPassword. The requirement is the user should be allowed to login to the system and then the script carries on with its processing.
    Please correct me if i am wrong in understanding that the_setPassword() can only get the password( I understand it will be in encrypted format in the file- either excel or properties file).

  • Hi Archana,

    _setPassword() will use the password in the encrypted form in the script itself. The password can be kept in any of the files.


    This can not be decrypted. _setPassword() decrypt the password and set it in the text field.

    As of now, _prompt() will not take the encrypted text.
Sign In or Register to comment.