qtp21.What is keyword view and Expert view in QTP?
Keyword View is an icon based view, displays test steps in tabular format and automatically creates documentation for the test steps.

Expert View gives the corresponding VB Script statement for every test step in the Keyword view.

22.How would you connect to database using vbscript ?
Although, QTP doesn’t give any built-in support to the database connectivity, VBScript language and ADODB objects helps in database connectivity.

There are certain things that must be known before connectivity −

Connection string of your server (will be differ from one server to another and can be build from www.connectionstrings.com)

Database type

Server name

Database name



To connect to the database, either; you can code the database connectivity command directly or you can use the SQLQuery tool provided by QTP.

23.What is Object Spy, explain it?
During test or descriptive programming, object spy facilitates to identify & get the run & test time object properties & methods of the application. It can be access either directly from the toolbar or from the object repository.

24.What is the extension of the code file?
The extension of the Code file is script.mts.

25.What is an Optional Step?
If a step declared as an optional, QTP thinks that the step is not mandatory to execute. If an optional step contains GUI objects, QTP executes that step. If an optional step doesn’t contain GUI objects, QTP avoids the optional step and move to the next step.

26.How many types of Test Automation Frameworks are there in QTP?
The types of Automation Frameworks are −

Linear Scripting – Record & Playback

Test Library Architecture Framework

Data-Driven Testing Framework

Keyword-Driven (or Table-Driven Testing Framework)

Hybrid Framework

27.In QTP, how to check the broken links of a web application?
The Page Checkpoint in QTP displays numbers of count of valid/invalid link present in a page.

28.What is Reporter.ReportEvent?
Although, QTP provides four types of result status; Pass, Fail, Done, and Waiting, a standard method of QTP “Reporter.Reportevent” sends custom messages to the test results window. “Reporter.Reportevent” can also send screenshot of result status to the test result window.


Reporter.ReportEvent EventStatus, ReportStepName, Details [, ImageFilePath]

EventStatus = 0 or micPass, 1 or micFail, 2 or micDone, and 3 or micWarning

ReportStepName = (String) Name of the intended step in the report (object name).

Details = (String) Description of the report event. The string will be displayed in the step details frame in the report.

29.How Automation Object Model works in QTP?
QTP Automation Object model completely deals with the automation process happens in QTP. Usually, QTP Automation Object model represents all configuration and functionality provided by QTP test. Almost all, QTP dialog boxes contains their corresponding automation object which can edited or regained by their corresponding properties or methods presented in Automation Object Model. User can use Automation Objects with standard VB programming elements (iterative loops or conditional statements) to design a desired script.

30.Explain the Text output value used in QTP?
During runtime of the test, Text Output values capture text display on the application. In parameterization, text output values capture values display on each iteration, those values will be stored in the run-time data table for further help.

Written by 

Leave a Reply

Your email address will not be published.