Issue with JTextTester.actionEnterText

Help
maggie7
2009-09-30
2013-05-20
  • maggie7
    maggie7
    2009-09-30

    Hi there,
                    I am testing a Swing panel using abbot. In this Swing panel,
    there are two JTextField, when user typed something into JTextField 1, JTextField 2 will be automatically populated with value of JTextField 1.
    However, if I used JTextComponentTester.actionEnterText(JTextField1, value), I can see from playback that value is not set to JTextField2, obviously listener registered in JTextField1 is not triggered by abbot tester, and I don’t understand why? Posting key event from abbot is different from user keyboard actions? Strangely, I also noticed that if I add the following call after actionEnterText, JTextField2 will be populated with right value:

    actionActionMap(c, DefaultEditorKit.selectAllAction);

    Has somebody experienced similar issues here? Thanks.

    -min