Selenium Interview Questions

In this tutorial, we have listed the top 50 most commonly asked Selenium Interview questions including Selenium IDE, Selenium RC, Selenium Grid and Selenium WebDriver interview questions.

QTP Interview Questions - Part 1 !!!





[1]. Which environments are supported by QTP?

    QTP supports the following environments.


  • Active X 
  • People Soft
  • Terminal Emulator
  • Java
  • Siebel
  • .Net
  • Web
  • Visual Basic
  • SAP
  • Web Services
  • Visual Age
  • Oracle
  • Stingray
  • Power Builder


[2]. What are the Object Repositories supported by QTP?

QTP supports 2 types of Object Repositories.

01.Local Object Repository/ Per Action Object Repository

Local object repository is used by default. The file extension of local object repository is ".mtr"

02.Shared/ Global Object Repository:

Shared object repository is preferable while dealing with dynamic objects which are called in multiple tests. The file extension of shared object repository is ".tsr".

[3]. Can we call QTP test from another test using scripting?

Yes. We can call QTP test from another Test using scripting. To do this, we need to make the actions in the corresponding scripts re-usable. Then we can make call from the destination script.

[4]. What is action split and the purpose of using this in QTP?

Action split is used to divide the selected action into 2 parts. The main purpose of dividing the action to improve code re-use.

[5]. How QTP identifies Object?

QTP identifies any GUI object based on its corresponding properties. While recording, QTP will identify and store peculiar properties as defined in Object identification Settings[i.e., mandatory and assistive properties] in the object repository of GUI object.

QTP will compare the stored property values against the on-screen object property values, to uniquely identify the GUI during Run Time.

Recovery Scenarios In QTP

We may come across some unexpected errors or exceptions during our test case execution. Consider the following scenario. Assume that after every step of the execution, we need to print the result.So, we need to call the printer from our script. Assume that the printer is out of paper.Obviously we will get the  message "Printer Out of Paper" pop up. This is an unexpected behavior results in test cases failure. So, we should have a mechanism to handle these type of unexpected behaviors.To handle these type of unexpected behaviors we have recovery scenarios in QTP.

We can use "On Error Resume Next"  or "if step" in our script if we know the exact place in which the exception occurs every time based on the scenario.But sometimes we can't handle the above mentioned scenario directly in test cases. Because we don't know that the time taken by network  to respond when the printer is out of paper. By that time the script could have crossed the step which handles the unexpected behavior. So, our test case will fail. In such conditions,it's always better to use recovery scenarios.

The main important to remember when using the recovery scenarios are as follows.

Trigger Event: Trigger the event which causes the script execution interruption.For example, we can say that the pop up which displays the printer out of paper message.

Recovery Option: The operations to be performed to enable QTP to continue the script execution.As per our example, we need to clock on "OK" button in the pop up window which causes the script interruption.

Post Recovery Operation: The operation which represents the actions to be performed after recovery. It means that from which step script execution to be started. For example, we can restart the test execution from beginning or skip the step which causes interruption.

Recovery scenarios will be stored with the file extension ".rs".A recovery scenario file is a logical collection of recovery scenarios, grouped according to your own specific requirements. By default, QTP checks for recovery triggers when an error is returned during the run session. You can use the Recovery object's method to force QTP to check for triggers after a specific step in the run session. 
For the complete list of recovery scenarios go to QTP Documentation > Quick Test Advanced References > Quick Test Automation > Recovery Object.