1. how can you handle exceptions without using recovery
scenario?

Answers were Sorted based on User's Feedback



1. how can you handle exceptions without using recovery scenario?..

Answer / narender reddy alala

by using "on error resume next" we can handle exceptions

Is This Answer Correct ?    8 Yes 0 No

1. how can you handle exceptions without using recovery scenario?..

Answer / baba

Hello buddy,

If the Error is predictable... You know that Test Script
has an error, while running the script the error will come.

Here, you can use "On Error Resume Next"

On Error Resume Next
Err.Raise 6 ' Raise an overflow error.
MsgBox "Error # " & CStr(Err.Number) & " " & Err.Description
Err.Clear ' Clear the error.

here
e.g.
On Error Resume Next
msbox "Hello"
Msgbox err.number&err.description

try this it will give one "Number and Description" output
you submit in 1st code given by me instead of 6.

If Any Unpredictable Errors/Events occur You cannot guess
where and when they will come. then you should go for the
Recovery Scenario Manager.

Thanks & Regards
Baba.D contact kingring.d@gmail.com

Is This Answer Correct ?    8 Yes 0 No

1. how can you handle exceptions without using recovery scenario?..

Answer / pankaj sharma

We can also use cases if the points where error is suppose
to throw .
like
if Err.Number = 12 then
systemutil.closeprocessbyname "processname"
call function()
end if

To discuss more about this or some other topic please visit
http://quality2deliver.blogspot.com/

Is This Answer Correct ?    0 Yes 0 No

1. how can you handle exceptions without using recovery scenario?..

Answer / dinesh

using the optionalstep method we can handle the error.

Is This Answer Correct ?    0 Yes 0 No

1. how can you handle exceptions without using recovery scenario?..

Answer / vengi

by using on resume next

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More QTP Interview Questions

what will be there in keyword view and expert view?

2 Answers  


i want to handle all the unwanted pop up through QTP i done that with recovery scenario but it need some title of pop up but i want that it should handle all the pop up even i don't give the title of that pop up in recovery scenario is there any general way to handle all the pop up please help

3 Answers  


Give me the Example of standard check point and text check point with syntax?

3 Answers   IMI Soft, IMI Soft Engineering,


How do Parameterization and Data-Driving relate to each other in QTP?

0 Answers  


What is the syntax for how to call one script from another?

0 Answers  






HI, Anybody can explain Automation Test Framework...and wht do we do before start of Automation.....

5 Answers   Polaris, Siemens,


how to automate standalone infopath forms using QTP? (it is not a dotnet or a web form)

1 Answers   ABC,


when we apply the daily build each and every day,the property may change in the application.so that the created script is not reusable in winrunner and qtp.for ex for date field it is taken dtpicker.at another time it is taken some other name.how can i solve it.

0 Answers  


How to use Environment parameterization? Explain with an example.

0 Answers  


How to create a standard checkpoint ?

0 Answers  


what type of scripts are asked in qtp?

2 Answers  


. My application is updating the user information in the application. Every time it is Adding on record in my application and Validating the information like “Record has added successfully”. Which Check point I have to put in this situation? Why?

5 Answers   Polaris,


Categories