VBScript and QuickTest Professional Fundamentals

Test your knowledge of VBScript programming and QuickTest Professional (QTP/UFT) automation testing concepts including object repositories, checkpoints, arrays, and scripting fundamentals

20 Questions Published

Questions

Question 1 True/False

Object repository comparison and merger tools can be found under Quick Test’s tools menu. State true or false

  1. True
  2. False
Question 2 Multiple Choice (Single Answer)

How many checkpoint types are supported by Quick Test?

  1. 6
  2. 8
  3. 9
  4. 5
Question 3 Multiple Choice (Single Answer)

How many output value types are supported by Quick Test?

  1. 6
  2. 8
  3. 9
  4. 5
Question 4 Multiple Choice (Single Answer)

What is the statement that can be used to make VB Script, mandate variable declaration?

  1. Option Declare
  2. Option Explicit
  3. Option Mandate
  4. None
Question 5 True/False

In VB Script, variables cannot be declared to a specific data type. State true or false

  1. True
  2. False
Question 6 Multiple Choice (Single Answer)

Figure out the issue in the piece of code below Dim arr(5) s = 10 Redim arr(s)

  1. Code above is perfectly valid
  2. Redim size is invalid
  3. Cannot redim a static array
  4. None
Question 7 True/False

VB Script is case sensitive. State true or false

  1. True
  2. False
Question 8 Multiple Choice (Single Answer)

What is the method that can be used to retrive a run time value of any object, say a user input value?

  1. GetTOProperty
  2. SetTOProperty
  3. GetROProperty
  4. None
Question 9 True/False

Output values cannot be used to perform validation checks. State true or false

  1. True
  2. False
Question 10 Multiple Choice (Single Answer)

What is the keyword that is used to retain the previous values, when we redim a dynamic array to different sizes?

  1. Redim Retain arr(s)
  2. Redim Preserve arr(s)
  3. Redim Persist arr(s)
  4. Redim CarryForward arr(s)
Question 11 Multiple Choice (Single Answer)

When we create a 2 dimention array, an element in the created array can be referenced by how many indices?

  1. 2
  2. 1
  3. 3
  4. No index is required for referencing an element in a 2D array. Index is applicable only for 1D arrays.
Question 12 Multiple Choice (Single Answer)

To assign an object reference, what is the keyword that is used?

  1. Ref
  2. Obj
  3. Set
  4. None of the above
Question 13 True/False

Regular expressions can be applied to object repositories. State true or false

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

Which is the deprecated version of loop?

  1. While … Wend
  2. Do While … Loop
  3. Do Until … Loop
  4. VB Script doesn't have any deprecated loops at all.
Question 15 True/False

In places of 'For Each … Next loop', conventional For loop cannot be used, to iterate through collections . State true or false.

  1. True
  2. False
Question 16 Multiple Choice (Single Answer)

Predict the output:

Set r = New RegExp 
r.pattern = “ion$” Msgbox r.test(“consideration”)
  1. false
  2. true
  3. ion
  4. consideration
Question 17 True/False

Subroutines do return values, whereas Functions do not. State true or false

  1. True
  2. False
Question 18 True/False

Local repositories cannot be associated to a test, using Resources menu. State true or false

  1. True
  2. False
Question 19 Multiple Choice (Single Answer)

Predict the output

Set objEdit = Description.Create 
objEdit(“micclass”).Value = “Link” 
objEdit(“name”).Value = “username” 
Browser(“...”).Page(“...”).WebEdit(objEdit).Set “test_user_name”
  1. The code is perfectly valid. It sets the specified value in the web
  2. ) name property is incorrectly defined for the link object
  3. Syntax of Description object is incorrect
  4. Defined link object is incorrectly used as an edit box object. Hence issuing a Set method is invalid
Question 20 True/False

Send Keys can be used to redirect some keystrokes to any application that has the focus. State true or false

  1. True
  2. False