How to instruct QTP to display errors and ther description in the test results instead of halting execution by throwing error in the mid of execution due to an error(for example Object not found)?

Showing Answers 1 - 13 of 13 Answers

Pradeep

  • Oct 21st, 2005
 

Hi

Use Recovery senarios to accomplish that.

  Was this answer useful?  Yes

Santaji Nanavare

  • Oct 26th, 2005
 

Use Exception Handling technique of QTP: can be achieved by any one of the following two methods:1. Using Recovery Scenario Manager2. scripting by using :if-else-then OR Select Case

  Was this answer useful?  Yes

Imrana

  • Oct 28th, 2005
 

I have the same problem. However, My issue deals with waiting for an object. I'm not a programmer. How can I manipulate the Wait function to wait without me having to specify the seconds. For instance in Rational Functional Tester, I used to use wait.untilExistence.

  Was this answer useful?  Yes

Wasim

  • Nov 10th, 2005
 

Make use of Reporter.Reportevent eg.

var=statement

if var="True" Then

Reporter.Reportevent 0,"Step Name","Description of the Passed step"

else

Reporter.Reportevent 1,"Step Name","Description for the failed step"

End If

I hope thats it :)

Mercy

  • Jan 17th, 2006
 

"How to instruct QTP to display errors and ther description in the test results instead of halting execution by throwing error in the mid of execution due to an error(for example Object not found)?"

 

For all of u who've added their comments to this questions, i request u read the question once more very carefully.

 

It clearly demands that the script should not halt in between the execution if any error occurs. In this case, the only solution is to use "Optional Step" statement. Using this statement, QTP will reflect a Warning message in the Test Results Page and just continues running the next line of the script. Please refer QTP help for more information on this.



Deepak Kumar

  • Sep 30th, 2006
 

'I use the following code to wait for the java report object to get loaded before validation of the report can start:

Report = Browser.Page.Frame.JavaApplet.JavaObject.Object

Do

Until (Browser.Page.Frame.JavaApplet.JavaObject.Object.Exist

' Let me know if this code slows down the application run speed. I have an alternative code to use as well. Thanks.

  Was this answer useful?  Yes

sri

  • Apr 9th, 2007
 

There is a option Test->settings->goto RUN tab select proceed to next step in when error occurs during run session. Then u will escape fromthe error without doing any programming.

  Was this answer useful?  Yes

Hi,

I want to dispaly the error description and result value in the reporter event
i tried to display using this code

if cnt = j then

reporter.reportevent 0, "Result Pass" &cnt & "Selected"

else

reporter.reportevent micfail, "Result Fail" & j & "only selected"

end if

Here i want to display the some value mid of the two strings ]
how i display,
Plz help me

Regards,

Punitha.

  Was this answer useful?  Yes

Nagaraju

  • Jul 21st, 2014
 

Hi Punitha,

You can use variable value in reporter event as below:
Reporter.ReportEvent micPass,"Result Pass" &cnt, "selected"


Code
  1. span style="color: #ff0000;">"Value""Customer""has been Created Successfully"

  2.  





Thanks,
Nagaraju

  Was this answer useful?  Yes

Suresh

  • Feb 21st, 2015
 

On Error Resume Next
your code
reporter.reportevent micFail,"error", err.description
On Error GoTo 0

  Was this answer useful?  Yes

Suvendu

  • Apr 21st, 2015
 

Hi,
is there any alternative way to generate report in qtp without using reportevent method ?

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions