Program for OCR
I am working on a PROIV XML reporting. When the report is getting generated size of the EMPNAME is getting changed as the length of the data is changed Ex: Ram, Shyam. I would like to write the program to read the char using OCR when char length is varing. How do I use the OCR in this program?
Thanks & Regards,
Re: Program for OCR
I have no idea what PROIV and EMPNAME are.
Robot can do OCR, but it isn't very reliable.
- It relies on coordinates on a screenshots, which is usually a poor way targeting the objects on screen.
- Robot OCR routines are not very good, and will easily get confused with similar looking characters.
Any, here's you answer :
- start recording
- do a imageVP or a RegionVP
- after have selected the image area, hit the Edit button. That will bing up the image comparator screen.
- on the imag VP edit screen, defined a new OCR region (the button for that has 'ab' on it)
- define the area in you image which you want to convert to text.
- close the image VP and stop recording.
- use SQAGetOcrRegionText to get the text value
Note that you can access the image comparator later later via the VP treeview (left-hand pane) in Robot.
If you want to do an OCR without having the image VP result appear in your logs, use SQASuspendLogOutput and SQAResumeLogOutput around it.