Exception handling

in my case I am using if condition for searching images. Some times if image not found that type of scenario my script is getting stop.

  1. Is there any way to continue the script if image not found.
  2. I am passing parameters from .csv file by using OCR, Some times ocr is not able to understand the text on SUT then my script is getting failed.

So, please give me help on this for don’t stop the script .

You can use a TRY…CATCH block to trap potential exceptions.

try
  click "MyImage"
catch
  logWarning "Unable to find MyImage"
end catch

If you just want to ignore any exceptions you can use TRY TO

try to click "MyImage"

More information is available in the online SenseTalk reference manual