|Re: Event Handler = Failed test case [message #788908 is a reply to message #788869]
||Thu, 02 February 2012 11:17
| Alexandra Schladebeck
Registered: July 2009
If both cases are correct, then it sounds like you need the reentry type "retry". This repeats the failed Test Step once the Event Handler has been executed.
You should choose a Test Step that ideally performs a check that will either be correct from the outset, or will be correct once the Event Handler has been executed. The check should reflect a situation that is correct - i.e. the one you require to continue.
TC: Deal with occasional overwrite dialog (for when saving asks if I want to overwrite the file)
- Check for non-existence of overwrite dialog (this is what I want to have)
--- if the dialog does exist (i.e. the check fails) then the Event Handler is activated. It can e.g. click "OK" in the window
--- once the Event Handler has been executed, the reentry type "retry" means that the originally failed Test Step is executed again.
--- now, the window is not there, so it is marked as successful.
If the dialog wasn't there in the first place, then the Test Step is marked as successful as well.
There is a cheat sheet on using Event Handlers, including a retry example. The documentation on the retry Event Handler is here.
Powered by FUDForum
. Page generated in 0.02273 seconds