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 |
What is the Diff between Image check-point and Bit map Check point?
I'm facing this problem while automating my application..its a web based apps.. In my application there are few webtables are displaying in the page.In the different cells there are links and action buttons.Problem is there is link in different web tables corresponding to one name.Hence the properties of the objects(say a link) are same except the x,y co ordinate of the object.So my script is not able to distinguish between the two links present in different cells of web tables with same name.Kindly help on this..
give me descriptive programing code sample flight application in qtp?
How can we use regular expressions for a table in web page, each cell in table having unique identification, Now I want to count number of rows in table and enter data in all cells of the table?
what is the difference between parameters and arguments?
Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.
How to invoke QTP through VBscript?Send me full code along with description of the code.Thanks in Advance
How to find which type of Framework is suitable for which type of application?
Do you know how to connect database? Can you tell me the procedures?
what are the principles of good testing scripts for automation?
How do u write a regular expression for date (dd/mm/yyyy) field?
how can you write a script without using GUI in QTP?