Tuesday, July 6, 2010

QTP (HP0-M16) Certification Questions and Answers - 5

QTP (HP0-M16) Certification Questions and Answers - 5

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

41) Object Spy can be found in ........menu.

A) Tool
B) Tools
C) Task
D) Tasks

42) ............ displays the open documents side-by-side.

A) Tile Vertically
B) Tile Horizontally
C) Cascade
D) Tile Cascade

43) For opening the QuickTest Professional Help we can use.......

A) F3
B) F5
C) F1
D) F2

44) If QTP cannot find any object that matches the description, or if it
finds more than one object that matches, QuickTest may use
the............mechanism to identify the object.


A) Ordinal Identifier
B) Index Identifier
C) Smart Identification
D) Assistive Identification

45) You can configure the ........, ............ and ............
properties that QuickTest uses to record descriptions of the objects in
your application


A) mandatory, assistive, and ordinal identifier
B) mandatory, required, and ordinal identifier
C) smart, assistive, and ordinal identifier
D) Index, assistive, and ordinal identifier

46) The .......... property set for each test object is created and
maintained by QuickTest.


A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

47)You can access and perform ......... methods using the Object property.

A) Run-Time Object
B) Test Object
C) Smart Identification Object
D) Assistive Object

48) You can view or modify the test object property values that are
stored with your test in the .........


A) Information Pane
B) Data Table
C) Information Pane & Data Table Both
D) Object Properties & Object Repository dialog box.

49) You can retrieve or modify property values of the test object during
the run session by adding ..........statements in the Keyword View or
Expert View.


A) GetROProperty & SetROProperty
B) GetTOProperty & SetTOProperty
C) GetTOProperty & SetROProperty
D) GetROProperty & SetTOProperty

50) If the available test object methods or properties for an object do
not provide the functionality you need, you can access ..............of
any run-time object using the Object property.


A) The internal methods and properties
B) The mandatory methods and properties
C) The selective methods and properties
D) The assistive methods and properties


Answers
41) B, 42) A, 43) C, 44) C, 45) A, 46) B, 47) A, 48) D, 49) B, 50) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 5

QTP (HP0-M16) Certification Questions and Answers - 4

QTP (HP0-M16) Certification Questions and Answers - 4

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

31) You can manage the test actions and the test or function library
steps using the ... menu commands


A) File
B) Edit
C) Automation
D) Tools

32) To expand all the steps in the keyword view which option you would
use from the View menu.


A) Expand
B) Expand All
C) Expand Items
D) Expand Rows

33) What is the shortcut key to open a Step Generator.

A) F2
B) F5
C) F6
D) F7

34) Function Definition Generator in found in which menu option.

A) File
B) Tools
C) Insert
D) View

35) The shortcut keys for Record, Stop and Run respectively are

A) F3, F4, F5
B) F4, F3, F5
C) F4, F5, F3
D) F3, F5, F4

36) What is the shortcut key for opening an Object Repository.

A) Alt+R
B) Shift+R
C) Ctrl+R
D) Shift+O+R

37) Shortcut key to Insert/Remove a breakpoint is

A) F9
B) F8
C) Ctrl+b
D) Shift+b

38) .........runs only the current line of the script. If the current
line calls a method, the method is displayed in the view but is not
performed.


A) Step Over
B) Step Out
C) Step Into
D) Step Till

39) .........runs only the current line of the script. When the current
line calls a method, the method is performed in its entirety, but is not
displayed in the view.


A) Step Over
B) Step Out
C) Step Into
D) Step Till

40) What is the shortcut key to Clear all Breakpoints

A) Ctrl+Shift+F9
B) Shift+Ctrl+F9
C) Alt+Shift+F9
D) Alt+Ctrl+F9

Answers
31) B, 32) B, 33) D, 34) C, 35) A, 36) C, 37) A, 38) C, 39) A, 40) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 3

QTP (HP0-M16) Certification Questions and Answers - 3

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

21) Panes in QTP can have one of the following states—docked or floating.

A) True
B) False

22) Which of the following statement is True:

A) QuickTest enables you to open and work on one test at a time
B) QuickTest enables you to open and work on two tests at a time
C) QuickTest enables you to open and work on predefined number of tests
at a time
D) QuickTest enables you to open and work on nine test at a time

23) Which of the following statement is True:

A) You can open and work on two function libraries simultaneously
B) You can open and work on multiple function libraries simultaneously
C) You can open and work on nine function libraries simultaneously
D) You can open and work on one function library at a time

24) You can open any function library, regardless of whether it is
associated with the currently open test.


A) True
B) False

25) You can work with multiple documents (test, component, or
application area, function libraries) using the...... dialog box

A) Panes
B) Display
C) Show
D) Windows

26) QuickTest has ..... built-in toolbars.
A) 5
B) 6
C) 7
D) 8

27) The ......... toolbar contains buttons for recording and running
your test.


A) Standard
B) Tools
C) Automation
D) Edit

28) Shortcut Key for opening a new Function Library is:

A) Shift+Alt+N
B) Ctrl+Alt+N
C) Shift+N
D) CRTL+N

29) Shortcut Key for Closing all open Function Libraries in one go.

A) Ctrl+Alt+C
B) Shift+A+C
B)Shift+N
D) None of these

30) shortcut Key for Commenting out the current row, or selected rows

A) Shift+M
B) Ctrl+C
C) Ctrl+M
D) Shift+C

Answers

