Forum Discussion

imachabeli's avatar
imachabeli
Regular Visitor
11 years ago

Does text recognition(not the OCR but what TC docs calls text recognition) work with java swing?

I'm trying to automate some Java/JNLP  application.

Added main windows class "SunAwtFrame" to the Text Recognition list but the text I'm lloking for is burried under SwingObject control.

Do not  see any TextBoxObject in the object browser.

So not sure whether its me, not setting up something properly or just TC can't find text elements because its  Swing (not AWT)?

2 Replies

  • Text Recognition captures only the text that's rendered using Windows messages WM_PAINT and WM_PRINTCLIENT. It could be that Swing uses another technique for text rendering.


    You should be able to get data from custom Java objects using their internal methods or properties. In the Object Spy, look under the Java category for methods/properties that look relevant. If you could tell us the class name of your object (JavaFullClassName property) and post its screenshot, we could give more specific advice.

    • RajeshKalaivana's avatar
      RajeshKalaivana
      New Contributor

      Hi,

       

      Has anyone found the solution for the raised question. I too face the same problem and the Javaclassfullname for the object is javax.swing.Jframe and it has a picture. we annotate some text over the image and I need to get the text for the same.

       

      Regards,

      Rajesh.K