Rehearsal of QTP in 1 Hr: Interview Questions 91 – 100
While appearing in an interview for a position on HP QuickTest Professional, do a quick rehearsal of your knowledge on this tool.
Here is a collection of 180 short questions, QTP Managers commonly use while interviewing new aspirants for their organization.
The entire rehearsal of these questions can take less than an hour.
Set of Ten Questions
Q. 91: How to add a text checkpoint to your test to check whether ‘welcome’ is displayed in your welcome page.
1) Locate the page where you want to add a text checkpoint.
2) Create a text checkpoint.
In the Active Screen, under your page highlight the text welcome. Right-click the highlighted
text and choose Insert Text Checkpoint. The Text Checkpoint Properties dialog box opens.When Checked Text appears in the list box, the Constant field displays the text string you highlighted. This is the text QTP looks for when running the test.
Click OK to accept the default settings in this dialog box.
QTP adds the text checkpoint to your test. It is displayed in the Keyword View as a checkpoint operation on your welcome page
3) Save the test.
<<<<<< =================== >>>>>>
Q. 92: How can you execute and analyze a Test with Checkpoints?
1) Expand the test and review your test:
Choose View > Expand All or use the * shortcut key on your number keypad.
2) Start running your test:
Click Run or choose Test > Run. The Run dialog box opens. Ensure that New run results folder is selected. Accept the default results folder name. Click OK. When the test run is completed, the Test Results window opens.
3) View the test results:
When QTP finishes running the test, the Test Results window opens.
The test result should be Passed, indicating that all checkpoints passed.
If one or more checkpoints had failed, the test result would be Failed.
4) View the results of the page checkpoint:
In the Details pane, you can review the details of the page checkpoint, which lists the items checked.
5) View the results of the table checkpoint:
In the Details pane, you can review the details of the table checkpoint. You can also review the values of the table cells (cell values that were checked are displayed in black; cell values that were not checked are displayed in gray).
6) View the results of the standard checkpoint:
In the Details pane, you can review the details of the standard checkpoint, which lists the properties that were checked and their values. The checkpoint passed because the actual values of the checked properties match the expected values.
7) View the results of the text checkpoint:
In the Details pane, you can review the details of the text checkpoint. The checkpoint passed because the actual text matches the expected text.
8) Close the Test Results window. Choose File > Exit.
<<<<<< =================== >>>>>>
Q. 93: How do you define a Data Table Parameter for QTP?
1) Start QTP and open the Checkpoint test.
2) Save the test as Parameter.
3) Confirm that the Active Screen option is enabled.
4) Confirm that the Data Table option is enabled.
5) Select the text to parameterize.
6) Set the parameterization properties.
<<<<<< =================== >>>>>>
Q. 94: How do you add a runtime parameter to a datasheet?
DataTable.LocalSheet
The following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.
MyParam=DataTable.LocalSheet.AddParameter(“Time”, “5:45”)
<<<<<< =================== >>>>>>
Q. 95: How to change the run-time value of a property for an object?
SetTOProperty changes the property values used to identify an object during the test run.
Only properties that are included in the test object description can be set
<<<<<< =================== >>>>>>
Q. 96: How to retrieve the property of an object?
This can be done by using “GetRoProperty”.
<<<<<< =================== >>>>>>
Q. 97: How to open any application during Scripting?
SystemUtil , object used to open and close applications and processes during a run session.
A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run “Notepad.exe” SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )
<<<<<< =================== >>>>>>
Q. 98: How to covert a String to an integer?
CInt()—> a conversion function available.
<<<<<< =================== >>>>>>
Q. 99: Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?
Inserting a call to action will only Import the columns of the Action called
<<<<<< =================== >>>>>>
Q. 100: Differentiate between the two types of Object Repositories of QTP.
Object repository is used to store all the objects in the application being tested.
There are two types of object repositories, 1) Per action and 2) Shared.
In shared repository only one centralized repository is there for all the tests.
Where as in per action, for each test a separate per action repository is created.
Continue to Next Set of QTP Rehearsal Questions 101 – 110
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.
Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.