Skip Navigation LinksForums > Rapise Forums > Rapise Issues & Questions > OCR is Null or not an obj...

OCR is Null or not an object RSS Feed

Thursday, October 4, 2012
Hi there!

I'm trying to set up a script which simply checks between two coordinates and returns the text displayed in that area.  The application I'm running against does not use standard Windows objects, so the only way to get values on the screen will be by OCR.  However, when I try to run one of the OCR commands, I get the message "'Ocr' is null or not an object."

The command I am running that leads to this error is:
SeS('KV2_Sim_Host_code_vi').Ocr.DoExtractFromScreen(39, 239, 114, 269);

My first thought is that I need to include the OCR library somewhere... is that with Ocr.DoSelectOcrEngine()?  After including that in the main test.js file, I was still getting the same issue.
2 Replies
Yves M GagnonYves M Gagnon
re: Yves M Gagnon on Thursday, October 4, 2012
Thursday, October 4, 2012
Looks like I am simply running into issues with loading of the Tesseract engine.  I had a JS developer assist in troubleshooting, and came up with the message that the Tesseract engine is not installed.  (Also, in the command below, I was not correctly addressing the OCR.DoExtractFromScreen function, but that has been fixed.)

Now, I'm operating on the assumption that the OCR commands cannot be targeted to a specific window...?  Is there a way to specifically target the window I'm running an application in, or will I need it full-screened whenever I run this test?  (Fine either way... just hoping I could target specifically.)
Adam SAdam S
re: Yves M Gagnon on Thursday, October 4, 2012
Wednesday, October 17, 2012

Hi Yves

I believe that the OCR engine can do both depending on which functions you use (DoExtractFromWindow() vs. DOExtractFromScreen())



  • Started: 10/4/2012
  • Last Reply: 10/17/2012
  • Replies: 2
  • Views: 1242
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.