i am trying to override some eggplants commands so that they provide a better error handling for my testing.
I have, within my suite a script call myUtil wich i “start using” before any script i create.
most of the things work fine, but i am having an issue with this particular piece of code:
to Click myImage, myError, myDesc If myError is empty then put "UNEXPECTED" into myError If myDesc is empty then put "Unable to find image: "&myImage into myDesc try If ImageFound(myImage) then send Click FoundImageLocation() to SenseTalk end if catch anException throw myError, myDesc end try end Click
when i try to do Click “SomeImage” from a script, i get this result:
Wed, 11-02-23 3:10:41 PM START Running WorkingTest.script
Wed, 11-02-23 3:10:44 PM imagefound Unable to Find Image Document/Window_AutoCurvilinear/TextField_EndDepth
Wed, 11-02-23 3:10:44 PM SUCCESS Execution Time 0:00:02 WorkingTest.script
I would have expected to catch the exception and get a big fail with “UNEXPECTED” “Unable to find image <>” witch is not the case… what am i missing?