09-07-2009, 04:09 PM
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 ?
QTP Error message
|
09-07-2009, 04:09 PM
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 ?
09-07-2009, 04:12 PM
Do you mean to say - QTP's dialog where it asks for retry or skip oe stop...?
09-07-2009, 04:21 PM
Use the On Error Resume Next Feature.
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.
09-07-2009, 04:41 PM
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.
09-07-2009, 04:57 PM
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.
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.
09-07-2009, 05:08 PM
@ 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.
09-07-2009, 05:27 PM
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.
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.
09-07-2009, 08:59 PM
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
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.
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.
09-08-2009, 01:36 AM
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. 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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
|
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Help for instruction to click on Skip button in the warning message | vijilesh | 0 | 1,556 |
09-16-2018, 03:48 PM Last Post: vijilesh |
|
recovery scenario for closing a message box itself | ashima | 0 | 2,249 |
12-26-2013, 11:10 AM Last Post: ashima |
|
message box,need to put code in fn library | diya | 6 | 4,022 |
12-05-2012, 10:52 AM Last Post: diya |
|
How to use recovery scenario, if error message appears at status bar | kamal262007 | 5 | 4,821 |
10-04-2012, 10:58 AM Last Post: Ankesh |
|
Error message 'Invalid Arguments ' | sandeephc | 3 | 4,261 |
06-26-2012, 11:34 AM Last Post: Ankesh |