Forum Discussion
GiorgiNiavadze Did support resolve your issue?
My function function OcrCheckpointThrowsWarning(searchAreaObject, textToCheck) {
let ApplicationProcess = Sys.WaitProcess("LMS", 300);
let recognizedText
if (ApplicationProcess.Exists)
{
recognizedText = OCR.Recognize(searchAreaObject);
recognizedText.CheckText("*"+textToCheck+"*")
Log.Message(`${textToCheck} - FOUND`);
}else{
Log.Warning(`${textToCheck} - NOT FOUND`);
}
}
I don't see the text of the warning you get but In your code you will get a warning (you coded) if the application process does not exist. This does not seem right rraghvani spotted this.
OCR.Recognize(searchAreaObject) should produce and error if searchAreaObject does not exist.
recognizedText.CheckText("*"+textToCheck+"*") should produce an error if the specified text is not found.
So, verify and log your values before you use them with the OCR methods.
TestComplete will log the warning/error and may or may not stop the test according to how the project settings are configured.
... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