How to face Interview Questions in QTP

Share This Post -

Note – These are the General QTP Questions which are applicable to all QTP Versions.

Q. What are test objects?
Test objects are objects created and maintained by QTP in its object repository. Each test object has a name and a set of properties to uniquely identify the actual object in the application.

Q. how does QTP identifies the objects during the script run?
During script run QTP searches for a run-time object that has the similar description of the test object in the object repository.

Q. How can i check the properties of an object in an application without using checkpoints? For Example how will you check whether a button is enabled?
Answer: GetROProperty method is used to retrieve the properties of the object in an application.It is very useful method and can be used to retrieve almost any of the property that can be seen while spying the object with object spy. For Example‘To get whether button is enabled or not.

Val = Browser("QA Friends").Page("QA Friends"). WebButton("Login"). GetROProperty("disabled")

‘To get whether a checkbox is on or off.

Val =Browser("QA Friends").Page("QA Friends").WebCheckBox("Test").GetROProperty("Value")

Q. How can I modify the properties values of test objects in Object Repository during runtime?
A. You can use SetTOProperty method of test object.Object(description).SetTOProperty Property, Value - The values of test object properties are used to identify the objects. Sometimes the properties of the object in the application change dynamically. For example text of a link in a webpage is the username used to login to that page.Text property is used by test object to identify the link. So in order to identify the actual object we can manipulate the value of “text” property of link using SetTOProperty.


Q. How do you synchronize your scripts in QTP?
A. For waiting until navigation of web page completes we can use Sync method. For waiting until an object appears we can use Exist method. For waiting until a property of object changes we can use WaitProperty method. You can set browser navigation timeout in: Click Test > Settings menu Select web tab in Test Settings window. Enter the timeout in Browser Navigation Timeout text box. You can set global object synchronization timeout in: Click Test > Settings menu Select Run tab in Test Settings window. Enter the timeout in Object Synchronization Timeout text box.


Download the complete Document from here.

This is a .pdf file. Open this file in Adobe Acrobat Reader.


Related Posts:

QTP Interview Questions in IBM

QTP Interview Questions for Beginners - Part 1

QTP Interview Questions Set 1

QTP Interview Questions Set 2

QTP Interview Questions Set 3

QTP Interview Questions Set 4

QTP Interview Questions Set 5

QTP Interview Questions Set 6

QTP Interview Questions Set 7

QTP Interview Questions Set 8

QTP Interview Questions Set 9

QTP Interview Questions Set 10

QTP Interview Questions Set 11

QTP Interview Questions Set 12