Sorry for the barrage of questions am putting across. But can't help it.I want to ask how many different ways we can handle error generated during the test run. I mean i want someone to put me across the Error hadling methods in QTP.
There are several ways to catch errors. They each depend on the type of error. Thare application errors, OS errors, netowrk errors, script errors, error trapping on function calls. What kind of errors do you want to catch? They all usually involve and if...then statement where you actually have to test for the error.
Just thought of something else... If you are using a current version of (QTP 6.5 or higher) then read up on Rcovery Scenarios. You can create progressively more comprehensive error handlers, like if a button click fails to clear an error box then reboot the machine and restart the test.
Please don't Hijack irrelevant threads. You stand more chane of getting your question answered with a new thread. Anyways try the code below:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">myOS = Environment("OS"
myOSVersion = Environment("OSVersion"</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">
I'm not a complete idiot - some parts are missing.