Micro Focus QTP (UFT) Forums
QTP Error message - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP Error message (/Thread-QTP-Error-message)

Pages: 1 2


QTP Error message - eroshan - 09-07-2009

I want to write a small script to click Run error window s's Retry button , if it appears in between my running script, How should i do that ? Smile


RE: QTP Error message - Saket - 09-07-2009

Do you mean to say - QTP's dialog where it asks for retry or skip oe stop...?


RE: QTP Error message - basanth27 - 09-07-2009

Use the On Error Resume Next Feature.


RE: QTP Error message - Saket - 09-07-2009

I think On Error Resume next will 'skip' the statements and will not do the retry.
eroshan - I would like to suggest you to do not try to click on 'retry' on QTP's dialog,
workaround can be done through a do while loop with a proper condition as per the requirement.


RE: QTP Error message - basanth27 - 09-07-2009

On Error Resume next Supress's the Error Window which QTP generates during a local Run Session. There is no Way to click on any of the buttons on the Error Window which is qtp generated. Retry is Out of question from the error dialog.


RE: QTP Error message - manabh - 09-07-2009

@ Basanth- I think you are mis-leading the question.
It's true that this dialog cann't be handled through QTP, but we can handle this dialog/click on expected button using API programming, if it is that much essential. As a good practice we should avoid using "On Error Resume Next" untill & unless it is required.


RE: QTP Error message - basanth27 - 09-07-2009

Manoj - What do you mean by Mis-Leading ?? Can you point out the part which i have Mislead ??

API Programming - On QTP Dialog. Give Me a break !!! dont break the tool use it. The error dialog is not meant for your fancy error handling methods. I am fully aware you can do multi-million things using API programming but dont use it to an extreme.

On Error Resume Next - You must be the first nerd to tell me that it is not a good practice. Have you ever seen any good working functions which are not written with a error handler "On Error Resume Next" ?

I simply dont understand your meaningless points here. Next time, Give a few mins of thought and then reply.


RE: QTP Error message - manabh - 09-07-2009

Quote:Manoj - What do you mean by Mis-Leading ?? Can you point out the part which i have Mislead ??
You are side-lining the original question & just replying on the replies
Quote:API Programming - On QTP Dialog. Give Me a break !!! dont break the tool use it. The error dialog is not meant for your fancy error handling methods. I am fully aware you can do multi-million things using API programming but dont use it to an extreme.
It was for your statement "There is no Way to click on any of the buttons on the Error Window which is qtp generated. Retry is Out of question from the error dialog." nothing is impossible if you wish to do it.
Quote:On Error Resume Next - You must be the first nerd to tell me that it is not a good practice. Have you ever seen any good working functions which are not written with a error handler "On Error Resume Next" ?
If you think always using this statement is a good practice ....then you are the first insane person Please read correctly what I have written.
Quote:As a good practice we should avoid using "On Error Resume Next" untill & unless it is required.
I have never said Never to use this statement, use only if it is required.
FYI: Like a Try/Catch block, whenever we are expecting any error/exception, we should use it, no doubts. But if you are putting your whole code under this statement, then you have to rethink about your "nerd" statement.
There are some unwritten protocols, that only "WISE" can follow
Quote:I simply dont understand your meaningless points here. Next time, Give a few mins of thought and then reply.
I think my first point will clear out who is putting "meaningless" points


RE: QTP Error message - basanth27 - 09-07-2009

Signalling a End. This is not in the Spirit of the Forum.
Just in case if you dont know how to use the "On Error Resume Next", Nobody would use that piece of line without, Err.Description & Err.Number.


RE: QTP Error message - Ankur - 09-08-2009

Request everyone to refrain from personal attacks. There can always be differences of opinion but instead of attacking the person, point out the problems with someones post (with due research done). On this forum we have always strived to keep a balance of professional and stern cum polite behaviour and we would continue to do so.

If at all, attack the problem posted by OP. Smile

btw, I am wondering won't recovery scenario help in this situation? I remember one of the post-recovery operations is to re-run the step.