1. how can you handle exceptions without using recovery
scenario?
Answers were Sorted based on User's Feedback
Answer / narender reddy alala
by using "on error resume next" we can handle exceptions
| Is This Answer Correct ? | 8 Yes | 0 No |
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 |
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 |
Answer / dinesh
using the optionalstep method we can handle the error.
| Is This Answer Correct ? | 0 Yes | 0 No |
how to write script in qtp(vbscript)..i mean with out application deployed..and how to call script1 into script2?
8 Answers INCA, Infosys, Logix, SLK Software, Symphony, Wipro,
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.
What is the standard timing delay for web based application in qtp?
If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened. What would be Descriptive programming for this in QTP using VB Script..??? Please send your answers.
can any body pls mail me latest FAQ's in QTP to my mailid btrintra@gmail.com....Thanks in advance
how to get the data from a winedit box in vb scripting and store it in a variable if data contains "_"(i.e data is TEST_1)
What scripting language is QTP of?
How to covert a String to an integer?
whow much strong on VB and C?
Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?
i have read that "non-reusable actions can not be called in any other test".but in 'call to copy action' copies non-reusable action in other test also..can u pls help to understand this..
what do you call the window testdirector-testlab?