pravin_k99
5 years agoContributor
Solved
Why cant I see all my tests in event handler?
When I go and add a new event handler - lets say for an event OnLogError, I only see few scripts and no keyword test. Any reason?
I can definitely add a new one but I would rather use an existing o...
- 5 years ago
You can run a KWT as an event handler. However, keep in mind, that there are certain objects and parameters that need to be passed in. So, if the KWT doesn't have the proper parameters, it's filtered out.
- 5 years ago
Hi pravin_k99
I believe what tristaanogre is referring to which parameters your keyword test is configured with. Just like you can configure a function to have parameters, you can configure a Keywordtest to have parameters.
If you let TC generate the event as a script, you will see the function is defined as such:
function GeneralEvents_OnLogError(Sender, LogParams)
If you create a new KWT, say OnLogErrorKWT and add the same two parameters :
The KWT will be selectable:
Thanks tristaanogre, I learned something new :smileyvery-happy: