ContributionsMost RecentMost LikesSolutionsRe: Invalid Bitmap using Legacy OCR AlexKaraswrote: Hi, >picObj = FormObj.Windows("UniText","",VarIndex).picture Unless it is a typo in the post, picObj must be Set : Set picObj = FormObj.Windows("UniText","",VarIndex).picture Yep it was a type in the Forum not the script.... I will raise a support ticket as suggested... For the meantime the copy text to clipboard is a simple work of genius and suits my needs perfectly! It provides a nice workaround to my issue :-) Thankyou Re: Invalid Bitmap using Legacy OCR Changing project properties Image fomat to BMP make no difference. Saving image to file system... Call PictObj.SaveToFile("c:\temp\chkpoint.bmp") and then loading also makes no difference, I always end up with Invalid Bitmap Invalid Bitmap using Legacy OCR I have a number of application fields (Uniface unitext), They contain text but Testcomplete does not expose the wText (It appears unable to recognose any of the field content, although all properties exist, no content is exposed), As my environemt is secure (no external access) I am unable to exploit the IQ addon, my options are Text Recognition or OCR, Text Recognition does not appear to work with Uniface (A search for known text on screen returns nothing!) My hope hangs on Legacy OCR however when calling Set octObj = OCR.CreateObject(picObj) I get a runtime error Invalid Bitmap. I know which UniText field I need to interigate by its .top and .left properties, All I am trying to do is produce a nice clean checkpoint in the log file! picObj is set to FormObj.Windows("UniText","",19).picture log.picture picObj, "Image to Ocr" Is producing a very nice logged picture of the UniText field in this case its a duration ie 12345:12 Am I missing something here? is the deafult object.picture not a bitmap? My hope was to do something like Set FormObj = Incredibly long uniface path to unicanvas containing the objects of interest... picObj = FormObj.Windows("UniText","",VarIndex).picture log.picture picObj, "Image to Ocr" Set ocrObj = OCR.CreateObject(picObj) ocrText = ocrObj.GetText() if ocrText = varExpValue then log.checkpoint "Checkpoint passed " & ocrText else log.error "Checkpoint failed value " & ocrText & ", expected " & varExpValue runner.stop End if Set ocrObj = Nothing Set FormObj = Nothing I am allready checkpointing the data via a direct database read, so I know the retrieved value should be ok, however I really want to check the screen value presented to users... SolvedRe: Exception running keyword test when called from another test I have abandoned using Keywrod tests and converted everything to script, it all works now... There was NO information within the exception, The stack was not big (4 layers), System CPU/Memmory was not maxed, it did litterally appear to be the addition of one more keyword script, if the body of the keyword was moved to the calling keyword, it was happy, if I added one more it failed again.....I have to be honest, I was not entirely happy using keywords, but was forced don that route, scripting is allowing me to perform much better application flow control ... Re: Exception running keyword test when called from another test I have now converted all the Keyword tests to Scripts (I am happier with scripts anyway!), I have raised a support ticket to ask this question more formally. #00427087: "Tests work until one more Keyword test is called then Test stops with Exception." I did look at Perfmon trace during the failed execution (Memory and CPU showed benine usage), The call stack showed 4 rows, so not eaxctly huge. Exception running keyword test when called from another test The automated testing sratergy we are embarking on is to record/handcrank simple Keyword tests (Units scripts when enhanced logic is required), large tests result in a large number of called keywords and scripts with normal while/if logic to contol which keywords are called. This has been working well up untill today, when a test failed with an Exception (No additional info/help), the called test ran well on its own, but continued to fail when called, The only solution I found was to copy the Test statements into the previous keyword test called (It was simply clicking on a button - now it clicks on the button and does stuff) The stuff copied was not even very complex, a simple CTRL + D keypress and CTRL + S and close two windows. This has lent me to thinking is there a limit to the number of keyword tests that can be called? (I personally would prefer to script everything, but I have been tasked to make it simple - hence record simple keywords - and then I stitch it all together and add the complex logic) Todays issue has made me nervous as there was no clear reason for the error and the solution seems to show a weakness in our startergy (No limit to number of keywords appears in any documention, the only limitation I have found is one of Functionality, i.e why I would prefer to script)