Tuesday, May 04, 2010

QTP QnA1

1. How do you handle exceptions in QTP?

By using Recovery Scenario Manager

2.What are the different kind of exceptions that can we handle?

1. pop Window
2. object State
3. Test run error
4. Application crash

3.What is Library file ?
Library of user defined functions that you want to call frequently from other test . When you load a script its functions are automatically compiled and remain in memory, you can call that directily. Extension of the LIBRARY file is file_name.VBS

4.How do you call Actions from main script?
In the Expert View, an action called by another action is displayed within the parent action with the following syntax:

Call RunAction (ActionName, Run_Setting, FromRow - ToRow)

For example:

Call RunAction("Select Flight", 0, "1 - 1")

5. How do you call function in the library file?

First execute the library file Using EXECUTEFILE method then call the function which is in that library.


6. What the getROProperty and getTOProperty method will do?

Gets the value of RUN-TIME OBJECT property value

Example:getROproperty(background) this would give you the background color of the object

getTOProperty : - Gets the value of Test OBJECT property value