HP QTP Utility Objects : Crypt Object
November 15, 2018
HP QTP Utility Objects : Crypt Object
Welcome to this post! – ” HP QTP Utility Objects : Crypt Object”.
If you are looking for HP UFT, QTP utility objects and their usages, then you are at right place.
This post “HP QTP Utility Objects : Crypt Object” consists of concept discussion and usage discussion. Go ahead and enjoy reading…
This discussion will help you prepare well if you are going for the interview and can help you if you need the function to be used in your project test suite.
Crypt Object
Abstract
The HP QTP Utility Object- Crypt Object is used to encrypt strings. This object ensure that the string required to be used in SUT is encrypted before being used and submitted to the control.
The object in itself falls under the category of utility objects and not utility statements.
Remember there is a difference between utility statements and utility objects.
Before we dig down deep into the usage let’s quickly visit some general questions.
In the interview usually, you might be questioned in different ways like:
- How to get string encrypted and used in your UFT script?
- Can you use the crypt method only once per script or more than once?
- What are the parameters of Crypt Method object?
- Crypt is an object or statement?
Discussion
The crypt object is really important in terms of DW\BI testing, Database testing etc. This helps in masking values as per need. The sole purpose of this method is to encrypt the string and return the modified encrypted string to be used.
The scenarios can be many but one must focus on where exactly to use and how often to use as it has some performance impact. This impact will not be more if script has some encryption to work. On the other hand, if script has 1000 to work you can see the impact.
The crypt object has associated method\s as below:
Crypt Method
Syntax
Crypt.Encrypt(Data)
Let’s see the parameters and their usage description for this method:
Argument | Type | Description |
Data | String | The string to encrypt. |
Return Value
String
Example
In the following example, a password is taken from SQL database and encrypted using the Encrypt method, and then placed in the password edit box using the SetSecure method.
‘Crypt Method example pswdSQL = "GetPasswordfromSqlDB" encrypted_pwd = Crypt.Encrypt(pswdSQL) Browser("Browser").Dialog("dialog").WinEdit("pwd_edit").SetSecure encrypted_pwd
This brings me to the end of our discussion on “HP QTP Utility Objects : Crypt Object”.
I really hope you have enjoyed reading this short post. If you have any doubt on this please feel free to add your comment below.
You can also follow below links related to this post:
Other Utility Objects: | |
CRYPT OBJECT | RANDOMNUMBER OBJECT |
DATATABLE OBJECT | RECOVERY OBJECT |
DESCRIPTION OBJECT | REPORTER OBJECT |
DOTNETFACTORY OBJECT | REPOSITORIESCOLLECTION OBJECT |
DTPARAMETER OBJECT | REPOSITORY OBJECT |
DTSHEET OBJECT | SERVICES OBJECT |
ENVIRONMENT OBJECT | SETTING OBJECT |
EXTERN OBJECT | SYSTEMMONITOR OBJECT |
LOCALPARAMETER OBJECT | TEXTUTIL OBJECT |
MERCURYTIMERS OBJECT (COLLECTION) | TSLTEST OBJECT |
MERCURYTIMER OBJECT | VISUALRELATION OBJECT |
PARAMETER OBJECT | VISUALRELATIONS OBJECT |
PATHFINDER OBJECT | VISUALRELATIONSCOLLECTION OBJECT |
PROPERTIES OBJECT (COLLECTION) | XMLUTIL OBJECT |
QCUTIL OBJECT |
And if you like to read more on UFT or QTP Technical Interview Questions please follow below links:
UFT Technical Interview Questions – Set 1
UFT Technical Interview Questions – Set 2
How to Download Resource From QC\ALM?
How to Upload Resource To QC\ALM?
Or if you prefer General Interview Questions please follow below links:
UFT General Interview Questions – Part 1
UFT General Interview Questions – Part 2
If you would like to keep track of further articles on UFT (QTP). I recommend you to SUBSCRIBE by Email and have new UFT articles sent directly to your inbox.