| || |
Calling functions within an event handler
I have been using TestComplete3 for just about a month now for automating cases in a web application.
There are scenarios where, on the occurance of an unexpected window, I need to do the following:
1. Close the unexpected window
2. Clear the page (this is currently possible using the project events control in a form)
3. Depending on which page I get the unexpected window, call another function from the OnUnexpectedWindow routine for the project event control.
The problem if that this function call needs to take in parameters that I am not sure I can pass into the OnUnexpectedWindow routine. I would like to know if there is any way to do this using the project events control, rather than coding a solution for such an event.
Thanks for your help
Re: Calling functions within an event handler
The only solution I can suggest is storing the needed values in global variables. This is not a good approach, but there is no other way to pass values to an event handler.