QTP Multiple Choice Questions :-
1) By default, how many no of tables would be there in a script?
A. 1
B. 2
C. 3
D. 4
Ans: B
2) Where can you associate a function library to a test?
A. Run Options
B. Test Settings
C. View Options
D. Function Definition Generator
Ans: B
3) To invoke the function which does not return any value, we can use
A. CALL function name
B. function name
C. Both A & B
D. None
Ans: A
4) The result of the checkpoints can be stored in a variable
A. Yes
B. No
C. Maybe. Depends on the type of checkpoint.
Ans: A
5) Parameterization generally involves
A. Data table
B. Random number
C. Environment
D. All of the Above
Ans: D
6) The file which is used for recovering from the run time errors has an extension
A. QRS
B. TSR
C. PNG
D. DAT
Ans: A
7) Among the following recording modes, which method uses both the objects and mouse coordinates
A. Normal
B. Low level
C. Analog
D. Both B & C
Ans: B
8) Where do you mark an action as reusable?
A. Action Settings
B. Action Properties
C. Action Run Properties
D. Action Call Properties
Ans: B
9) After running a test that contains both input and output parameters, where can the results of an output parameter be found?
A. Local Data Sheet
B. Global Data Sheet
C. Run-time Data Table
D. Design-time Data Table
Ans: C
10) If you have a Virtual Object Collection stored on your machine, and you don’t want to use it what you must do?
A. Disable Virtual Objects in Test Settings
B. Remove the Collection from your machine
C. Disable Virtual Objects in General Options
D. Remove the Collections from the Resources list
Ans: C
![QTP Objective Questions](https://engineeringinterviewquestions.com/wp-content/uploads/2019/09/QTP-Objective-Questions.png)
11) Constant “2” with the reporter statement returns
A. Pass
B. Fail
C. Done
D. WARNING!
Ans: C
12) The standard timing delay for windows application is
A. 20 seconds
B. 60 seconds
C. Infinite
D. 100 seconds
Ans: A
13) In VB Script functions, which one is false among the following
A. Variables must be declared before use
B. Variables may not be declared before use
C. Variables may be declared without data types
D. None
Ans: B
14) Method to To count the no of rows in a table
A. getrowcount
B. getlinecoun
C. Getcount
D. Count
Ans: A
15) By default, the all actions in QTP are
A. non – reusable
B. reusable
C. external
D. None
Ans: A
16) If the same object is present in the local and shared repository, QTP will refer which one?
A. Shared
B. Local
C. Both Shared and Local
D. Will give an Error
Ans: C
17) Which one is not true about “Call of action”
A. Tester can edit the script
B. Tester can’t edit the script
C. Tester can view the script
D. None
Ans: A
18) Checkpoint which is being used for verifying the web page with W3C standard is
A. Bitmap checkpoint
B. Standard checkpoint
C. Accessibility checkpoint
D. XML checkpoint
Ans: C
19) The file extension of Shared object repository file is
A. .MTR
B. .TSR
C. .QRS
D. None
Ans: B
20) The standard timing delay for web based application is
A. 20 seconds
B. 60 seconds
C. Infinite
D. 100 seconds
Ans: B
21) Which scripting language is used in QTP ?
A. Test Script Language (TSL)
B. Java Script
C. ASP
D. VB Script
Ans: D
22) Does QTP support Data Driven Framework ?
A. YES
B. QTP supports only Modular Framework
C. QTP is only Keyword Driven Framework
D. No
Ans: A
23) Select the Browsers NOT Supported by QTP ?
A. IE
B. Netscape
C. Safari
D. AOL
Ans: C
24) “Active Screen” Technology in QTP gives
A. Test Data
B. Checkpoints
C. Screenshots of Application Under Test (AUT)
D. Object Repository
Ans: C
25) Does the “Information” Toolbar in QTP 10.x give the Syntax Errors if any in the script ?
A. YES
B. NO
C. It gives syntax errors only related to functions
Ans: A
26) Method to To count the no of rows in a table
A. getrowcount
B. getlinecount
C. Getcount
D. Count
Ans: A
27) Select Case statement is end with
A. end case
B. exit case
C. esac
D. end select
Ans: D
28) Object Repository is available in 3 modes viz.
a) Per-Action Object Repository
b) Shared Object Repository,
c) Unshared Object Repository
A. Both a & b
B. Both a & c
C. Both b & c
D. Only a
Ans: A
29) What is the correct order of events in Test Script Creation ?
A. Plan, Record , Debug, Enhance
B. Plan , Record , Enhance , Debug
C. Record, Debug , Plan , Enhance
D. Record, Enhance, Debug , Plan
Ans: B
30) Which one is the default data type of QTP
A. integer
B. String
C. Variant
D. Double
Ans: B
31) To use the non-standard windows object, we can go for
A. Object spy
B. Virtual objects
C. Object identification
D. None
Ans: B
32) Select INVALID Checkpoint Type from the following
A. Page Checkpoint
B. Accessibility Checkpoint
C. Object Checkpoint
D. XML Checkpoint
Ans: C
33) To terminate the script execution, during running, QTP uses
A. Exit run
B. Stop run
C. Quit
D. None
Ans: A
34) BITMAP Checkpoint checks the property values of an image ?
A. YES
B. NO
Ans: B
35) Synchronization Point is used :-
A. To delay QTP execution until Application Under Test (AUT) attains certain status
B. To synchronize execution in multiple instances of QTP
C. To synchronize per action and shared object repositories
Ans: A
36) Do statement always end with
A. end while
B. End do
C. Wend
D. Loop
Ans: D
37) By default a Datable contains :-
A. One Action Sheet and One Global Sheet
B. Two Global Sheets
C. Two Action Sheets
D. Two Action Sheets and One Global Sheet
Ans: A
38) Results Table (results of a test) is available in which following locations ?
A. Test Script Folder
B. Test Configuration Folder
C. Test Results Folder
D. Test Functions Folder
Ans: C
39) *.mts file contains :-
A. Sequence and iterations of Actions to be executed
B. User created library functions
C. Per-Action Object Repository Files
D. Parameter used in Actions
Ans: A
40) The feature of selecting different values of test data at run-time is called
A. Synchronization
B. Parameterization
C. Smart Identification
D. Transaction
Ans: B
41) Can Checkpoints be parameterized ?
A. YES
B. NO
C. Maybe. Depends on the type of checkpoints
Ans: A
42) Can Test-Data in “Action Sheet” of Data Table be used from one action to another ?
A. YES
B. NO
Ans: B
43) Text Output Value –
a) outputs property value of any object
b) outputs text string appearing in AUT
c) outputs part of displayed text appearing in AUT
A. only a
B. only b
C. only c
D. both b & c
Ans: D
44) Select the valid types of Actions in QTP
a) Nested Actions
b) Shared Actions
c) External Actions
d) Reusable Actions
A. both b & c
B. both b & d
C. both a & d
D. both a & c
Ans: C
45) Can Actions inserted as “Call to Action” be modified by the test engineer?
A. YES
B. NO
Ans: B
46) Action Sheet (in Data Table) of an action inserted as “Copy of an Action” is editable only from the test from which they were created ?
A. YES
B. NO
Ans: B
47) Action Iteration is :-
A. Number of times action would be executed every global iteration
B. Number of time action would be executed in entire test execution
C. Number of times all actions would be executed globally.
Ans: A
48) Choose the valid syntax to call Action 1 ( from Action 0) with input parameter “action_in” and store the output in a variable “MyVariable”
A. RunAction ‘Action1’, oneIteration, Parameter(“action_in”), MyVariable
B. RunAction ‘Action0’, oneIteration, Parameter(“action_in”), MyVariable
C. RunAction ‘Action1’, oneIteration, MyVariable , Parameter(“action_in”)
D. RunAction ‘Action0’, oneIteration, MyVariable , Parameter(“action_in
Ans: A
49) Can we use all standard Microsoft Excel features like Formulae, Formatting , Sorting etc in QTP DataTable ?
A. YES
B. NO
Ans: A
50) “Call to Copy” of an action can be inserted only for reusable actions ?
A. NO
B. YES
Ans: A
QTP Objective type Questions with Answers
51) Parameterization of all Test data in a script can be done using
A. Object Repository Manager
B. Virtual Object Manager
C. Data Driver
D. Variable Driver
Ans: C
52) Are Nested Actions Call to one Action from Another ?
A. YES
B. NO
Ans: A
53) Is the Shared ( Global ) Action Repository the default repository in QTP ?
A. YES
B. NO
Ans: B
54) In a Per – Action (Local) Repository Action 1 and Action 2 in the same test script would have different object repositories?
A. YES
B. NO
Ans: A
55) The Share Action Repository is preferable when
A. The Application Under Test is Dynamic with respect time
B. The Application Under Test is Internet Environment
C. The Application Under Test is Static
Ans: A
56) What is *.tsr file in QTP ?
A. Object Repository Files
B. VB Actions Files
C. QTP Action Files
D. Stores Test Data
Ans: A
57) Object Spy can be used to
A. identify the Objects that can be identified by QTP
B. identify the properties used for identification of objects
C. identify the properties used for identification of objects in per-action repository
D. identify the properties used for identification of objects in global action repository
Ans: B
58) Are Assistive properties used when mandatory properties are enough to identify an object ?
A. YES
B. NO
Ans: A
59) Are Ordinal Identifiers used when Mandatory and Assistive properties used by QTP are not enough to identify Object?
A. YES
B. NO
Ans: A
60) Select the Invalid type of Ordinal Identifiers Used by QTP
A. Index Based
B. Location based
C. Creation Time
D. Time Based
Ans: D
61) Does Index based ordinal identifier indicates the order in which the object appears in the parent window frame or dialog box relative to other objects?
A. YES
B. NO
Ans: B
62) Does Location based ordinal identifier indicates the order in which object appears in the application code relative to other objects?
A. YES
B. NO
Ans: B
63) Select the environments in which Creation Time ordinal identifier is used
A. SAP
B. Oracle
C. Web
D. Java
Ans: C
64) When a test is run in update mode, what is updated?
A. The test results
B. The object descriptions
C. The action names in the test
D. The logical names in the test
Ans: B
65) For identification of any object the choice of ordinal identifier selected can be modified in the Object Identification Window?
A. YES
B. NO
Ans: A
66) The Index Property value of Occurrence of the first object in source code is
A. 1
B. a
C. 2
D. 0
Ans: D
67) Is Smart Identification is invoked when QTP cannot recognize an object using mandatory , assistive and ordinal properties ?
A. Yes
B. No
C. Only in Web Environments
Ans: A
68) Select the type of properties used for Smart Identification
A. Mandatory Properties
B. Assistive Properties
C. Base Filter Properties
D. Smart Properties
Ans: C
69) Utility to measure the timing delays between transactions, we use
A. synchronization
B. sync
C. services
D. wait
Ans: C
70) Select the Invalid recording modes supported by QTP
A. Low-level Recording mode
B. Normal recording mode
C. High-level Recording mode
D. Analog recording mode
Ans: C
71) What does a breakpoint do?
A. Stops test execution at the specified step, after executing that step
B. Stops test execution at the specified step, before executing that step
C. Pauses test execution at the specified step, after executing that step
D. Pauses test execution at the specified step, before executing that step
Ans: D
72) Does Analog Recording mode, records exact mouse and keyboard operations ?
A. YES
B. NO
Ans: A
73) The RunAnalog function is used to run
A. Tracks
B. Functions
C. Analog Functions
D. Analog settings
Ans: A
74) Consider the QTP Script below
Window(“Calculator”).WinObject(“8”).Click 21,6
Window(“Calculator”).WinObject(“WinObject”).Click 14,13
In which mode is the script recorded ?
A. Analog Recording mode
B. Context Sensitive mode
C. Low Level Recording mode
Ans: C
75) Virtual Objects are used when:-
A. The objects do not exist in the Application Under Test
B. Standard Objects cannot be recorded due to problems that arise during recording
C. There are many objects of the same class in the Application Under Test
Ans: B
76) Consider the QTP Script below:-
On Error Resume Next
What does the above line of code do ?
A. If an error occurs in the current line of script under execution , QTP proceeds ahead to the next step
B. If an error occurs in the current iteration in script execution , QTP proceeds ahead to next iteration
Ans: A
77) Which of the following is an example of a missing resource?
A. An object
B. Run Results
C. A Regular Action
D. An External Action
Ans: D
78) To enter the non-executable statement in QTP , we use
A. single quotes
B. Rem
C. double quotes
D. Com
Ans: A
79) Select the tabs that does not appear in the debug view of QTP –
A. Watch Expressions
B. Variables
C. Command
D. Break-point Analyzer
Ans: D
80) The Generate Script Function ( used for transferring script to different location ) appears in which of the following Menu Windows :-
A. Object Identification
B. Test Settings
C. Tools/Options
D. All of the Above
Ans: D
81) Which icon represents Optional Steps in the Keyword View ?
A. Question Mark
B. Exclamation Mark
C. Astrix Mark
D. Dollar Mark
Ans: A
82) Choose the correct order of operations done while setting a new recovery scenario
A. Set the Trigger Event , Set The Recovery Operation , Set the Post – Run Recovery Option
B. Set The Recovery Operation ,Set the Trigger Event, Set the Post – Run Recovery Option
C. Set the Post – Run Recovery Option, Set the Trigger Event , Set The Recovery Operation
Ans: A
83) Can a single test script have multiple Recover Scenarios?
A. YES
B. NO
Ans: A
84) Is Reporter.ReportEvent Library Function is used to display images in test results ?
A. YES
B. NO
Ans: A
85) Can User-Defined Environment Variables be used outside the QTP Environment ?
A. YES
B. NO
Ans: B
86) Will Test Results be automatically be stored in Quality Center (QC) if we run the test script from QC
A. YES
B. NO
Ans: A
87) Can QTP be integrated with Test Director (TD)?
A. YES
B. NO
Ans: A
88) Select the tools that can NOT be integrated with QTP :-
A. Quality Center
B. Winrunner
C. Silk Runner
D. Test Director
Ans: C
89) Select valid syntax of CallFuncEx command
A. CallFuncEx ModulePath, Function, RunMinimized, CloseApp [ , Arguments ]
B. CallFuncEx Function, ModulePath, RunMinimized, CloseApp [ , Arguments ]
C. CallFuncEx ModulePath, Function, CloseApp [ , Arguments ] ,RunMinimized
D. CallFuncEx Function ,ModulePath, CloseApp [ , Arguments ] , RunMinimized
Ans: A
90) Can multiple instances/processes/sessions/windows of QTP be run at the same time?
A. YES
B. NO
Ans: B
91) Can QTP run on multiple instances/processes/sessions/windows of Application under Test?
A. YES
B. NO
Ans: B
92) Select the Invalid syntax to access data in Data Table via VB Scripting :-
A. DataTable(“Column Name”, dtGlobalSheet)
B. DataTable(“Column Name”, dtLocalSheet)
C. DataTable(Column ID, Sheet ID)
D. DataTable(Column Name, Sheet ID)
Ans: D
93) Consider following piece of code
on error resume next
val=DataTable(“ParamName”,dtGlobalSheet)
if err.number 1 then
‘Parameter does not exist
else
‘Parameter exists
end if
Code highlighted above is not logically correct. Select the correct code from the options Provided
A. if err.number 2 then
B. if err.number val then
C. if err.number “ParamName” then
D. if err.number 0 then
Ans: D
94) Does SetTOProperty change the property of an object stored in the Object Repository such that, next time the object is referred to in the test script the updated property of the object is used?
A. Yes
B. No
Ans: B
95) Select the function used to set property of a run – time object :-
A. SetTOProperty
B. GetToProperty
C. SetRoProperty
D. Cannot be set
Ans: D
96) Does GetROProperty return the property of a run-time object?
A. Yes
B. No
Ans: A
97) Object Spy is used to check :-
A. Test-Time Properties of an Object
B. Test-time Properties and Test-Time Methods of an Object
C. Run-time Properties and Run –Time Methods of an Object
D. Test – time and Run-time Object Properties and Test-time and Run – time Object Methods
Ans: D
98) Can Descriptive Programming be used to create Test Scripts for an application without actually recording on it ?
A. Yes
b. No
Ans: A
99) Consider following line of code :-
StartURL = “http://www.yahoo.com”
Set IE = CreateObject(“InternetExplorer “)
IE.Visible = True
IE.Navigate StartURL
Set IE = Nothing
The highlighted line of code is not syntactically correct. Select the correct line of code
A. Set IE = CreateObject(‘InternetExplorer.Shell’)
B. Set IE = CreateObject(‘InternetExplorer.Run’)
C. Set IE = CreateObject(‘InternetExplorer.Application’)
D. Set IE = CreateObject(‘InternetExplorer.Script’)
Ans: C
100) Select the syntactically correct lines of codes :-
A. Browser(creationtime=4).Page(title=Editorial CompanySearch).Link(text=Codes).
B. Browser(creationtime:=4).Page(title:=Editorial CompanySearch).Link(text:=Codes).
C. Browser(‘creationtime:=4’).Page(‘title:=Editorial CompanySearch’).Link(‘text:=Codes’).Click
D. Browser(‘creationtime=4’).Page(‘title=Editorial CompanySearch’).Link(‘text=Codes’).Click
Ans: C