QTP Automation Quiz

28 Questions | Attempts: 639
Share

SettingsSettingsSettings
Automation Quizzes & Trivia

This test contains roughly 20 randomly selected QTP questions.


Questions and Answers
  • 1. 

    Please fill in the piece of code that is missing: If  Window("Warehouse Inventory Movement").Dialog("Message_1").Exist                 Window("Warehouse Inventory Movement").Dialog("Message_1").WinButton("OK").Click                 Reporter.ReportEvent 0, "Item Inventory message", "The Item Inventory message appeared as expected." End If

    Correct Answer
    Then
    then
  • 2. 

    Please fill in the piece of code that is missing: Reporter.Event 0, "Perform Movement message", "The Perform Movement message appeared as expected."

    Correct Answer
    Report
    report
  • 3. 

    Please fill in the piece of code that is missing: BRANCH Window("Warehouse Inventory Movement").WinComboBox("Branch ComboBox").GetROProperty("all items")

    Correct Answer
    =
  • 4. 

    Please fill in the piece of code that is missing:Window("Order Management")WinButton("Add").Click

    Correct Answer
    .
  • 5. 

    Please fill in the piece of code that is incorrect:If  BACKORDER_ITEM1_ITEM_PRICE >< Backorder1_Amount Then Reporter.ReportEvent 0, "Backorder Amount on 1st Order", "The Backorder amount is correct." Else    Reporter.ReportEvent 1, "Backorder Amount on 1st Order", "The Backorder amount is not correct. It is displaying " & Backorder1_AmountEnd If

    Correct Answer
    =
    >
    <>
    <
  • 6. 

    Variables in QTP can be declared explicitly and implicitly.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 7. 

    Objects stored in a Local Object Repository are available to all actions and tests.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 8. 

    If there is a same name object in both the Local Object Repository and in the Shared Object Repository associated to the same action, the action uses the local object definition.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 9. 

    In the following syntax WaitProperty is a: Window(“Flight Reservation”).ActiveX(“Panel Control”).WaitProperty

    • A.

      Object

    • B.

      Method

    • C.

      Variable

    • D.

      Parameter

    Correct Answer
    B. Method
  • 10. 

    If you have repeatable steps in a test or an action then you could us a:

    • A.

      CheckPoint

    • B.

      Synchronization

    • C.

      User Defined Function

    • D.

      Operation

    Correct Answer
    C. User Defined Function
  • 11. 

    Identify the Syntax errors: Window(“Flight Reservation”).WinComboBox(“Fly From”).Set “Denver”

    Correct Answer
    Set is not a valid Method for a WinComboBox Object. Window(“Flight Reservation”).WinComboBox(“Fly From”).Select “Denver”
  • 12. 

    Method GetROProperty:

    • A.

      Checks whether the specified text string is comtained in the specified window area.

    • B.

      Returns the current value of the test object property from the object in the application.

    • C.

      Returns the collection of properties and values used to identify the object.

    • D.

      Returns the text from the specifies area.

    Correct Answer
    B. Returns the current value of the test object property from the object in the application.
  • 13. 

    Identify which value is not a type of action:

    • A.

      Non-reusable

    • B.

      Reusable

    • C.

      External

    • D.

      Internal

    Correct Answer
    D. Internal
  • 14. 

    Actions make it possible to parameterize and iterate over specific elements.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 15. 

    Identify the Syntax error:s1 = parameter(in_al_1)

    Correct Answer
    Double quotes are required. s1 = parameter(“in_al_1”)
  • 16. 

    Which information is not displayed in keyword view.

    • A.

      Operations

    • B.

      Comments

    • C.

      Actions

    • D.

      Item

    Correct Answer
    C. Actions
  • 17. 

    Window(“Title:=Login”).WinEdit(“AttachedText:=Agent Name:”).Set “sachin”is an example of:

    Correct Answer
    Descriptive Programming
  • 18. 

    The SystemUtil object allows you to:

    Correct Answer
    Open and Close Applications
  • 19. 

    Bitmap Checkpoint lets you check the property value of a web page or application.

    • A.

      True

    • B.

      False

    Correct Answer
    B. False
  • 20. 

    Using the SetNextRow Method you can set a row that contains at least one value.

    • A.

      True

    • B.

      False

    Correct Answer
    A. True
  • 21. 

    From the syntax below identify which DataTable sheet and row will be set.   DataTable.GetSheet(1).SetCurrentRow(3)

    Correct Answer
    The third row of the global sheet.
  • 22. 

    What will the MyVar contain when the code is ran:             Dim MyVar, pi            pi = 3.14159             MyVar = Round(pi, 2)  

    Correct Answer
    3.14
  • 23. 

    Identify the syntax errors:               Dim Color             Sub ChangeBackground (Color)                         MyVar = lcase (Color)                         Select Case MyVar                                     Case "red"     document.bgColor = "red"                                     Case "green"   document.bgColor = "green"                                     Case "blue"    document.bgColor = "blue"                                     Case Else      MsgBox = "pick another color"             End Sub  

    Correct Answer
    MyVar is not declared, End Select statement was removed, Equal sign added to MsgBox. Dim Color, MyVar Sub ChangeBackground (Color) MyVar = lcase (Color) Select Case MyVar Case "red" document.bgColor = "red" Case "green" document.bgColor = "green" Case "blue" document.bgColor = "blue" Case Else MsgBox "pick another color" End Select End Sub
  • 24. 

    What will MyString contain when the code is ran:               Dim MyString             MyString = Len("The big bug hunt")

    Correct Answer
    16
  • 25. 

    What does the below code demonstrate:   Set WshShell = createobject("WScript.Shell")                         WshShell.SendKeys "{ENTER}"                         Set WshShell = Nothing                         Wait(4)

    Correct Answer
    Sends one keystroke (Enter) to the active window and waits 40 seconds before continuing.
  • 26. 

    Please fill in the piece of code that is missing:Window("Warehouse Inventory Movement").WinComboBox("Branch ComboBox").GetROProperty()

    • A.

      "All Items"

    • B.

      All Items

    • C.

      Enabled

    • D.

      'Enabled'

    • E.

      The Code is correct

    Correct Answer
    A. "All Items"
  • 27. 

    Please fill in the piece of code that is missing:Window("Warehouse Inventory Movement").WinButton("Item Inventory")

    • A.

      ,Click

    • B.

      Click

    • C.

      .Click

    • D.

      .micclick

    • E.

      None of the above

    Correct Answer
    C. .Click
  • 28. 

    Please fill in the piece of code that is missing:wait()Cust_PO = Window("Order Management").WinEdit("Footer - Cust PO").GetROProperty("enabled")

    • A.

      "disabled"

    • B.

      .Click

    • C.

      1

    • D.

      The Code is correct.

    • E.

      .Activate

    Correct Answer
    C. 1

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Jan 07, 2013
    Quiz Edited by
    ProProfs Editorial Team
  • Sep 23, 2009
    Quiz Created by
    QTPTest
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.