Forum Discussion
This is just a suggestion, as I don't use OCR. Try using a try...catch if it throws an exception. Or adjust your project settings -> playback, error handling
They may have changed the functionality of OCR, so that it errors instead or it could be an issue.
Alternatively, open a support ticket via https://support.smartbear.com/testcomplete/message/
I have troubleshoot many ways:
use with try/catch block for this function
in this situation does not worked catch block, it do not runs in catch block while error
I know playback functionalities but, I do not want to use this to configure on error and on exception options to continue test, this is not only one reason cause I want to option between error and warning while using OCR.
I want to achieve only one goal, I would can choose message type when exception happen in OCR error or warning from exactly in OCR CHECKPOINT in keyword test in checkpoints operations or suggest me some function which is like above my function and work as I explain
I have opened a support ticket also : The following unique identifier was assigned to your request: 00760175
- rraghvani3 months ago
Champion Level 3
Have you tried the following example code in https://support.smartbear.com/testcomplete/docs/reference/program-objects/ocrtextdocument/checktext.html ?
You should check if searchAreaObject exists. Avoid using wildcards within the parameter of recognizedText.CheckText("*"+textToCheck+"*") and instead pass in your string containing wildcards e.g. "*mystring*". If ApplicationProcess.Exists returns false, your are then printing Log.Warning(`${textToCheck} - NOT FOUND`);, which is incorrect.