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

For ex we are doing automate testing in that can we do some part of application recording, some part descriptive programing and some part general VB scripting like that .............

3 Answers   Satyam,


Can anyone help.i need total excelsheet operations,shortcuts in testing environment from starting onwards....

0 Answers  


what is run-time object in qtp? explain with example?

2 Answers  


What is action required by QTP if a popup message is coming in exsisting script and now it is not coming. The script is having code to deal with popup message now when we run the script now the popup i snot coming according to new build, instead of changing the code what we can do?

7 Answers   Verizon,


write a vb script to print even numbers from 1-50?

6 Answers   Kclink Technologies, Logica CMG,






Where we can use the analog mode and where we can use the low – level mode?

0 Answers  


What is FRAME WORK? How many Frameworks can QTP supports?

4 Answers  


can anyone please tell me what are all the shortcut keys used for qtp9.2? Thanks in advance..i expect ur valuable reply that help us our team???

1 Answers  


How to retrive data from a data table which is in 3rd row,4th column and place it in main script..like retrive name,date from data table..write script for this.

11 Answers   Thatavarti Technologies,


HI How to take screenshots of a Webpage and saving it in a external word document using QTP.

4 Answers   3i Infotech, TCS,


can anyone proide me reading material on svit00ef27@yahoo.com please thanx in advance

2 Answers  


What are the different scripting languages you could use when working with QTP ?

6 Answers  


Categories