Posts: 5
Threads: 1
Joined: Sep 2009
Reputation:
0
09-02-2009, 07:58 PM
Hello everyone,
I am a newbie here as well as a newbie in using QTP. I got everything to work the way I wanted except for one thing. I would like for QTP to automatically send me an alert message via email when it detects hanging on a web page or detects error during testing/validating the website/ web page.
I have dug through this site and only showing the send mail codes (which I already got that).
Thanks,
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
09-02-2009, 08:02 PM
Are you able to capture the condition when a web application hangs ? If yes, In you failure reporting condition call the function to send email. For eg :
Code:
If err.Number <> 0 Then
Reporter.ReportEvent micfail " Error Captured", "Error Reporting"
Call SendMail() ' This will send the email when it reaches a failure reporting
End If
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Sep 2009
Reputation:
0
09-02-2009, 08:35 PM
Thanks for the quick response and help. I am wondering about capturing the condition too. How do I do that with QTP?
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
09-02-2009, 08:37 PM
Have you heard about "On Error Resume Next" and Recovery Scenarios ? Try to search for them in this forum and you will get several examples.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Sep 2009
Reputation:
0
09-02-2009, 08:50 PM
Thanks. Like I've said, today is my second day using this tool and this site. Still reading the documentation sent to me but so far documentation is for installation only. Nothing technical and such provided. I am sure in no time I'll be able to utilize this tool to its fullest.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
09-02-2009, 09:07 PM
Dont you worry. It is a matter of time before you will reap its benefit. Try to grasp as much as possible from the forum. It is one good knowledgebase.
Everyone was you sometime ago....You will be what everyone is in no time... Good Luck Mate.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Posts: 5
Threads: 1
Joined: Sep 2009
Reputation:
0
09-03-2009, 02:39 AM
Hey I got it figured out. I got QTP to automatically send me email when it detects error/ at a stopping point etc.
Appreciate the tips!!!!!