Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to close QTP session automatically if any runtime error occurs
#1
Not Solved
Hi,

We are using QTP(Ver.9.5) for testing our Oracle 10g based product (Forms and Reports). I created many test cases and the cases are calling as a batch. Many batches are called in order through VB script (.vbs file).

My problem is if any test case is stopped with an Oracle error or a QTP runtime error, I have to log the error and QTP should continue with next batch automatically. Now, the Oracle error has been handled but when a QTP runtime error occurs, it stops there.

My requirement is if any QTP runtime error occurs, it should not stop there and should continue automatically by closing the error QTP session and its related opened Web based windows of Oracle.

Could you please advise me in this issue ?

[/align]Thanks in advance,
Remesh
Reply
#2
Not Solved
Hi ,
Well u can use this code:
use this below mentined code after nameing ur function
Code:
public function abc()

on error resume next
some code
.
.
.
at the end use thsi
if err.number<>0
reporter.reportevent micfail, err.number,err.description
else
reporter.reportevent micpass,"None of the Runtime Error occoured"
end if

if u use this code ur runtime error will be locked and ur Execution will not stop for sure.

Regards,
Amit
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to Close UFT 14.53 through AOM Object y.srihari 1 2,424 12-26-2019, 08:43 PM
Last Post: y.srihari
  UFT 14.03 getting closed automatically after invoking UFT 14.03 khwaja.abbas@gmail.com 1 1,365 07-24-2018, 02:44 PM
Last Post: Ankur
  Rcovery Scenario @Runtime Load Showing Error UrmilaSaha 0 1,348 03-24-2017, 09:08 PM
Last Post: UrmilaSaha
  Close Tab Recognizes GetROProperty. WHY??? Ayesha 5 4,171 07-24-2013, 10:39 AM
Last Post: vinod123
  QTP crash during runtime. vidhu 3 3,844 07-11-2013, 03:42 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)