Reading Text From Image through Script


Can any one suggest me how to read and Get text from an Image.

For Example :

I have a " Request ID : " field in my image file which has got the Request Number, I Want to Read that number through my script and use the number for further validation .

The easiest way for Eggplant to read text from the SUT is through access to the remote clipboard. Quite often, even read-only (non-editable) text is displayed in fields that will allow the text to be selected and copied to the clipboard.

I can’t tell from the picture whether this is true for your Request ID field, but try either dragging across the text in that field, double-clicking it, or clicking it and then issuing a Select All command (Command-A on a Mac). If you can select the text in that way and then copy it (Command-C), then your script can perform those same steps to copy the text and then use a command like this to put the value into a local variable:

put remoteClipboard() into requestID

If your field contents can’t be copied to the clipboard, another approach that can work is to capture (or generate through a TIG) images of the individual digits. We’ve developed scripts that can search for these images and reconstruct the number based on their locations. Contact our support department if you want to pursue this approach.