21) A, 22) A, 23) B, 24) A, 25) D, 26) D, 27) C, 28) A, 29) D, 30) C

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 2

QTP (HP0-M16) Certification Questions & Answers - 2
By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

11) The Information pane provides a list of............. in the test:
A) Semantic errors
B) Syntax errors
C) Common errors
D) Logic errors

12) When we switch from Expert view to the Keyword view, QTP
automatically checks for syntax errors in the test and shows them in the
information pane.


A) True
B) False

13) If the information pane is not open, QTP automatically opens it in
case a syntax error is detected.


A) True
B) False

14) ..................... provides a list of the resources that are
specified in your test but cannot be found.

A) Missing pane
B) Missing Resources pane
C) Resources pane
D) Missing Items pane

15) Whenever you open a test or a function library, QTP automatically
checks for the availability of specified resources.


A) True
B) False

16) The Data Table does not assists you in parameterizing your test.

A) True
B) False

17) Tabs in the Debug Viewer pane are:

A) Watch, Variables, Debug
B) Watch, Data, Command
C) Watch, Variables, Command
D) View, Variables, Command

18) ............... tab enables you to view the current value of any
variable or VBScript expression.


A) Watch
B) VIew
C) Locate
D) Current

19) The .... tab displays the current value of all variables that have
been recognized up to the last step performed in the run session.


A) View
B)Variables
C) Locate
D) Current

20) The .........tab enables you to run a line of script to set or
modify the current value of a variable or VBScript object in your test
or function library.


A) View
B) Variables
C) Command
D) Current

Answers

1) B, 12) A, 13) A, 14) B, 15) A, 16) B, 17) C, 18) A, 19) B, 20) C

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

QTP (HP0-M16) Certification Questions and Answers - 1

QTP (HP0-M16) Certification Questions and Answers - 1
By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

1) 'Browser navigation timeout' is in which tab of Test Settings
(File->Settings) window.


A) Properties
B) Resources
C) Web
D) Web Settings

2) How many tabs are there in Test Settings (File->Settings) window

A) 7
B) 6
C) 5
D) 8

3) Identify the tabs in the Test Settings (File->Settings) window

A) Properties, Run, Resources, Parameters, Environment, Web, Recovery
B) Properties, Run, Resources, Parameters, Environment, Web
Settings,Recovery
C) Properties, Run Options, Resources, Parameters, Environment, Web,
Recovery
D) Properties, Run, Resources, Input Parameters, Environment, Web, Recovery

4) 'Generate Script' is in which tab of Test Settings (File->Settings)
window


A) Properties
B) Web
C) Resources
D) Recovery

5) The following are the four main columns in the Keyword view

A) Item, Operation, Value, Comments
B) Item, Operation, Value, Documentation
C) Item, Operation, Property, Documentation
D) Number, Operation, Value, Documentation

6) For each object and method in an Expert View statement, a
corresponding row exists in the Keyword View.


A) True
B) False
C) There is a problem with the statement.
D) None of above

7) You can work on one or several function libraries at the same time.

A) True
B) False

8) You can insert additional steps on the test objects captured in the
Active screen after the recording session.


A) True
B) False

9) The Active Screen enables you to parameterize object values and
insert checkpoints


A) True
B) False

10) A QTP user can increase or decrease the active screen information
saved with the test.


A) True
B) False

Answers

1) C, 2) A, 3) A, 4) A, 5) b, 6) A, 7) A, 8) A, 9) A, 10) A

By Jigar Gosai
Email: jigar.gosai@gmail.com

Cell# +91-9825118192

Friday, June 11, 2010

File System Scripts

File System Scripts
File System Scripts
1) Create a Folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Jigargosai"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.CreateFolder(strDirectory)

2) Delete a Folder

Set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.DeleteFolder("E:\Jigargosai")

3) Copying Folders

Set oFSO=createobject("Scripting.Filesystemobject")
oFSO.CopyFolder "E:\gcr", "C:\jvr", True

4) Checking weather the folder available or not, if not creating the folder

Option Explicit
Dim objFSO, objFolder, strDirectory
strDirectory = "D:\Jigargosai"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(strDirectory) Then
Set objFolder = objFSO.GetFolder(strDirectory)
msgbox strDirectory & " already created "
else
Set objFolder = objFSO.CreateFolder(strDirectory)
end if

5) Returning a collection of Disk Drives

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set colDrives = oFSO.Drives
For Each oDrive in colDrives
MsgBox "Drive letter: " & oDrive.DriveLetter
Next

6) Getting available space on a Disk Drive

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oDrive = oFSO.GetDrive("C:")
MsgBox "Available space: " & oDrive.AvailableSpace

File System Operations

File System Operations

File System:

By Jigar Gosai
Email: jigar.gosai@gmail.com


Its an operating system feature, it allows users to create, modify,
view and delete; drives,folders and files

VB Script is providing an object called scripting.filesystemobject
and some methods for performing file systems operations

Syntax for creating file system object:

Set variable=createobject ("scripting.filesystemobject")

Examples:

'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
fso.CreateFolder(strFolder)

'Create a folder
Dim fso, strFolder
strFolder="D:\Documents and Settings\jigargosai\Desktop\smvs"
Set fso=createobject("scripting.filesystemobject")
If fso.FolderExists(strFolder) Then
msgbox "Folder already exists"
else
fso.CreateFolder(strFolder)
End If

By Jigar Gosai
Email: jigar.gosai@gmail.com