Quality is delighting customers
Dear All
Please share your knowledge regarding following question
1>How error are handled in QTP
2> Is it possible to use On error Goto 5 "specified line number "
3>will qtp supports this kind if error handling
i have code like this
On error goto errorhandle:
<code>
errorhandle:
msgbox "found error"
Finish
Please shared your knowledge on this ,,
thanks for your reply....
Tags:
pls refer below link
http://www.softwaretestinggenius.com/hotarticles.php?mode=details&a...
regards
Venkatesh.M
Hi,
In order to handle this issue,QTP provides "err" Object.
err.number retunrs error number
err.description returns the description abt error.
ex:
on error resume next 'to enable error description
1.msgbox "hi"
2.msgbox "hi hi"
3.saywelcome
4.msgbox "hi hi hi"
5.function saywelcome
6.msgbox "welcome"
7."to new world"
8.msgbox "error number is "&err.number &"error description is..."&err.desciption
9.end function
10.on error goto 0 'which is used to to disable error handling
check it once
Regards Suresh
In Qtp error handling can be done by Recovery scenario and on erro resume next
but i have a doubt where exactly we use recovery scenario and where exactly we use on error resume next.
please share ur feelings
Hi Suresh,
Recovery Scenario can be used to handle unexpected errors during runtime
On error resume next can be used to handle expected errors during runtime
Mythri
For Error Handling in QTP you watch the below Link:
© 2022 Created by Quality Testing.
Powered by