Ask a Question

Stop Execution causes OnStop Handler to fail

SOLVED
wmtan01
Contributor

Stop Execution causes OnStop Handler to fail

I noticed that when I use Stop Execution in our Keyword Tests, our OnStop Event Handler (which is a KWT) raises and exception when it tries to call an advanced script

 

Here are the contents of the KWT handler:

image.png

The exception raised says: 

An exception occurred while executing the script routine
 
I added some logging to trace up to where the script actually gets to, apparently the KWT cannot even load the advanced script.
 
Thinking that this might be caused by a weird behavior of advanced scripts in handlers I decided to make a purely advanced script version of our KWT handler:
image.png
 
And surprisingly this one works. Anyone know what the possible issue might be?
 
I was thinking that you can either go purely KWTs with no advanced scripts or just call an advanced script for the handler.
3 REPLIES 3
cunderw
Community Hero

There should be additional details in the log if you click the details tab. What does that say?


Thanks,
Carson

Click the Accept as Solution button if my answer has helped

Unfortunately the contents of the details tab is just this:

image.pngimage.png

TanyaYatskovska
SmartBear Alumni (Retired)

Hi @wmtan01,

 

I can suggest that you implement the suggestions posted in the Handling Exceptions in Scripts article. I think this may help you better understand why you get the exception.

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: