0

I want to test a Swing app written with Intellij IDEA. I have been able to setup the initial example, but when trying to execute the example text, I get this message:

Unable to find component using matcher org.assertj.swing.core.NameMatcher[name='txtFirstName'

Taking a detailed look to the swing component hierarchy reported, I have noticed that every field has the 'name' property set to null, so I figured out that this is the origin the error. The problem is that, in the IntelliJ IDEA swing visual editor, the property 'fieldName' is correctly set, so I don't know how to solve it.

Component hierarchy:
javax.swing.JFrame[name='frame0', title='VT Institute', enabled=true, visible=true, showing=true]
  javax.swing.JRootPane[]
    javax.swing.JPanel[name='null.glassPane']
    javax.swing.JLayeredPane[]
      javax.swing.JPanel[name=null]
        javax.swing.JTabbedPane[name=null, selectedTabIndex=0, selectedTabTitle='Students', tabCount=5, tabTitles=["Students", "Courses", "Enrollments", "Reports", "Utilities"], enabled=true, visible=true, showing=true
          javax.swing.JPanel[name=null]
            javax.swing.JTextField[name=null, text='', enabled=true, visible=true, showing=true]
            javax.swing.JTextField[name=null, text='', enabled=true, visible=true, showing=true]
            javax.swing.JTextField[name=null, text='', enabled=true, visible=true, showing=true]
            javax.swing.JTextField[name=null, text='', enabled=true, visible=true, showing=true]
            javax.swing.JTextField[name=null, text='', enabled=true, visible=true, showing=true]

I have checked similar issues in stack overflow, but all of them are related to non-visible fields.

Jose
  • 11
  • 1

0 Answers0