This tutorial elaborates on two fundamental features frequently used in QTP – the QTP Password Encoder and the Active Screen.
Recommended IPTV Service Providers
- IPTVGREAT – Rating 4.8/5 ( 600+ Reviews )
- IPTVRESALE – Rating 5/5 ( 200+ Reviews )
- IPTVGANG – Rating 4.7/5 ( 1200+ Reviews )
- IPTVUNLOCK – Rating 5/5 ( 65 Reviews )
- IPTVFOLLOW -Rating 5/5 ( 48 Reviews )
- IPTVTOPS – Rating 5/5 ( 43 Reviews )
It is a common practice for websites not to display passwords, even during entry for security purposes. QTP presents a unique feature that secures password confidentiality by concealing it from public display and maintains its integrity.
Password Tool in QTP
When you input the password “Mercury” in the flight application, you might have observed an unintelligible character sequence appearing in the password edit box.
Here’s how it appears in the code:
In the aforementioned line of code, the password is encrypted.
QTP implements a ‘SetSecure’ method when a password is typed. It encodes the password automatically during login and decodes it while executing the test. This protocol aids in concealing the password on the screen.
With the SetSecure method and the encrypted text parameter, the user can confidentially input a value into a non-password textbox. For a requirement to securely embed a value in a textbox, QTP offers a tool named “Password Encoder”, that encodes normal text.
You can access the “Password Encoder Utility’ at:
Start > Programs > HP QuickTest Professional > Tools > Password Encoder
The following application is invoked:
The tool is self-explanatory and easy to use.
When a value is applied in the “Password” field, the “Generate” button gets activated. Clicking on it reveals the encoded text in the “Encoded String” field. The encoded password is copyable to the clipboard via the “Copy” button.
The encoded text can be used as an input for a text/edit box or as a parameter in the DataTable.
Active Screen is a significant functionality provided by QTP to make the testing process more transparent. During recording, QTP captures an image of the application state during execution of a specific operation. The level of detail recorded in the active screen depends on the settings.
To view active screen, click on “View -> Active Screen”.
Here is a sample active screen while setting up a Gmail account.
The object involved in the operation of a chosen statement gets highlighted in the screen snapshot captured.
Let’s see the changes when we shift to the next statement.
The highlighted textbox switches from the Gmail page to the ‘create a new Google account’ page.
Active screen settings can be changed by opting “Tools -> Options -> Active Screen” from the menu. The options window will explain different levels of capture and their corresponding features.
The levels and their interpretations are:
- Partial (Default)
The capture level can be switched even after test creation. You can also set custom active screen capture options using the “Custom Level” button.
Active screen not only assists in scrutinising the application during testing, but also enables features like adding objects to repositories, inserting checkpoints and output values, parameterising fields, and adding steps to the test.
For Example, if we want to add the ‘Sign in’ button to the repository on the Gmail page, right-clicking on the object provides us with options to select from.
The options include inserting a checkpoint, output value, or viewing/adding objects.
You can replace the active screen for specific steps by opting “Tools -> Change Active Screen” from the menu. QTP allows navigation to a new screen, and once you confirm, the control returns with the new active screen.
If all snapshots in a test need to be updated or replaced, run the test in “Update Run mode”. This option updates all test snapshots.
The active screen is also handy for making test modifications without launching the application. However, it should be noted that tests with active screen capture consume more disk space. Saving a test using the “Save as” option excludes the active screen, reducing the disk space used by the test.
In conclusion, QTP’s Password Encoder and Active Screen are crucial features that enhance the security and transparency aspect of the testing process.
In the ensuing article, we will delve into topics like Expert View, Step Generator, and checkpoints. Feel free to post any queries in the comments section below.