Here is my current problem.
I have a driver script, that executes test cases,
and i also have a Whenever event handler that is checking for unexpected error dialogs. Some of these error dialogs can be worked around, and some cannot.
If an error dialog is displayed that cannot be closed, id like the execution of the test case to be aborted, and the next test case executed.
So the program flow is:
- driver script
- - test case
- - - event handler
How can i make the event handler jump back to the driver script ?
If the error dialog cannot be closed it is probably an error so you could raise a VB error which aborts the test case and goes to the error handler of the driver script. In your driver script you can have an "on error resume next" so that the next run statement is executed. See the online help on function "raise" for details.
My understanding is with in the error handler you can call the driver function/script again but I have never done this so not 100% sure. So you might be able to do some thig like
Public function Something()
on Error Resume Next
if Err then
what ever you want to do
End Function '-- Something()
Private sub ErrorHandler01()
on error GoTo ErrorHandler
What ever you like to do
I am not saying this is 100% right but some thing like that may help you.