ContributionsMost RecentMost LikesSolutionsRe: Waiting for OCR checkpoint to appear as screen loads AlexKaras Discovered the reason for the "Invalid Text" error. When selecting the parameters in the Keyword test area, for setting the parameter I was using a String type instead of Object type. The solution from the support site actually works really well for me. The only issue with it is that it's a infinite loop, so I modified the sample code and used a for loop instead to emulate a 10 second timeout (I could also pass another parameter for the seconds) function CheckTextContents(textToSearch) { // Recognize the text contents of the specified onscreen object (Citrix window) var text = OCR.Recognize(Aliases.wfica32.wndTransparentWindowsClient).FullText; // Search for the occurrence of the specified substring in the recognized text return (aqString.Find(text, textToSearch, 0, false) > -1) } function WaitForText(textToWait) { for (x = 0; x < 10; x++) { if (! CheckTextContents(textToWait)) Delay(1000); else break; } } Re: Waiting for OCR checkpoint to appear as screen loads ThanksAlexKaras , I'm trying to find how to modify this to use OCR.Recognize method. I found an example here:https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/ocr/check/wait.html but I'm unable to get the code working. Using this code: function CheckTextContents(anObject, aSubstring, caseSensitive) { // Recognize the text contents of the specified onscreen object var text = OCR.Recognize(anObject).FullText; // Search for the occurrence of the specified substring in the recognized text return (aqString.Find(text, aSubstring, 0, caseSensitive) > -1) } and then from the keyword test (see attached) When I run the test, I get a "Type Mismatch" error on the following line var text = OCR.Recognize(anObject).FullText; Re: Waiting for OCR checkpoint to appear as screen loads ThanksAlexKaras, Is there a sample that you could point me to on how to implement a loop check? I would be using it multiple times within my test script as I navigate screens, so hopefully I can use it in a function/subroutine. Re: Waiting for OCR checkpoint to appear as screen loads Thanks BenoitB for the suggestions. Here's my thoughts on them and correct me if I'm understanding this wrong: - I rather not relay of wait/sleep commands since it would slow down the script. Plus they're not dependable since the loading screen duration could vary based on load/stress - I could add a checkpoint for the loading screen, but the risk is that after I check and then proceed, the loading screen may still be present. - There's no text behind the loading screen. It displays on the screen and will disappear once the login completes and the application dashboard appears. - Error management/trapping may be the best approach. Is there a way to do this with a keyword test, or would it be best to do this via script? I'll also add the same behavior is happening when using an OCR Action. Since my Citrix window is always displayed, switching between screens in the application is going to be a challenge because I run into the risk of grabbing text from the current screen with an OCR Action when I need the script to wait until the new screen appears. Waiting for OCR checkpoint to appear as screen loads I'm using a OCR checkpoint to wait for a Citrix application and display a login prompt. When the window appears there's a brief loading screen that displays before the login prompt that I'm using the checkpoint to validate. The OCR checkpoint ends up detecting the loading screen and then failing because it's not the login prompt. Is there a way to set up a delay/wait for the login prompt to appear despite what TestComplete first detects from the object window? It would need to actually wait the specified timeout for the text to appear instead of failing at what it first detects. Thanks in advance SolvedPurging Test Set runsIs there a method for purging or resetting a test set run history? I've noticed that if I ended a test run by mistake, or select the run options when ending a test run to handle the remaining tests that weren't ran, there's no way to remove the run from the Run History section.