• +91 9723535972
  • info@interviewmaterial.com

QTP Interview Questions and Answers

QTP Interview Questions and Answers

Question - 71 : - What is the extension for a function library?

Answer - 71 : -

The extension is ‘.QFL’


Question - 72 : - What is the Action Conversion Tool?

Answer - 72 : -

It is an in-built tool provided by QTP to convert Actions into Business Process Components.

Question - 73 : - What is the standard timing delay for web based application in QTP?

Answer - 73 : -

The standard delay is 60 seconds. This is can be changed in Test Settigns.

Question - 74 : - What is SetToProperty?

Answer - 74 : -

SetToProperty changes property of an object stored in the Object Repository. However these changes are not permanent.

Question - 75 : - Give the syntax to import/export xls into QTP.

Answer - 75 : -

DataTable.ImportSheet “..\..\TestData\Input.xls”,1,dtGlobalSheet
DataTable.ExportSheet “..\..\Results\Output.xls”,”Global”

Question - 76 : - Can launch two instances of QTP on the same machine?

Answer - 76 : -

No. You can work with only single instance of QTP on the same machine. But QTP itself can work on multiple instances of the Application Under Test (AUT). Ex: QTP can handle multiple IE browser windows.

Question - 77 : - How would you export a Script from one PC to another in QTP?

Answer - 77 : -

We can make use of the “Generate Script” function available in Object Identification, Test Settings and Tools/Options tab to create a zip of the script at the source computer. These zip files then can be imported into QTP at the destination computer.

Question - 78 : - What is smart Identification?

Answer - 78 : -

Typically, if even one of the on-screen object property does not match the recorded object property. The test fails.

In smart identification, QTP does not give an error if the property values do not match, but uses Base filter and Optional Filter properties to uniquely identify an object. In Smart identification, if a property value does not match the script does not fail but it proceeds ahead to compare the next property. Smart identification can be enabled in Object Identification Dialog box.

Question - 79 : - Explain how to read registry key in UFT?

Answer - 79 : -

The example demonstrated here explains how to read registry key in UFT

‘Create a shell object

Set MyShell= CreateObject (“WScript.Shell”)

Read the value of key from the registry

RegValue =MyShell.RegRead (varpathofkey)

‘in above function we have to pass the path of key in registery’.

e.g. HKCU\software\ie\settings

msgbox RegValue

Question - 80 : - What are the ways in UFT to get system environment variables in UFT?

Answer - 80 : -

There are three ways to get system environment variables in UFT

Use the WSH shell object

Use WMI’s Win32_Environment Class
Read variables from the registry
Set myShell = CreateObject (“WScript.Shell”)

WScript.Echo myShell.ExpandEnvironmentStrings( "%PATHEXT%" )

myShell=Nothing,
The output will be .BAT;.CMD;.VBS;. VBE;. JS;. JSE

Other user variable, like TEMP, overwrite their system counterpart

Set myShell = CreateObject( "WScript.Shell" )

WScript.Echo myShell.ExpandEnvironmentStrings( "TEMP=%TEMP%" )

myShell=Nothing
The output will be

TEMP:C:\DOCUME~1\You\LOCALS~1\Temp


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners