Forum Discussion

Sergius64's avatar
Sergius64
Occasional Contributor
7 months ago
Solved

Empty 'AWTComponentName' and 'AWTComponentAccessibleName' values.

Hi,

 There's a bit of a UI redesign for our application under test (Java Swing). I'm trying to modify the scripts to follow suit - but I'm finding that a little hard as there are now a lot more JPanels leading up to the UI elements I'm trying to interact with. I was thinking of skipping those by looking for something unique on the elements in question - but for some reason their field names are not appearing in AWTComponentName or AWTComponentAccessibleName - those are just displayed as empty - so all I have to go by is the Class and AWTComponentIndex - which isn't good enough of Unique identifiers when skipping lots of empty JPanels.

 

 The class for fields in question extends JTextField - which is a descendant of AWTComponent. So what gives? Anyone encountered something like this before?

  • Ok, we figured it out. Developers needed to call .setName() method from java.awt.Component for that value to become visible to TestComplete.

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I suggest you check to see if the Java version has been upgraded and if it's supported by TestComplete. You haven't mentioned your version of TC.

     

    When the underlying code has changed, usually a major version change. It will have a knock-on effect with other dependencies.

     

  • Sergius64's avatar
    Sergius64
    Occasional Contributor

    TC version 15.56.2.7 x64

    Java version of Application Under test is still Java 8. Nothing changed there.

  • Sergius64's avatar
    Sergius64
    Occasional Contributor

    Ok, we figured it out. Developers needed to call .setName() method from java.awt.Component for that value to become visible to TestComplete.