Eggplant OCR is unable to read the dynamic text efficiently and clearly

Hi,
I am automating a process of validating dynamic text present in one of the application and Eggplant OCR is unable to fetch the correct text from the application. For example : “flu” is fetched as “hu” , “to” is fetched as “fo” …etc.

I tried to using “ValidWords” and "ValidCharacters " Properties ,which was not of much help. This worked for few ,but not for all the texts.

Following are the line of code which i used to read the text form the application.

1. put ReadText((build),EnableAggressiveTextExtraction:Yes,Contrast: On, ContrastColor:Black,ContrastTolerance: 70,ValidWords:Response1,IgnoreNewLines:Yes,CaseSensitive: Yes,)into Resp1

2. put ReadText((build),EnableAggressiveTextExtraction:Yes,Contrast: On, ContrastColor:Black,ContrastTolerance: 70,ValidCharacters:Response1,IgnoreNewLines:Yes,CaseSensitive: Yes,)into Resp1


build- contains the search-rectangle co-ordinates from where the text has to be read.
Response1: Contains valid words
resp1- contains the text which is read from the application.


Kindly let me know if anyone has faced issue while reading the dynamic text and if any resolution to overcome this issue.

Thanks.
Ash.

It sounds like you have a poorly chosen screen font. My guess would be that if you really look at it closely with a critical eye, you’ll be able to see why it would be difficult to read at the pixel level. For assistance with these issues, you should submit a case to support via email and include screenshots of the text you are trying to extract.

Is your text live (i.e. can you select it on the screen by ‘highlighting it’?) If so, give this a try:

// Highlights text to the right of an image and returns the highlighted value
function HighlightTextAdjacentToImage myImageName, myDragDropOffsetX, myDragDropOffsetY, myDragDropDistance
if myDragDropOffsetX is “” then set myDragDropOffsetX to 3
if myDragDropOffsetY is “” then set myDragDropOffsetY to 0
put ImageRectangle(imageName:myImageName, waitFor:5) into myDragDropMarker
set myDragDropStartX to item 3 of myDragDropMarker + myDragDropOffsetX
set myDragDropStartY to round(the average of (item 4 of myDragDropMarker,item 2 of myDragDropMarker)) + myDragDropOffsetY
set myDragDropFinishX to myDragDropStartX + myDragDropDistance
set myDragDropFinishY to myDragDropStartY
Drag ( myDragDropStartX, myDragDropStartY)
Drop ( myDragDropFinishX, myDragDropFinishY)
TypeText controlKey,“c”
set thevalue to RemoteClipboard()
return thevalue
end HighlightTextAdjacentToImage