https://www.qatechies.com

HP QTP Utility Objects : Crypt Object

technical-concept-uft

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:

  1. How to get string encrypted and used in your UFT script?
  2. Can you use the crypt method only once per script or more than once?
  3. What are the parameters of Crypt Method object?
  4. 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.

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

advanced-floating-content-close-btn
https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5034726663464946 (adsbygoogle = window.adsbygoogle || []).push({});
advanced-floating-content-close-btn 
*************************** Do you want to learn TOSCA? Do you want to excel in Career? Try my New Courses: 1. Tricentis Tosca and Working with Excel   2. Tricentis Tosca and UI Automation Great News!!   Price has been slashed down for limited period of time.So Hurry!!! Click The Shown Links and Enjoy Learning. ***************************
 
error: Content is protected !!